0

https://u1i7vf9mnl.execute-api.us-west-1.amazonaws.com/v1

How can I get the u1i7vf9mnl portion of the URL from inside of the cloudformation template as a Ref or Fn::GetAtt or some other way?

2

Did you try the variable ServerlessRestApi? It works for us like this:

Outputs:    
    EncryptURL:
      Description: "Encrypt endpoint URL for Stage environment"
      Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Stage/encrypt"
| improve this answer | |
  • 1
    Hey thanks. Yep! That was it! I had to reference the actual RestApi resource. I was referencing the method resource. – mutant_city Oct 13 '18 at 14:43
  • 1
    @mutant_city Cool! – Niklas R. Oct 13 '18 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.