1 Answers
0
Hi You have the possibility to pas routesettings https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-routesettings
But SAM will merge that if original api has some
For stagenames there is a possibility to create the stages and your api independently instead of relying on sam function resource
By the way creating your own stage will not prevent sam creating default stage and prod stagenames
Resources:
Myv1Api:
Type: AWS::Serverless::Api
Properties:
StageName: v1
OpenApiVersion: 2.0
Lambdafunction:
Type: AWS::Serverless::Function
Events:
MyApiv1Event:
RestApi: !Ref Myv1APi
This way the defaults will be prevented and you create your v1 stage
answered a month ago
Relevant questions
Can you create API Gateway methods using a CloudFormation template without a Lambda proxy function?
Accepted Answerasked 4 years agoLicensing an AWS serverless application
asked 19 days agoHow can I publish an application containing an AWS::Serverless::Function resource with a FunctionUrlConfig property?
Accepted Answerasked 2 months agoServerless application repository return a 500 error when including an openapi specification with Fn::Transform in DefinitonBody of serverless::api
asked 6 months agoHow to create an API gateway with multiple stages in AWS Serverless Application Model (SAM)?
asked a month agoHow to set CloudWatch logs retention policy for Lambda in AWS Serverless Application Model (SAM)?
Accepted Answerasked a month agoHow to create Lambda using AWS Serverless Application Model (SAM) without an AWS managed IAM policy?
asked a month agoAWS SAM: set the authorization cache TTL in the resource template (AWS::Serverless::Api)
asked 4 months agoLooking for a best-practice for building serverless application with amplify and api gateway and lambda
Accepted AnswerSAM - Creating a new API Gateway with an existing Custom Domain
asked 2 years ago