How to export API-URL in serverless,yml


#1

Hi,
I have defined an API-Gateway within serverless.yml and now I want to export its url in output section of the yml file. I just wonder how to do that. I expect somethin like but this does not work due to the !ref commands which are unknown to serverless. any help would be appreciated
resources:
Outputs:
ApiUrl:
Description: URL of your API endpoint
Value: !Join
- ‘’
- - https://
- {self:custom.service.name} - '.execute-api.' - 'eu-central-1' - '.amazonaws.com/' - {self:provider.stage}


#2

I wrote about this in How do I get my API Gateway URL?. Just copy the snippet at the bottom of that article.


#3

Thank you so much. In the meantime I found the solution by myself :slight_smile: