<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kalil Peixoto on Medium]]></title>
        <description><![CDATA[Stories by Kalil Peixoto on Medium]]></description>
        <link>https://medium.com/@kalilmvp?source=rss-426c0152d35a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9wvljhQvsiu5jF2NzxHD_A.jpeg</url>
            <title>Stories by Kalil Peixoto on Medium</title>
            <link>https://medium.com/@kalilmvp?source=rss-426c0152d35a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 12:03:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kalilmvp/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Automated user migration and management of AWS Identity and Access Management (IAM) resources]]></title>
            <link>https://medium.com/@kalilmvp/automated-user-migration-and-management-of-aws-identity-and-access-management-iam-resources-84bfb5494964?source=rss-426c0152d35a------2</link>
            <guid isPermaLink="false">https://medium.com/p/84bfb5494964</guid>
            <category><![CDATA[iam-user]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Kalil Peixoto]]></dc:creator>
            <pubDate>Tue, 15 Apr 2025 18:02:01 GMT</pubDate>
            <atom:updated>2025-04-15T18:02:01.170Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jdK6qaygPGSPH-ajQu82ow.png" /></figure><p>In this project based on a real-world scenario, I acted as Cloud Specialist with the mission to migrate users in an automated way and manage AWS IAM (Identity and Access Management) resources.</p><p>There were 100 users that needed to be migrated and have MFA (Multi-factor authentication) enabled on their accounts, as this is a security best practice.</p><p>To avoid repetitive and manual tasks in the AWS console, I needed to think about automating the processes.</p><p>Using CloudShell and AWS CLI, i&#39;ve used a shell script to read a .CSV file with all the users from the on-premise environment and using AWS CLI and the API do create user, saved all of them and associated with determined groups. Example of data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*LcNBcT-5MFXuEaWKPIDHcw.png" /></figure><p>The .sh script will read all user data and add it to the aws backend. The commands used from IAM:</p><pre>aws iam create-user --user-name $user<br>aws iam create-login-profile --password-reset-required --user-name $user --password $passwd<br>aws iam add-user-to-group --group-name $group --user-name $user</pre><p>As you can see, the <em>first command </em>will create the user with the username passed on the .csv file ( user.1 / user.2 / user.3 / … ). The <em>second command </em>will <strong>configure the password</strong> for the IAM user. It will configure it define a new password on the first sign-in. And the <em>third command</em> will add the created user for the group specified on the line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AE_ZAX_PBZlbp9eByk9L8g.png" /></figure><p>Every user is associated with a group with predetermined policies, specific for each domain. So the admin group has full access, the network user has the policy to access EC2 services, DBA for the database ( RDS ), staging/intern only read access for some services, this follows the least privilege pattern, to ensure that each group only has the necessary access for each necessity.</p><p>The final layer of security access is the MFA Token. To ensure that the user will only be authorized to work within each service of it&#39;s domain, we configure a policy and associate it with every group, making it mandatory for the user the multi-factor authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7PaEHhQb4unaPXsQh1tBw.png" /></figure><p>You can personalize a policy and associate it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NezDddh7XoUcqP3G0SveMg.png" /></figure><p>That way, even after the user makes it&#39;s first sign-in, change it&#39;s password, it will only receive deny alerts. But after he assigns the MFA ( one easy way is using the Authenticator App ):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*Kjh5ijX9Pn5uKEIYDM6y8w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ELIbJ5hrbPh1kejPBz8H8g.png" /></figure><p>After that, you only needs to sign-out and then sign-in, it will request you with a MFA code and the you will have all the access that was predetermined for your group.</p><p>I hope that this forum helped you with this basic security configuration but yet, really powerful. And how easy it&#39;s to migrate hundreds of users from your on-premise environment to the AWS cloud service.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84bfb5494964" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>