"sam deploy" does not execute if a tag has a long value
See original GitHub issueDescription:
The sam deploy
command hangs if a tag with a long value (approx 30+ characters long) is provided. Tested on SAM CLI v0.43.0.
Steps to reproduce the issue:
- Create an empty directory and navigate to it.
- Execute
sam deploy --stack-name test --tags key=012345678901234567890123456789
Observed result: The command hangs and does not produce any output.
Expected result:
Deploying with following values
===============================
Stack name : test
Region : None
Confirm changeset : False
Deployment s3 bucket : None
Capabilities : null
Parameter overrides : {}
Initiating deployment
=====================
Error: Failed to package template: /tmpDir/template.yml.
[Errno 2] No such file or directory: '/tmpDir/template.yml'
However, if a shorter tag value is provided (e.g. sam deploy --stack-name test --tags key=01234567890123456789
) then the correct output gets printed.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:21 (10 by maintainers)
Top Results From Across the Web
"sam deploy" does not execute if a tag has a long value #1845
The sam deploy command hangs if a tag with a long value (approx 30+ characters long) is provided. Tested on SAM CLI v0.43.0....
Read more >sam deploy - AWS Serverless Application Model
To deploy an AWS SAM application, use the sam deploy command from the AWS SAM ... --tags LIST, A list of tags to...
Read more >terraform-aws-modules/lambda/aws
This Terraform module is the part of serverless.tf framework, which aims to simplify all operations when working with the serverless in ...
Read more >Top 10 Serverless Deployment Errors (and How to Fix Them)
The most common error I see our users encounter is when a deploy fails because a previous deploy was unsuccessful. · This situation...
Read more >AWS Lambda Functions - Serverless Framework
Then, when you run serverless deploy , VPC configuration will be deployed along with your lambda function. If you have a provider VPC...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This appears to be caused by this regex that was added in version 0.42.0: https://github.com/awslabs/aws-sam-cli/blob/develop/samcli/cli/types.py#L207.
I isolated this code and tried it with a short tag and a long tag and it is the
re.findall
call that is hanging. Not exactly sure what the regex pattern is meant to do as it is a rather long and complex pattern. A little more commenting for that would be helpful.In my case there is no any error msg showing up. It took me a day to figure out what the problem is and it was because I was lucky to google and find this page… I am using 0.44.