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?


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

      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.