We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running aws cloudformation package the output template mixes two lambda functions if the second one has an indentation bug.
aws cloudformation package
abort with a validation error
All properties of the 2nd lambda overrides the properties of the 1st lambda. The 2nd lambda becomes null.
null
Create a template called indentation-bug.yml
indentation-bug.yml
AWSTemplateFormatVersion: 2010-09-09 Transform: [AWS::Serverless-2016-10-31] Description: AWS Lambda bug Resources: LambdaOne: Type: AWS::Serverless::Function Properties: InlineCode: | exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify('Hello from LambdaOne!'), }; }; MemorySize: 1024 EventInvokeConfig: MaximumRetryAttempts: 0 Events: SignupResource: Type: Api Properties: Path: /one Method: ANY LambdaTwo: Type: AWS::Serverless::Function Properties: InlineCode: | exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify('Hello from LambdaOne!'), }; }; MemorySize: 1024 EventInvokeConfig: MaximumRetryAttempts: 0 Events: SignupResource: Type: Api Properties: Path: /two Method: ANY
run aws cloudformation package
aws cloudformation package --template-file ./indentation-bug.yml --s3-bucket "your-s3-bucket" --output-template indentation-bug-package.yml --profile your-profile
No response
The current output from package:
AWSTemplateFormatVersion: 2010-09-09 Transform: - AWS::Serverless-2016-10-31 Description: AWS Lambda bug Resources: LambdaOne: Type: AWS::Serverless::Function Properties: InlineCode: "exports.handler = async (event) => {\n return {\n statusCode:\ \ 200,\n body: JSON.stringify('Hello from LambdaOne!'),\n };\n};\n" MemorySize: 1024 EventInvokeConfig: MaximumRetryAttempts: 0 Events: SignupResource: Type: Api Properties: Path: /two Method: ANY CodeUri: s3://dev-develop-augmentt-source-code-storage/9cba226edf2a273d23d226a3927776a9 LambdaTwo: null
Instead of silently mixing LambdaOne with LambdaTwo and causing a bug, it would be better to just error out on invalid template syntax.
2.17.14
ubuntu-latest (GitHub Actions), Mac M1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
When running
aws cloudformation package
the output template mixes two lambda functions if the second one has an indentation bug.Expected Behavior
abort with a validation error
Current Behavior
All properties of the 2nd lambda overrides the properties of the 1st lambda.
The 2nd lambda becomes
null
.Reproduction Steps
Create a template called
indentation-bug.yml
run
aws cloudformation package
Possible Solution
No response
Additional Information/Context
The current output from package:
Instead of silently mixing LambdaOne with LambdaTwo and causing a bug, it would be better to just error out on invalid template syntax.
CLI version used
2.17.14
Environment details (OS name and version, etc.)
ubuntu-latest (GitHub Actions), Mac M1
The text was updated successfully, but these errors were encountered: