Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Just deploy cloudformation changes with serverless framework for AWS

I am making changes just to custom resources in my serverless.yml with an AWS provider. The package from the lambda code is not changing, it's already uploaded to S3 from a previous deploy.

How can I say "use the artifacts already in S3, just upload the changed cloudformation template and update the stack using that"?

like image 424
Mike Hogan Avatar asked Jul 20 '26 13:07

Mike Hogan


1 Answers

Updating only the infrastructure with the Serverless Framework is not something achievable as of right now. You will need to perform a full deployment even if there were no code changes.

However, executing a regular sls deploy won't do the trick if no code has changed as the framework won't detect infrastructure changes only. If you want to force a redeployment (i.e you have hooked up a new trigger for your Lambda function in your serverless.yml file), you must force the deployment by using the --force flag

sls deploy --force

like image 55
Thales Minussi Avatar answered Jul 27 '26 17:07

Thales Minussi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!