# Day 18 : Create Read-Only IAM Policy for EC2 Console Access

Welcome back to Day 18. Today, we will learn how to create a read-only IAM policy for accessing the EC2 console. You need to create a read-only IAM policy for access to the EC2 console with the name **iampolicy\_kareem**. In this lab you need to create customer-managed policy.

### **What an IAM Policy Does**

It tells AWS:

* **Who** (users, roles, groups, services)
    
* **Can do WHAT** (actions like `s3:PutObject`, `ec2:StartInstances`)
    
* **On WHICH resources** (ARNs like `arn:aws:s3:::my-bucket/*`)
    
* **Under what CONDITIONS** (optional, using `Condition` block, like IP address restrictions)
    

### **Types of IAM Policies**

1. **Identity-based policies**  
    Attached to IAM **users, groups, or roles**.
    

1. **Resource-based policies**  
    Attached to AWS **resources** (S3 bucket policy, SNS topic policy).
    
2. **AWS-managed policies**  
    Predefined by AWS (e.g., `AmazonEC2FullAccess`).
    
3. **Customer-managed policies**  
    Policies you create.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442232445/022eb8a8-6a1c-4db4-a925-1fd683ea7b15.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442278111/1183a402-c460-45b5-b504-1a429008b784.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442311352/b8a1b435-53ab-437c-b2e1-af3a57df8f1f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442354635/ae4cbd37-515e-4dd4-907b-523e439cea0a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442531551/df2e826b-a872-4b9c-8181-39a6c1f5ce8c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442551283/87d028bb-8cdc-4a52-9b0a-6fad12dd4e1d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442587591/c0940c6a-3842-4155-b594-f59bbc616bea.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442602584/cc4bf314-0a8c-4399-87da-f4d183291433.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442636308/0e5e52ea-d10a-4a8f-a6e0-bb5f5c1c0f0d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442661311/d4bcf845-85e7-49dc-ba3f-12d558316fef.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1765442674655/9205dedc-c032-4261-a6fd-563133f63cc1.png align="center")

Congratulations you did it. It looks good. This lab was successfully completed without any errors. See you in day 19. If you have any issues please let me know I will be happy to assist you. Stay tuned and learn together. If you find my article useful, please kindly like and share it.
