Last active
July 16, 2021 20:30
-
-
Save thecraftman/2f7b4126f148a0674fa372563d3a947f to your computer and use it in GitHub Desktop.
GetAtt intrinsic function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameters: | |
NameOfService: | |
Description: "The name of the service this stack is to be used for." | |
Type: String | |
KeyName: | |
Description: "Name of existing EC2 KeyPar to enable SSH access into the server" | |
Type: AWS::EC2::KeyPair::KeyName | |
Outputs: | |
WebsiteURL: | |
Description: Website URL for EC2 Instance | |
Value: !Sub 'http://${MyInstance.PublicDnsName}' | |
ServerDNS: | |
Value: !GetAtt | |
- MyInstance | |
- PublicDnsName | |
Mappings: | |
RegionMap: | |
us-east-1: | |
AMI: ami-1853ac65 | |
us-west-1: | |
AMI: ami-bf5540df | |
eu-west-1: | |
AMI: ami-3bfab942 | |
Resources: | |
MyInstance: | |
Type: "AWS::EC2::Instance" | |
Metadata: | |
AWS::CloudFormation::Init: | |
config: | |
packages: | |
yum: | |
httpd: [] | |
php: [] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment