serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

deploy doesn't recognize the updated Zip

Open sathiyas opened this issue 9 years ago • 5 comments

I have created new Zip file and uploaded to S3. When I ran I get the following

"No changes to deploy. Stack deploy-lambda is up to date"

How do I force the function update code? I had to destroy and recreate the stack.

sathiyas avatar Mar 05 '17 21:03 sathiyas

What command did you run? Did you manually upload zip to s3?

vikrambhatt avatar Mar 30 '17 23:03 vikrambhatt

The Path of the artifact (zip) must change in order for CloudFormation to know it should update.

jolexa avatar May 06 '17 12:05 jolexa

@jolexa Yeah, you're right. CloudFormation doesn't read the file again. The path has to change to trigger an update. If you use aws cloudformation package CLI command it will do it for you based on ZipFile's hash

sanathkr avatar Jun 28 '17 06:06 sanathkr

if anyone happens to run across this: i've found that if the template parameters change then it will update. so i add a required parameter of VERSION and pass in the git SHA.

markwaddle avatar Jan 23 '19 07:01 markwaddle

When template has only a AWS::ApiGateway::RestApi with a swagger file in the BodyS3Location, the sam deploy does not detect swagger file has changed, and sam package does not upload anything.

ajsjunior avatar Apr 29 '20 04:04 ajsjunior