Parameters, Mappings, and !Refs
---
Parameters:
ParameterTest:
Type: String
Description: Enter t2.micro, m1.small, or m1.large. Default is t2.micro.
Resources:
BasicParameter:
Type: AWS::SSM::Parameter
Properties:
Name: AJS-testPara
Type: String
Value: !Ref ParameterTest
Description: SSM Parameter test.
Tags:
Environment: DEV
---
Parameters:
Environment:
Description: Environment parameters
Type: String
Default: Development
AllowedValues:
- Production
- Development
Mappings:
AMIRegions_Map:
eu-west-1:
Development: ami-123456
Production: ami-654321
eu-west-2:
Development: ami-123321
Production: ami654456
us-east-1:
Development: ami-321123
Production: ami456456
Resources:
WebEC2Instance:
Type: AWS::EC2::Instance
Properties:
ImageId: !FindInMap [AMIRegions_Map, !Ref "AWS::Region", !Ref Environment]
InstanceType: t2.micro