Instantly share code, notes, and snippets.

Embed
What would you like to do?
CloudFormation template generated by troposphere.
{
"Outputs": {
"InstanceAccess": {
"Description": "Command to use to SSH to instance",
"Value": {
"Fn::Join": [
"",
[
"ssh -i ",
{
"Ref": "KeyPair"
},
" ubuntu@",
{
"Fn::GetAtt": [
"MyInstance",
"PublicDnsName"
]
}
]
]
}
}
},
"Parameters": {
"KeyPair": {
"Description": "The name of the keypair to use for SSH access",
"Type": "String"
}
},
"Resources": {
"MyInstance": {
"Properties": {
"ImageId": "ami-ef277b86",
"InstanceType": "t1.micro",
"KeyName": {
"Ref": "KeyPair"
},
"SecurityGroups": [
{
"Ref": "MySecurityGroup"
}
]
},
"Type": "AWS::EC2::Instance"
},
"MySecurityGroup": {
"Properties": {
"GroupDescription": "Allow access to MyInstance",
"SecurityGroupIngress": [
{
"CidrIp": "0.0.0.0/0",
"FromPort": 22,
"IpProtocol": "tcp",
"ToPort": 22
}
]
},
"Type": "AWS::EC2::SecurityGroup"
}
}
}
@pas256

This comment has been minimized.

Copy link
Owner Author

pas256 commented Oct 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment