question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"sam deploy" does not execute if a tag has a long value

See original GitHub issue

Description: 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:

  1. Create an empty directory and navigate to it.
  2. 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
beck3905commented, Mar 6, 2020

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.

1reaction
dslovecommented, Mar 28, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found