Create an AWS IAM user with access to a single S3 bucket

If you need to create an S3 bucket and give access to a single user, here is the custom policy to get that done. You add this to a users you have created in IAM by going to the \`Permissions\` tab for that user and selecting \`Attach User Policy\`. Choose the \`Custom Policy\` option and paste the following. You will want to customize the “my-bucket” parts to match the name of your bucket.
{
  "Statement": [
    {
      "Action": [
        "s3:ListAllMyBuckets"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::*"
    },
    {
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"]
    }
  ]
}