Create instance profile

Create instance profile

  1. We will create IAM instance profile for Amazon EC2 instance

    • Access to IAM
    • Select Policies
    • Select Create policy

IAM user

  1. In the step of creating policy, enter the content policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:Get*",
        "s3:List*"
      ],
      "Resources": [
        "arn:aws:s3:::replace-with-your-s3-bucket-name/*",
        "arn:aws:s3:::aws-codedeploy-us-east-2/*",
        "arn:aws:s3:::aws-codedeploy-us-east-1/*",
        "arn:aws:s3:::aws-codedeploy-us-west-1/*",
        "arn:aws:s3:::aws-codedeploy-us-west-2/*",
        "arn:aws:s3:::aws-codedeploy-ca-central-1/*",
        "arn:aws:s3:::aws-codedeploy-eu-west-1/*",
        "arn:aws:s3:::aws-codedeploy-eu-west-2/*",
        "arn:aws:s3:::aws-codedeploy-eu-west-3/*",
        "arn:aws:s3:::aws-codedeploy-eu-central-1/*",
        "arn:aws:s3:::aws-codedeploy-ap-east-1/*",
        "arn:aws:s3:::aws-codedeploy-ap-northeast-1/*",
        "arn:aws:s3:::aws-codedeploy-ap-northeast-2/*",
        "arn:aws:s3:::aws-codedeploy-ap-southeast-1/*",
        "arn:aws:s3:::aws-codedeploy-ap-southeast-2/*",
        "arn:aws:s3:::aws-codedeploy-ap-south-1/*",
        "arn:aws:s3:::aws-codedeploy-sa-east-1/*"
      ]
    }
  ]
}
  • Select Next:Tags

IAM user

  1. Select Next:Review

IAM user

  1. Enter policy and select Create policy

IAM user

  1. Complete policy creation.

IAM user

  1. Next we will create a role

    • Access to IAM
    • Select Roles
    • Select Create role

IAM user

  1. Select AWS service as EC2. Select Next

IAM user

  1. Find and select the newly created policy. Select Next

IAM user

  1. Enter the name role

IAM user

  1. Select Create role

IAM user

  1. Complete role creation.

IAM user