How to Create and Attach IAM Policies in AWS

Arish AhmadArish Ahmad
2 min read

Introduction

You manage access in AWS by creating policies and attaching them to IAM identities (users, groups of users, or roles) or AWS resources. A policy is an object in AWS that, when associated with an identity or resource, defines their permissions. AWS evaluates these policies when an IAM principal (user or role) makes a request. Permissions in the policies determine whether the request is allowed or denied. Most policies are stored in AWS as JSON documents. AWS supports six types of policies: identity-based policies, resource-based policies, permissions boundaries, Organizations SCPs, ACLs, and session policies.

For more details visit.

Create IAM Policies

  1. Open the AWS Management Console and navigate to the Identity and Access Management (IAM).

  2. Click on Policies from the left navigation panel.

  3. Click Create policy.

  4. Choose S3 from the down under Service.

  5. Click All list actions under Access level.

  6. Select All under Resources.

  7. Click Next.

  8. Write a suitable policy name.

  9. Click Create policy.

Creating and attaching policy with an IAM user

  1. Click on Users from the left navigation panel.

  2. Click Create user.

  3. Write a suitable user name.

  4. Check Provide user access to the AWS Management Console.

  5. Select I want to create an IAM user.

  6. Click Custom password and type a suitable password.

  7. Uncheck Users must create a new password at next sign-in for now.

  8. Click Next.

  9. Select Attach policies directly.

  10. Search and select the newly created policy.

  11. Click Next -> Create user.

  12. Create an S3 bucket.

  13. Login as an IAM user with newly created credentials.

  14. The S3 bucket can be viewed by this IAM user.

0
Subscribe to my newsletter

Read articles from Arish Ahmad directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Arish Ahmad
Arish Ahmad

Final-year BTech student specializing in software development. Completed a Flutter internship and amassed three years of project experience, crafting Threads clone, Stream Arbiter, Ticketify, and Google Docs. Proficient in C++, having successfully solved 250+ LeetCode questions.