Closed having-fun-serverless closed 10 months ago
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or 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.
It looks like I was missing the name of the macro, although CW works without specifying the Name property, SAM requires something like
MyNewTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: "MyNewTable"
KeySchema:
- AttributeName: key
KeyType: HASH
AttributeDefinitions:
- AttributeName: key
AttributeType: S
Fn::Transform:
Name: "VariableSubstitution" # <-- here
Description:
I created and deployed a macro. When using this macro with a non Serverless construct, like DynamoDB, AWS SAM crashes. I'm aware of the issues with intrinsic functions as mentioned here - https://github.com/aws/serverless-application-model/issues/2533 , but I'm using my function in a non Serverless resource.
Steps to reproduce:
I'm using the following template:
Observed result:
When using
aws cloudformation create-stack
command to create a stack, it works, however when usingsam deploy
I'm gettingExpected result:
Getting a successful deploy like
aws cloudformation create-stack
cliAdditional environment details (Ex: Windows, Mac, Amazon Linux etc)
{ "version": "1.100.0", "system": { "python": "3.11.3", "os": "Linux-6.2.0-1015-aws-x86_64-with-glibc2.35" }, "additional_dependencies": { "docker_engine": "24.0.5", "aws_cdk": "2.99.1 (build b2a895e)", "terraform": "Not available" }, "available_beta_feature_env_vars": [ "SAM_CLI_BETA_FEATURES", "SAM_CLI_BETA_BUILD_PERFORMANCE", "SAM_CLI_BETA_TERRAFORM_SUPPORT", "SAM_CLI_BETA_RUST_CARGO_LAMBDA" ] }