Prerequiste

IAM permissions

Add the following IAM permission policy to your user account to deploy and cleanup this workshop.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "DeployCoreInfrastructure",
            "Effect": "Allow",
            "Action": [
                "cloudformation:*",
                "ec2:*",
                "s3:*",
                "cloudwatch:*",
                "logs:*",
                "sns:*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "ManageEC2InstanceProfileRole",
            "Effect": "Allow",
            "Action": [
                "iam:CreateRole",
                "iam:DeleteRole",
                "iam:PutRolePolicy",
                "iam:DeleteRolePolicy",
                "iam:AttachRolePolicy",
                "iam:DetachRolePolicy",
                "iam:GetRole",
                "iam:ListRoles",
                "iam:CreateInstanceProfile",
                "iam:DeleteInstanceProfile",
                "iam:AddRoleToInstanceProfile",
                "iam:RemoveRoleFromInstanceProfile",
                "iam:GetInstanceProfile"
            ],
            "Resource": "*"
        },
        {
            "Sid": "RestrictPassRoleToEC2Only",
            "Effect": "Allow",
            "Action": "iam:PassRole",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "ec2.amazonaws.com"
                }
            }
        }
    ]
}

Provision resources using CloudFormation

create stack

  • Click Create with new source.

create stack

  • Select and upload the YAML file to create the stack.

create stack

create stack

  • Enter the stack name and email address to receive alarm notifications from Amazon SNS.

create stack

create stack

  • Add tags to the stack.

create stack

create stack

  • After completing the configuration, click Submit and wait for the CloudFormation deployment process to finish.

finish

  • The resources have been successfully created.

finish