Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"aws cloudformation package" fails with AWS::LanguageExtensions Fn::ForEach in Resources #8469

Closed
x6j8x opened this issue Jan 8, 2024 · 3 comments
Assignees
Labels
bug This issue is a bug. cloudformation investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue

Comments

@x6j8x
Copy link

x6j8x commented Jan 8, 2024

Describe the bug

Applying aws cloudformation package to a template that includes the AWS::LanguageExtensions transform and a Fn::ForEach in the Resources section results in the following error:

2024-01-08 15:32:38,671 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "/root/.pyenv/versions/3.9.16/lib/python3.9/site-packages/awscli/clidriver.py", line 217, in main
    return command_table[parsed_args.command](remaining, parsed_args)
  File "/root/.pyenv/versions/3.9.16/lib/python3.9/site-packages/awscli/clidriver.py", line 361, in __call__
    return command_table[parsed_args.operation](remaining, parsed_globals)
  File "/root/.pyenv/versions/3.9.16/lib/python3.9/site-packages/awscli/customizations/commands.py", line 187, in __call__
    return self._run_main(parsed_args, parsed_globals)
  File "/root/.pyenv/versions/3.9.16/lib/python3.9/site-packages/awscli/customizations/cloudformation/package.py", line 150, in _run_main
    exported_str = self._export(template_path, use_json)
  File "/root/.pyenv/versions/3.9.16/lib/python3.9/site-packages/awscli/customizations/cloudformation/package.py", line 166, in _export
    exported_template = template.export()
  File "/root/.pyenv/versions/3.9.16/lib/python3.9/site-packages/awscli/customizations/cloudformation/artifact_exporter.py", line 664, in export
    resource_type = resource.get("Type", None)
AttributeError: 'list' object has no attribute 'get'

Expected Behavior

Template is successfully packaged.

Current Behavior

Packaging fails

Reproduction Steps

Include Fn::ForEach in Resources block and package template.

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/1.27.110 Python/3.9.16 Linux/4.14.311-233.529.amzn2.aarch64

Environment details (OS name and version, etc.)

Amazon Linux

@x6j8x x6j8x added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 8, 2024
@isuftin
Copy link

isuftin commented Jan 8, 2024

@x6j8x - Looks like this was very recently fixed #8075

Consider updating your version of awscli

@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Jan 8, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK added investigating This issue is being investigated and/or work is in progress to resolve the issue. cloudformation p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jan 8, 2024
@RyanFitzSimmonsAK
Copy link
Contributor

Hi @x6j8x, thanks for reaching out. As @isuftin mentioned, please update your CLI version to 2.15.3 or higher, and let me know how that goes.

@x6j8x x6j8x closed this as completed Jan 8, 2024
Copy link

github-actions bot commented Jan 8, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. cloudformation investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

3 participants