Just an excuse for me to try HTTP API gateway with an AWS serverless function.
Video about it https://youtu.be/p9pxbDb006I
Days ... & weeks
Home Page: https://days.dabase.com
License: MIT License
Just an excuse for me to try HTTP API gateway with an AWS serverless function.
Video about it https://youtu.be/p9pxbDb006I
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:
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.