/aws-iot-endpoint-stack

AWS CloudFormation stack that executes as Lambda function on creation and returns the IOT endpoint of the AWS account as an output for use in other templates.

Primary LanguageMakefileMIT LicenseMIT

AWS IOT Endpoint Stack

The current IOT endpoint for an account isn't currently available as a CloudFormation or SSM variable.

This is a simple stack that calls the Describe Endpoint API and returns the response as an Output to this template.

Dependencies

A current version of the AWS Command Line Interface (not sure what the earliest supported version is, but this template has been tested on 1.15.26.

Usage

Deploy the template. Stack name will be iot-endpoint:

make deploy

Delete the template:

make delete

Or if you'd like to run this directly with the AWS CLI:

aws cloudformation deploy --capabilities CAPABILITY_IAM --template-file ./template.yml --stack-name $(STACK_NAME)

Or you can launch the stack directly in the AWS console via:

Launch IOT Endpoint CloudFormation Stack

References

Inspired by https://stackoverflow.com/a/44628055