Closed nishikkr closed 2 weeks ago
Thanks for reaching out. For requests to update the documentation, we recommend using the Provide feedback links at the bottom of User Guide or API pages. In this case, the CloudFormation team owns that User Guide and the ListResourceScanResources API, so they would need to approve/implement any changes.
Requests to modify the API behavior/responses fall into a different category. If you'd us to reach out to the CloudFormation team with those requests, can you elaborate a bit on your use case and how you're blocked by the current behavior? I'm wondering if what you're trying to accomplish could be done using the --query parameter, for example:
aws cloudformation list-resource-scan-resources \
--resource-scan-id arn:aws:cloudformation:us-east-1:123456789012:resourceScan/0a12345-489c-43ca-a3ef-3e6ecfa5da60 \
--resource-identifier MyApp \
--query 'Resources[].{ResourceType: ResourceType, ResourceIdentifier: ResourceIdentifier}'
Requests to change what an API returns are generally not considered due to the need to maintain backwards compatibility for those relying on the current behavior.
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.
Describe the issue
Inconsistent JSON format causes error in AWS CloudFormation Resource Scan workflow
Description
There's a discrepancy between the JSON format output by the
list-resource-scan-resources
command and the format required by thelist-resource-scan-related-resources
command. This causes confusion and errors for users following the AWS CloudFormation Resource Scan workflow.Steps to Reproduce
Run the
list-resource-scan-resources
command:Use the resulting
resources.json
file in thelist-resource-scan-related-resources
command:Expected Behavior
The
resources.json
file generated in step 1 should be directly usable in step 2 without manual modification.Actual Behavior
Users receive a validation error:
Root Cause
The JSON format output by
list-resource-scan-resources
is incompatible with the format required bylist-resource-scan-related-resources
. Specifically:Current Workaround
Users must manually edit the
resources.json
file to:Example of required JSON format:
Proposed Solution
Consider one or more of the following:
list-resource-scan-resources
to output JSON in the format required bylist-resource-scan-related-resources
.list-resource-scan-related-resources
to accept the JSON format output bylist-resource-scan-resources
.list-resource-scan-resources
into the required input format forlist-resource-scan-related-resources
.Impact
This issue creates a confusing user experience and adds unnecessary complexity to the AWS CloudFormation Resource Scan workflow. It may lead to increased support requests and reduced adoption of this feature.
Links
Create a template from scanned resources - Create a template from scanned resources (AWS CLI) - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html#create-template-from-scanned-resources-cli