JSON Viewer & Editor: Repair, Fix, and Beautify JSON Online
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation Template Example",
"Parameters": {
"InstanceType": {
"Type": "String",
"Default": "t2.micro",
"AllowedValues": [
"t2.micro",
"t2.small",
"t2.medium",
"t2.large"
],
"Description": "EC2 instance type"
},
"KeyName": {
"Type": "AWS::EC2::KeyPair::KeyName",
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances"
}
},
"Resources": {
"MyEC2Instance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"InstanceType": {
"Ref": "InstanceType"
},
"KeyName": {
"Ref": "KeyName"
},
"ImageId": "ami-0c55b159cbfafe1f0",
"Tags": [
{
"Key": "Name",
"Value": "MyEC2Instance"
}
]
}
},
"MyS3Bucket": {
"Type": "AWS::S3::Bucket",
"Properties": {
"BucketName": "my-s3-bucket-example"
}
},
"MyVPC": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"Tags": [
{
"Key": "Name",
"Value": "MyVPC"
}
]
}
},
"MySubnet": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"VpcId": {
"Ref": "MyVPC"
},
"CidrBlock": "10.0.1.0/24",
"AvailabilityZone": "us-west-2a",
"Tags": [
{
"Key": "Name",
"Value": "MySubnet"
}
]
}
}
},
"Outputs": {
"InstanceId": {
"Description": "The Instance ID",
"Value": {
"Ref": "MyEC2Instance"
}
},
"BucketName": {
"Description": "The S3 bucket name",
"Value": {
"Ref": "MyS3Bucket"
}
}
}
}