I'm deploying Lambdas (and APIGateway config) through CloudFormation, ultimately using Serverless.
The generated CloudFormation pathmapping section in the cloudformation-template-update-stack.json looks like this:
"pathmapping": {
"Type": "AWS::ApiGateway::BasePathMapping",
"Properties": {
"BasePath": "demolambda",
"DomainName": "staging-api.<REDACTED>",
"RestApiId": {
"Ref": "ApiGatewayRestApi"
},
"Stage": "staging"
}
}
When this is run I get back the error:
pathmapping - Invalid stage identifier specified.
I'm not really sure what this means. The stack gets uploaded to S3, and everything looks fine, however, no matter how I play around with it I continue to get this message.
Curious if anyone has any thoughts about what causes this or how to fix it?