Serverless-application-model: deploy doesn't recognize the updated Zip

Created on 5 Mar 2017  路  5Comments  路  Source: aws/serverless-application-model

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.

Most helpful comment

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.

All 5 comments

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

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

@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

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.

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.

Was this page helpful?
0 / 5 - 0 ratings