Last active
May 25, 2019 02:25
-
-
Save mearns/b081aec5e9c10fcd5e3f5ccf3fa1488f to your computer and use it in GitHub Desktop.
CloudFormation template for API Gateway Hostname Discovery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Resources": { | |
"ApiGatewayRestApi": { | |
"Type": "AWS::ApiGateway::RestApi", | |
"Properties": { /* ... */ } | |
}, | |
"ApiHostParam": { | |
"Type": "AWS::SSM::Parameter", | |
"Properties": { | |
"Name": { | |
"Fn::Sub": "/some/unique/path/probably/including/${App}/${Stage}/hostname", | |
}, | |
"Type": "String", | |
"Value": { | |
"Fn::Sub": "${ApiGatewayRestApi}.execute-api.${AWS::Region}.amazonaws.com" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment