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?

1 Answer 1


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"
  • 1
    Hey thanks. Yep! That was it! I had to reference the actual RestApi resource. I was referencing the method resource. Commented Oct 13, 2018 at 14:43
  • 1
    @mutant_city Cool! Commented Oct 13, 2018 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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