Skip to content

Instantly share code, notes, and snippets.

@lvthillo
Last active June 7, 2019 17:02
Show Gist options
  • Save lvthillo/1591d8b190c1dd1d138db57bd3bd2c6d to your computer and use it in GitHub Desktop.
Save lvthillo/1591d8b190c1dd1d138db57bd3bd2c6d to your computer and use it in GitHub Desktop.
LaunchConfigurationReferences
ASGInstanceProfile:
Type: AWS::IAM::InstanceProfile
Properties:
InstanceProfileName: AGInstanceProfile
Roles:
- !Ref ASGRole
ASGRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- ec2.amazonaws.com
Action:
- sts:AssumeRole
Path: '/'
ManagedPolicyArns:
- arn:aws:iam::aws:policy/CloudWatchAgentAdminPolicy
RoleName: ASGRole
ASGSG:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Security Group for Bastion Host to allow SSH
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 22
ToPort: 22
CidrIp: 0.0.0.0/0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment