Mike Hogan
Mike Hogan

Reputation: 10583

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"?

Upvotes: 6

Views: 5075

Answers (1)

Thales Minussi
Thales Minussi

Reputation: 7215

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

Upvotes: 12

Related Questions