Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Parameters:
- EnvironmentName:
- Description: Environment Name
- Type: String
- AllowedValues: [development, production]
- ConstraintDescription: must be development or production
- Mappings:
- AWSRegionArch2AMI:
- us-east-1:
- HVM64: ami-6869aa05
- us-west-2:
- HVM64: ami-7172b611
- us-west-1:
- HVM64: ami-31490d51
- eu-west-1:
- HVM64: ami-f9dd458a
- eu-central-1:
- HVM64: ami-ea26ce85
- ap-northeast-1:
- HVM64: ami-374db956
- ap-northeast-2:
- HVM64: ami-2b408b45
- ap-southeast-1:
- HVM64: ami-a59b49c6
- ap-southeast-2:
- HVM64: ami-dc361ebf
- ap-south-1:
- HVM64: ami-ffbdd790
- us-east-2:
- HVM64: ami-f6035893
- sa-east-1:
- HVM64: ami-6dd04501
- cn-north-1:
- HVM64: ami-8e6aa0e3
- EnvironmentToInstanceType:
- development:
- instanceType: t2.micro
- # we want a bigger instance type in production
- production:
- instanceType: t2.small
- Resources:
- EC2Instance:
- Type: AWS::EC2::Instance
- Properties:
- InstanceType: !FindInMap [EnvironmentToInstanceType, !Ref 'EnvironmentName', instanceType]
- # Note we use the pseudo parameter AWS::Region
- ImageId: !FindInMap [AWSRegionArch2AMI, !Ref 'AWS::Region', HVM64]
Add Comment
Please, Sign In to add comment