Created
August 7, 2021 07:16
-
-
Save nake89/7861ab5e41ea7b1afabb87e05ea611cd to your computer and use it in GitHub Desktop.
Neat way to get aws api gateway lambda url and put it in serverless.yaml to store it as an environment variable on the lambda function
This file contains hidden or 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
# Neat way to get aws api gateway lambda url and put it in serverless.yaml to store it as an environment variable on the lambda function: | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
stage: ${env:STAGE} | |
region: ${env:REGION} | |
environment: | |
CI_URL: | |
{ | |
"Fn::Join": | |
[ | |
"", | |
[ | |
" https://", | |
{ "Ref": "ApiGatewayRestApi" }, | |
".execute-api.${self:provider.region}.amazonaws.com/${self:provider.stage}/", | |
], | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment