Guest User

Untitled

a guest
Jul 21st, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. Parameters:
  2. EnvironmentName:
  3. Description: Environment Name
  4. Type: String
  5. AllowedValues: [development, production]
  6. ConstraintDescription: must be development or production
  7.  
  8. Mappings:
  9. AWSRegionArch2AMI:
  10. us-east-1:
  11. HVM64: ami-6869aa05
  12. us-west-2:
  13. HVM64: ami-7172b611
  14. us-west-1:
  15. HVM64: ami-31490d51
  16. eu-west-1:
  17. HVM64: ami-f9dd458a
  18. eu-central-1:
  19. HVM64: ami-ea26ce85
  20. ap-northeast-1:
  21. HVM64: ami-374db956
  22. ap-northeast-2:
  23. HVM64: ami-2b408b45
  24. ap-southeast-1:
  25. HVM64: ami-a59b49c6
  26. ap-southeast-2:
  27. HVM64: ami-dc361ebf
  28. ap-south-1:
  29. HVM64: ami-ffbdd790
  30. us-east-2:
  31. HVM64: ami-f6035893
  32. sa-east-1:
  33. HVM64: ami-6dd04501
  34. cn-north-1:
  35. HVM64: ami-8e6aa0e3
  36. EnvironmentToInstanceType:
  37. development:
  38. instanceType: t2.micro
  39. # we want a bigger instance type in production
  40. production:
  41. instanceType: t2.small
  42.  
  43. Resources:
  44. EC2Instance:
  45. Type: AWS::EC2::Instance
  46. Properties:
  47. InstanceType: !FindInMap [EnvironmentToInstanceType, !Ref 'EnvironmentName', instanceType]
  48. # Note we use the pseudo parameter AWS::Region
  49. ImageId: !FindInMap [AWSRegionArch2AMI, !Ref 'AWS::Region', HVM64]
Add Comment
Please, Sign In to add comment