<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[AWS S3 Hands-On: Creating an IAM User, Configuring Permissions, and Uploading Files Using AWS CLI]]></title><description><![CDATA[Hands-on AWS Cloud and DevOps tutorials, real-world projects, Linux, Docker, CI/CD, and cloud infrastructure guides for aspiring DevOps engineers.]]></description><link>https://ujjwaldevops.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/69d246de40c9cabf44cb180d/e4b0420f-9021-4da6-8816-bae2a6f77184.png</url><title>AWS S3 Hands-On: Creating an IAM User, Configuring Permissions, and Uploading Files Using AWS CLI</title><link>https://ujjwaldevops.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 16:39:44 GMT</lastBuildDate><atom:link href="https://ujjwaldevops.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[AWS S3 Hands-On: Creating an IAM User, Configuring Permissions, and Uploading Files Using AWS CLI]]></title><description><![CDATA[Introduction
Amazon S3 (Simple Storage Service) is an object storage service provided by AWS. It allows us to store and retrieve files such as documents, images, videos, backups, and application artif]]></description><link>https://ujjwaldevops.hashnode.dev/aws-s3-hands-on-creating-an-iam-user-configuring-permissions-and-uploading-files-using-aws-cli</link><guid isPermaLink="true">https://ujjwaldevops.hashnode.dev/aws-s3-hands-on-creating-an-iam-user-configuring-permissions-and-uploading-files-using-aws-cli</guid><category><![CDATA[AWS]]></category><category><![CDATA[iam role in aws]]></category><category><![CDATA[Amazon S3]]></category><category><![CDATA[aws cli]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Cloud]]></category><dc:creator><![CDATA[Ujjwal Mishra]]></dc:creator><pubDate>Sun, 13 Sep 2026 19:55:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/010812f4-9114-431f-84cb-e4bd0204ae75.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2>
<p>Amazon S3 (Simple Storage Service) is an object storage service provided by AWS. It allows us to store and retrieve files such as documents, images, videos, backups, and application artifacts.</p>
<p>In this hands-on project, I configured an IAM user, created an S3 bucket, assigned permissions, and used the AWS CLI from my MacBook to upload and download a PowerPoint file.</p>
<p>This practical exercise helped me understand how IAM authentication, authorization, S3 bucket permissions, and AWS CLI work together.</p>
<h2>What I Built</h2>
<p>The workflow for this project was:</p>
<ol>
<li>Created an IAM user for AWS CLI access.</li>
<li>Created an IAM group and configured permissions.</li>
<li>Attached an S3 access policy to the group.</li>
<li>Created an S3 bucket.</li>
<li>Configured AWS CLI on my MacBook.</li>
<li>Uploaded a PowerPoint file to the S3 bucket.</li>
<li>Downloaded the file from S3 using the AWS CLI.</li>
<li>Tested permissions using a custom least-privilege policy.</li>
</ol>
<h2>Step 1: Create an IAM User</h2>
<p>To interact with AWS services using the AWS CLI, I first created a dedicated IAM user.</p>
<p>I created the IAM user with the following username:</p>
<p><code>DevOps-Learners</code></p>
<p>This user will be used to access AWS services through the AWS CLI.</p>
<p><img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/e8634069-8220-4102-bfec-267e7d593d25.png" alt="Screenshot 2026-09-14 at 12.20.42 AM" />
<em>IAM user DevOps-Learners created in the AWS Management Console.</em></p>
<h2>Step 2: Create an IAM User Group</h2>
<p>After creating the IAM user, I created a user group named <code>DevOps-Team</code>.</p>
<p>IAM groups help manage permissions for multiple users. Instead of attaching permissions individually to each user, policies can be attached to the group and inherited by its members.
<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/94209e2e-88cb-43a3-b460-de0b5a84bbd3.png" alt="Screenshot 2026-09-14 at 12.31.30 AM" /></p>
<p><em>IAM user group DevOps-Team created successfully in AWS IAM.</em></p>
<h2>Step 3: Attach Permission Policies</h2>
<p>After creating the IAM group, I attached permission policies to the <code>DevOps-Team</code> group.</p>
<p>The group was configured with the following AWS managed policies:</p>
<ul>
<li><code>AmazonEC2ReadOnlyAccess</code></li>
<li><code>AmazonRDSFullAccess</code></li>
<li><code>AmazonS3FullAccess</code></li>
</ul>
<p>These policies define which AWS resources and actions the group members can access.
<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/d81c9d7e-584e-4975-b85c-5487e31727b2.png" alt="Screenshot 2026-09-14 at 12.34.12 AM" />
<em>Permission policies attached to the DevOps-Team IAM group.</em></p>
<h2>Step 4: Create an S3 Bucket</h2>
<p>Next, I created an Amazon S3 bucket to store and manage my files.</p>
<p>I used the following bucket name:</p>
<p><code>dev-ops-ujju</code></p>
<p>The bucket was created in the <code>ap-south-1</code> AWS Region (Mumbai).
<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/a873afdc-55a3-4201-99ed-64eda9d85024.png" alt="Screenshot 2026-09-14 at 12.37.09 AM" />
<em>S3 bucket dev-ops-ujju created in the AWS Management Console.</em></p>
<h2>Step 5: Configure AWS CLI</h2>
<p>After creating the S3 bucket, I configured the AWS CLI on my MacBook.</p>
<p>First, I verified that the AWS CLI was installed successfully:</p>
<pre><code class="language-bash">aws --version
</code></pre>
<p>The command confirmed that the AWS CLI was installed successfully.</p>
<p>Next, I configured the AWS CLI using:</p>
<pre><code class="language-bash">aws configure
</code></pre>
<p>This command prompted me to enter the AWS Access Key ID, Secret Access Key, default AWS Region, and output format.</p>
<h2>Step 6: Verify AWS CLI Authentication</h2>
<p>After configuring the AWS CLI, I verified that my IAM user was correctly authenticated.</p>
<p>I used the following command:</p>
<pre><code class="language-bash">aws sts get-caller-identity
</code></pre>
<p>This command returned the details of the IAM identity currently being used by the AWS CLI.
<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/b2349b78-f9eb-44f2-8223-d183524261f9.png" alt="Screenshot 2026-09-14 at 12.48.20 AM" />
<em>AWS CLI authentication verified using AWS STS.</em></p>
<h2>Step 7: List S3 Buckets Using AWS CLI</h2>
<p>After verifying my AWS identity, I checked whether the AWS CLI could access my S3 resources.</p>
<p>I used the following command to list all S3 buckets available to my account:</p>
<pre><code class="language-bash">aws s3 ls
</code></pre>
<p>The command displayed the S3 buckets that my IAM user was permitted to access.<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/e44bf552-9f65-40b5-8e62-b78475497778.png" alt="Screenshot 2026-09-14 at 12.51.50 AM" />
<em>Listing S3 buckets using the AWS CLI.</em></p>
<h2>Step 8: Check the S3 Bucket Contents</h2>
<p>Next, I checked the contents of my specific S3 bucket using the AWS CLI.</p>
<p>I used the following command:</p>
<pre><code class="language-bash">aws s3 ls s3://dev-ops-ujju/
</code></pre>
<p>This command displayed the files and folders stored inside the <code>dev-ops-ujju</code> bucket.
<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/d3f86591-3004-4cae-bdad-0a76c81977c3.png" alt="Screenshot 2026-09-14 at 12.56.40 AM" />
<em>Checking the contents of the dev-ops-ujju S3 bucket using AWS CLI.</em></p>
<h2>Step 9: Upload a File to the S3 Bucket</h2>
<p>After confirming that the bucket was accessible, I uploaded a PowerPoint file to the S3 bucket.</p>
<p>The file I uploaded was:</p>
<p><code>EduTech_Review_1_Abstract_Aligned.pptx</code></p>
<p>I used the following AWS CLI command:</p>
<pre><code class="language-bash">aws s3 cp EduTech_Review_1_Abstract_Aligned.pptx s3://dev-ops-ujju/
</code></pre>
<p>The command copied the file from my local machine to the S3 bucket.
<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/b8f19928-392d-44ae-bd9c-2334fff8be55.png" alt="Screenshot 2026-09-14 at 1.04.43 AM" />
<em>Uploading a PowerPoint file to Amazon S3 using AWS CLI.</em></p>
<h2>Step 10: Download the File from S3</h2>
<p>After uploading the file, I downloaded it from the S3 bucket to my local <code>Downloads</code> directory.</p>
<p>I used the following command:</p>
<pre><code class="language-bash">aws s3 cp s3://dev-ops-ujju/EduTech_Review_1_Abstract_Aligned.pptx ~/Downloads/
</code></pre>
<p>The AWS CLI successfully downloaded the file from Amazon S3 to my local machine.
<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/977641bc-7509-4de8-8214-12ab6048c819.png" alt="Screenshot 2026-09-14 at 1.07.08 AM" />
<em>Downloading the PowerPoint file from Amazon S3 using AWS CLI.</em></p>
<h2>Step 11: Troubleshooting S3 Access</h2>
<p>While testing the S3 commands, I initially encountered an <code>AccessDenied</code> error when trying to list all S3 buckets.</p>
<p>The error indicated that the IAM user was not authorized to perform the <code>s3:ListAllMyBuckets</code> operation.</p>
<p>I reviewed the IAM permissions and continued testing access to the specific S3 bucket.
<img src="https://cdn.hashnode.com/uploads/covers/69d246de40c9cabf44cb180d/31c3f7ef-94fb-44ce-92ba-d7de8f0054e4.png" alt="Screenshot 2026-09-14 at 1.12.52 AM" />
<em>AccessDenied error encountered while listing S3 buckets using AWS CLI.</em></p>
<h2>Conclusion</h2>
<p>In this hands-on project, I learned how to create an IAM user and group, configure permissions, and access Amazon S3 using the AWS CLI.</p>
<p>I successfully listed the S3 bucket, uploaded a PowerPoint file, and downloaded it to my local machine.</p>
<p>This project helped me understand IAM permissions, S3 bucket access, AWS CLI commands, and the importance of troubleshooting permission-related errors.</p>
<p>The next step is to improve the policy by following the principle of least privilege and granting only the permissions required for a specific task.</p>
]]></content:encoded></item></channel></rss>