Serverless Framwork creates an output called “HttpApiUrl” when deploying. I looked in the template update stack that is generated and lifted this CloudFormation code from there. I’m using the JSON format here so you may have to adjust if you’re using yaml.
environment: {
ImportedValue: {
"Fn::Join": [
"",
[
"https://",
{
Ref: "HttpApi",
},
".execute-api.",
{
Ref: "AWS::Region",
},
".",
{
Ref: "AWS::URLSuffix",
},
],
],
},
}
I hope this helps.