Git Product home page Git Product logo

days's Introduction

days's People

Contributors

dependabot[bot] avatar kaihendry avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

days's Issues

Deduce Domain Name

As I understand, you'd like to know how to fetch the domain name of your API Gateway API created by your CloudFormation stack and reference it as an output. Also, I can see that you're using AWS SAM to build your application.

In the processed template of your CloudFormation stack 'arn:aws:cloudformation:ap-southeast-1:407461997746:stack/days/f37dc1c0-27e2-11ec-ab94-0a12a8352912' there's an AWS::ApiGatewayV2::DomainName resource [1] with logical ID 'ApiGatewayDomainNameV23694ba20e6' which was generated by your 'Gateway' AWS::Serverless::HttpApi resource in the original template. You can reference this resource in your template's outputs by using its logical ID as a static value in a Ref function [2].

For example:
Outputs:
MyDomain:
Value: !Ref ApiGatewayDomainNameV23694ba20e6

Please note that unfortunately, the logical ID of the AWS::ApiGatewayV2::DomainName is not as predictable as other resources generated by AWS::Serverless::HttpApi such as:

  • 'Gateway' for the AWS::ApiGatewayV2::Api resource.
  • 'GatewayApiMapping' for the AWS::ApiGatewayV2::ApiMapping resource.
  • 'GatewayApiGatewayDefaultStage' for the AWS::ApiGatewayV2::Stage resource.

Since the logical ID of AWS::ApiGatewayV2::DomainName is randomly generated when using AWS::Serverless::HttpApi, this logical ID only becomes available after processing the original template for the first time (which has already occurred in the provided stack). Also, If you update the domain name for this API, it will trigger a replacement update [3] and may cause the logical ID of this resource to change and require you to update the logical ID in any Ref functions in your template. My apologies if this behavior causes any frustrations on your end.

I hope I've been able to help, and as always, please don't hesitate to reach out if you have any further questions or concerns.

Links:
[1] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html
[2] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html#aws-resource-apigatewayv2-domainname-return-values
[3] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html#aws-resource-apigatewayv2-domainname-properties

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.