This file contains hidden or 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
| ScaleUpPolicy: | |
| Type: AWS::AutoScaling::ScalingPolicy | |
| Properties: | |
| AdjustmentType: ChangeInCapacity | |
| AutoScalingGroupName: !Ref ASG | |
| Cooldown: '1' | |
| ScalingAdjustment: 1 | |
| ScaleDownPolicy: | |
| Type: AWS::AutoScaling::ScalingPolicy |
This file contains hidden or 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
| # Definition of json configuration of AmazonCloudWatchAgent | |
| 02_config-amazon-cloudwatch-agent: | |
| files: | |
| '/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json': | |
| content: !Sub | | |
| { | |
| "metrics": { | |
| "append_dimensions": { | |
| "AutoScalingGroupName": "${!aws:AutoScalingGroupName}", | |
| "ImageId": "${!aws:ImageId}", |
This file contains hidden or 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
| ASGInstanceProfile: | |
| Type: AWS::IAM::InstanceProfile | |
| Properties: | |
| InstanceProfileName: AGInstanceProfile | |
| Roles: | |
| - !Ref ASGRole | |
| ASGRole: | |
| Type: AWS::IAM::Role | |
| Properties: |
This file contains hidden or 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
| ASGLaunchConfiguration: | |
| Type: AWS::AutoScaling::LaunchConfiguration | |
| Properties: | |
| ImageId: !FindInMap | |
| - RegionMap | |
| - !Ref 'AWS::Region' | |
| - HVM64 | |
| InstanceType: t2.micro | |
| KeyName: !Ref SSHKey | |
| LaunchConfigurationName: ASGLaunchConfiguration |
This file contains hidden or 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
| ASG: | |
| Type: AWS::AutoScaling::AutoScalingGroup | |
| Properties: | |
| AvailabilityZones: !GetAZs '' | |
| AutoScalingGroupName: auto-scaling-group | |
| LaunchConfigurationName: !Ref ASGLaunchConfiguration | |
| MaxSize: '5' | |
| MinSize: '1' |
This file contains hidden or 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: | |
| Region: | |
| Type: String | |
| Default: eu-west-1 | |
| AllowedValues: | |
| - eu-west-1 | |
| - eu-west-2 | |
| - eu-west-3 | |
| - eu-central-1 | |
| - us-west-2 |
This file contains hidden or 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: | |
| VPCCidr: | |
| AllowedPattern: '((\d{1,3})\.){3}\d{1,3}/\d{1,2}' | |
| Type: String | |
| Default: 10.0.0.0/16 | |
| Description: Enter the CIDR for your VPC | |
| ... | |
| Resources: | |
| VPC: | |
| Type: AWS::EC2::VPC |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": { | |
| "Effect": "Allow", | |
| "Principal": { "AWS": "arn:aws:iam::123456789012:root" }, | |
| "Action": "sts:AssumeRole" | |
| } | |
| } |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:PutObject" | |
| ], | |
| "Resource": "arn:aws:s3:::demo-lvthillo-bucket/*" | |
| } |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iam:ListRoles", | |
| "sts:AssumeRole" | |
| ], | |
| "Resource": "*" |