When I changed AWS::ApiGateway::Method
properties by AWS SAM
template and deployed it. but I noticed that change was not reflected until I deploy API manually from AWS management console. I think it is because I didn't change the resource of AWS::ApiGateway::Deployment
and AWS::ApiGateway::Stage
on the template.(The deployment history of AWS::ApiGateway::Stage
was not updated.)
How can I reflect the change when I trigger sam deploy?
If you are still looking for a solution for this, SAM has recently(March 2023) introduced a property under AWS::Serverless::Api
called AlwaysDeploy
which forces API to be deployed even when there is no changes to API whenever there is sam deploy.
Reference:
AWS::Serverless::Api
DocumentationNote that this will only work if you have your sam cli up to date (>v1.78.0) in your local machine or CI/CD where you will be running sam build
.
No, you have to manually deploy the api from the console :) it's a limitation at the moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With