Reputation:
How do I output the resource path/URL to cloudformation Outputs?
For example, I have a lambda that's listening for a http event on path /hello
and I'd like the cloudformation to output a variable with the value https://kjkjwerwer.execute-api.eu-west-1.amazonaws.com/test/hello
By default serverless framework outputs the ServiceEndpoint
, however, I wanted the full endpoint of each of my functions
Upvotes: 0
Views: 1155
Reputation: 3787
You can output anything you'd like in the resources
section.
You can use all the same templating variables like !Ref
, ${self:custom.myEndpointName}
, and !Join
to clean it up:
resources:
Outputs:
MyEndpointName:
Description: HTTP Endpoint for MyEndpoint lambda
Value: ${self:custom.myEndpointName} // Or some other templated/hardcoded string
Upvotes: 1