1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
This ended up being very easy to accomplish. I had been focused on the custom domain part so much I overlooked that I could simply create a BasePathMapping. The following worked fine for me:
BasePath:
Type: AWS::ApiGateway::BasePathMapping
Properties:
BasePath: my-service
DomainName: !Ref DomainName # I pass this in as a parameter per environment.
RestApiId: !Ref MainApi # This is my AWS::Serverless::Api resource
Stage: default
Edited by: StealthSid2 on Jul 16, 2020 12:12 PM
répondu il y a 4 ans
Contenus pertinents
- demandé il y a 2 mois
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 10 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
@StealthSid2, could you share your template.yml for two of your projects? I'm struggling to accomplish the same thing. I can get one project to use BasePathMapping with domain, but when I try to take the same approach in my second microservice project I get this error when trying to deploy in SAM:
api.hostname.com | Mapping already exists in stack arn:aws:cloudformation:us- east-1:...
Essentially it says the mapping already exists.