Closed Glydric closed 1 year ago
@DevThoth Thanks for the report. Updating labels.
@DevThoth Could you explain how you ran into this issue? Also, sam sync --watch
may be useful to you, if you are running sam sync
manually all the time.
I then find you that the problem was caused by configuration template, if it is wrong the command will not warn but instead will throw an error
@DevThoth I am not sure I follow. Are you saying that the template.yaml
or whatever your CFN template is written in is invalid, you hit the above issue you reported?
Yes, template.yaml was wrong and i find out creating a new from 0 and comparing the templates
@DevThoth Understood. Thank you for the additional information. Does this error happen why you tried to do sync the first time or just during the process of editing and updating?
Just trying to make sure I fully understand all the conditions.
First sync
i get the same error now
This appears to be solved by https://github.com/aws/aws-sam-cli/pull/5152. I can't replicate the exact error above but was able to get a ValidationError
thrown by providing an invalid template. Now the template exists safely without stacktrace with info on the error from CloudFormation.
Failed to create/update the stack: testing-5025, An error occurred (ValidationError) when calling the CreateStack operation: 1 validation error detected: Value '[AWS:lambda::Function]' at 'typeNameList' failed to satisfy constraint: Member must satisfy
constraint: [Member must have length less than or equal to 204, Member must have length greater than or equal to 10, Member must satisfy regular expression pattern: [A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}(::MODULE){0,1}]
Error: Failed to create/update the stack: testing-5025, An error occurred (ValidationError) when calling the CreateStack operation: 1 validation error detected: Value '[AWS:lambda::Function]' at 'typeNameList' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 204, Member must have length greater than or equal to 10, Member must satisfy regular expression pattern: [A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}(::MODULE){0,1}]
This should go out in our next release, so updating labels. You can try to use our nightly releases to confirm the latest works. Details can be found here
Patch is released in v1.84.0. Closing
If anyone else gets here trying to search, add --stack-name [something]
, that worked for me. Apparently having default.global.parameters
stack_name set doesn't matter. This is on SAM CLI version 1.125.0.
Description:
I was deploy a lambda function using
sam sync
I get this
sam --version
: SAM CLI, version 1.79.0Paste the output of
sam --info
hereAdd --debug flag to command you are running