aws / aws/serverless-application-model

Custom Domains: Enable adding basepath mappings in Domain property

Open
#1,131 2 comments 5 reactions 0 assignees View on GitHub
area/resource/api stage/pm-review type/feature
Dominant language
Python
Stars
9.6k
Forks
2.5k
Avg merge
1d 11h
Merged PRs (30d)
7

Description

## Related Issues
#783
## Description
Custom Domains Milestone 3 is to enable multiple domains to multiple Apis mapping. The task tracks adding specific basepath mappings.

SAM input
```yaml
Type: AWS::Serverless::Api
Properties:
Domain:
- DomainName: example.com
Certificate: !Ref MyApiExampleDomainCertificate
BasePathMappings:
- BasePath: somepath # BasePath takes a string, or a list of strings. Required value.
Api: !Ref MyFirstApi # Default: !Ref MyApiAdvancedDomain; use case: mapping this domain to additional APIs
Stage: '' # Default: {MyApi.Stage} Defaults to the current Api's stage
- DomainName: another.com
BasePathMappings:
- BasePath: [anotherpath, andanother]
Api: !Ref MySecondApi # Default: !Ref MyApiAdvancedDomain; use case: mapping this domain to additional APIs
Stage: !Ref MySecondApi.Stage # Default: {MyApi.Stage} Defaults to the current Api's stage
Certificate: !Ref MyApiAnotherDomainCertificate
EndpointConfiguration: REGIONAL # this is default, so same as not having this here
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.