I’m trying to reflect the changes I made to AWS::ApiGateway::Method properties in my AWS SAM template when I deploy the application. However, when I deploy the application, the changes are not reflected until I manually deploy the API on the AWS management console.
It appears that this is because I have not changed the AWS::ApiGateway::Deployment and AWS::ApiGateway::Stage resources on the template, and the deployment history of AWS::ApiGateway::Stage is not being updated.
How can I ensure that the changes I make are reflected when I trigger a SAM deploy?
You can add a DependsOn attribute to your AWS::ApiGateway::Deployment and AWS::ApiGateway::Stage resources, specifying the AWS::ApiGateway::Method resources that you want to update. This will ensure that the deployment and stage resources are updated whenever there are changes to the method resources.