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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Resources": { | |
"BossRole" : { | |
"Type": "AWS::IAM::Role", | |
"Properties": { | |
"RoleName": "BossRole", | |
"AssumeRolePolicyDocument": { | |
"Version" : "2012-10-17", | |
"Statement": [ { |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Resources": { | |
"BarbaraUser" : { | |
"Type": "AWS::IAM::User", | |
"Properties": { | |
"Groups": [ { "Fn::ImportValue": "MFAGroupsStack-BossGroup" } ], | |
"UserName": "barbara" | |
} | |
}, |
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
from __future__ import print_function | |
import json | |
import logging | |
import urllib2 | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
SUCCESS = 'SUCCESS' |
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
{ | |
"Resources": { | |
"SSHServerSecurityGroup" : { | |
"Type" : "AWS::EC2::SecurityGroup", | |
"Properties" : { | |
"VpcId" : "vpc-fdcfd098", | |
"GroupDescription" : "Allow SSH access", | |
"SecurityGroupIngress" : [ | |
{"IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : "<REDACTED>/32"} | |
] |
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
{ | |
"Resources": { | |
"AutoScalingGroup": { | |
"Type": "AWS::AutoScaling::AutoScalingGroup", | |
"Properties": { | |
"AvailabilityZones": { "Fn::GetAZs": "" }, | |
"LaunchConfigurationName": { "Ref": "LaunchConfig" }, | |
"DesiredCapacity": "2", | |
"MinSize": "1", | |
"MaxSize": "4" |
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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Mappings" : { | |
"RegionMap" : { | |
"us-east-1" : { | |
"AMI" : "ami-76f0061f" | |
}, | |
"us-west-1" : { | |
"AMI" : "ami-655a0a20" | |
}, |
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
{ | |
"Resources": { | |
"myS3Bucket": { | |
"Type" : "AWS::S3::Bucket", | |
"Properties" : {}, | |
"DeletionPolicy" : "Retain" | |
}, | |
"myEBSVolume": { | |
"Type":"AWS::EC2::Volume", | |
"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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Master template that includes nested templates", | |
"Parameters": { | |
"DeployBastion": { | |
"Description": "Should a bastion server be deployed?", | |
"Default": "No", | |
"Type": "String", | |
"AllowedValues": ["No", "Yes"] | |
} |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "EC2 Bastion Server", | |
"Parameters": { | |
"VpcId": { | |
"Type": "AWS::EC2::VPC::Id", | |
"Description": "The VPC ID" | |
}, | |
"DeployBastion": { | |
"Description": "Should a bastion server be deployed?", |
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
"MyS3BucketPolicy": { | |
"Type": "AWS::S3::BucketPolicy", | |
"Properties": { | |
"Bucket": { "Ref": "MyS3Bucket" }, | |
"PolicyDocument" : { | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid": "PublicReadAccess", | |
"Effect": "Allow", | |
"Principal": "*", |