aws-sam-cli
aws-sam-cli copied to clipboard
Bug: sam validate does not support language extension
Description:
sam validate command does not support AWS Language Extensions although it was mentioned to be patched in version 1.56.1.
Also mentioned here
Steps to reproduce:
- Create a new project with Poetry:
poetry new sam-validate-test
- Install aws-sam-cli:
poetry add aws-sam-cli
- Create a new SAM template with AWS Language Extensions support:
such as:
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::LanguageExtensions'
Parameters:
...
Resources:
TestBucket:
Type: AWS::S3::Bucket
Properties:
...
UpdateReplacePolicy: !If [IsDevDeployment, "Delete", "Retain"]
DeletionPolicy: !If [IsDevDeployment, "Delete", "Retain"]
- Validate the SAM template with SAM CLI:
sam validate -t template.yaml
Observed result:
The command fails with the following error message:
Error: [InvalidTemplateException('Every DeletionPolicy member must be a string.')] Every DeletionPolicy member must be a string.
Expected result:
There should be no error message
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
SAM CLI, version 1.76.0
❯ sam --info
{
"version": "1.76.0",
"system": {
"python": "3.9.5",
"os": "Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.31"
},
"additional_dependencies": {
"docker_engine": "Not available",
"aws_cdk": "2.53.0 (build 7690f43)",
"terraform": "Not available"
}
}
Hi @napso, thanks for raising this issue!
SAM CLI doesn't support language extensions with sam validate
command as of now, other commands should be working as expected. I will flag this feature request and take it to our PMs.
Hi @napso, thanks for raising this issue!
SAM CLI doesn't support language extensions with
sam validate
command as of now, other commands should be working as expected. I will flag this feature request and take it to our PMs.
I see, thank you.
other commands should be working as expected.
Unfortunately, sam deploy won't work with language extensions so its not just not limited to sam validate.
+1 for this feature
+1 for this, would be nice to get that fixed soon.
+1 for this, sam publish
does not support language extension too.
+1 for this
I think we need to wait 10 more years until it is fixed. :-)
sam build
does not work either.
+1 for this