What should the developer do to make the new methods available?
Specify the disable-rollback option during the update-stack operation.
Unset the CloudFormation stack failure options.
Add an AWS CodeBuild stage to CodePipeline to run the aws apigateway create-deployment AWS CLI command.
Add an action to CodePipeline to run the aws cloudfront create-invalidation AWS CLI command.
Explanations:
Specifying the disable-rollback option during the update-stack operation does not address the issue of new methods returning 404 errors. This option only affects whether the stack rolls back on failure, not the actual deployment of API Gateway resources.
Unsetting the CloudFormation stack failure options does not resolve the issue of methods returning 404 errors. This option is related to how CloudFormation handles failures and does not affect the availability of newly created API resources.
Adding an AWS CodeBuild stage to CodePipeline to run theaws apigateway create-deploymentcommand ensures that a new deployment is created for the API Gateway after the CloudFormation stack update. This is necessary because changes to the API resources or methods require a new deployment to become effective.
Adding an action to CodePipeline to run theaws cloudfront create-invalidationcommand is unrelated to the issue. This command is used to invalidate cached content in CloudFront but does not affect the availability of API methods in API Gateway. The 404 errors are not caused by caching issues.