We are having serverless architecture and we are using .Net core (netcoreapp2.1 framework) and AWS
In order to create API gateway and deploy APIs we are using below snippet in CloudFormation. Earlier we had not added OpenAPiVersion property but as mentioned in the issue “https://github.com/awslabs/serverless-application-model/issues/1202” we were getting two stages 1. Prod and 2. Stage.
Recently we have added few new APIs endpoint. We are getting 403Forbidden for the new endpoints though old endpoints are working fine.
In swagger we have added new endpoints but we have observed those endpoints are not deployed on Prod stage through cloudformation(API Gateway/API/Stages/Prod). We can see those new APIs under Resources tab(API Gateway/API)
We are deploying our code through Azure devops pipeline
Can you please suggest why new APIs are not been deploying to Prod stage.
Code snippet:
AWS::Serverless::Api
Properties:
OpenApiVersion: 3.0.0
StageName: Prod
DefinitionUri:
Bucket: XXX
Key: !Ref SwaggerKey
TracingEnabled: true
MethodSettings:
- DataTraceEnabled: false
HttpMethod: '*'
LoggingLevel: ERROR
MetricsEnabled: true
ResourcePath: /*
Variables:
API : !Ref APIFunctionName