<?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 Alexandre Okubo on Medium]]></title>
        <description><![CDATA[Stories by Alexandre Okubo on Medium]]></description>
        <link>https://medium.com/@okubobarros?source=rss-2aa8328d3e54------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7joNHmCa5KVAjJubvLomLw.jpeg</url>
            <title>Stories by Alexandre Okubo on Medium</title>
            <link>https://medium.com/@okubobarros?source=rss-2aa8328d3e54------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:36:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@okubobarros/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[Implementation of an E-Commerce System on AWS in an automated way using Terraform and Ansible]]></title>
            <link>https://medium.com/@okubobarros/implementation-of-an-e-commerce-system-on-aws-in-an-automated-way-using-terraform-and-ansible-ce62c7b9946e?source=rss-2aa8328d3e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce62c7b9946e</guid>
            <dc:creator><![CDATA[Alexandre Okubo]]></dc:creator>
            <pubDate>Fri, 10 Feb 2023 01:00:26 GMT</pubDate>
            <atom:updated>2023-02-10T01:00:26.554Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hHze1nPd-X68cC3y.png" /></figure><p><strong>Project description:</strong></p><p>In another project based on a real-world scenario, I worked as Cloud Engineer using DevOps, where I created and implemented an e-Commerce MVP (Minimum Viable Product) on AWS in less than 2 hours and in an automated way using Terraform and Ansible (Infrastructure as Code — IaC).</p><p>I provisioned the infrastructure in an automated way using Terraform and Ansible to automate the configuration management process, software installation, and package management of the EC2 instance. I also used Magento, PHP, MySQL, and Redis to complete this project.</p><p>I also used Magento, PHP, MySQL, and Redis to complete this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CXXmSScHnLmXykCc.png" /><figcaption>Soluiton Architecture</figcaption></figure><p>We divided the work into two parts:</p><blockquote>Part 1: MVP implementation for e-commerce: using Terraform to provision an EC2 instance and a security group in AWS.<br>Part 2: Installing Ansible on EC2 and deploy Magento and customize the ecommerce website.</blockquote><h4>Let’s get it started!</h4><h4>Part 1: Open AWS Cloud Shell and Install Terraform to provision an EC2 instance and a security group</h4><blockquote>Create a Free Magento account:</blockquote><pre>https://marketplace.magento.com/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*htnIyfhM4euy8L9k5RGzsg.png" /></figure><blockquote>Create and save key pair (Public | Private) of your Magento account</blockquote><blockquote><em>my profile =&gt; Marketplace =&gt; Access Keys</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HsuVJAO3BWDx7pTSEpImzQ.png" /></figure><blockquote><em>Your User | My Profile | MarketPlace | Access Key | Magento 2</em></blockquote><p>Example:<br>Public Key: b2041f02509330fbbb96312b29995cb6<br>Private Key: 7be7c69e79bd798a2a8a6b00983a5b72</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dzwptT08bO8EiWTdIDMczQ.png" /></figure><blockquote><em>Open AWS Cloud Shell</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pb83rlUuHx477pD1w1gRw.png" /></figure><blockquote><em>Installing Terraform in AWS Cloud Shell</em></blockquote><pre>sudo yum install -y yum-utils<br>sudo yum-config-manager --add-repo<br>https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo<br>sudo yum -y install terraform</pre><blockquote>Open <em>AWS CloudShell</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*IQFPQOjakqlBpcs__08RWQ.png" /></figure><blockquote>Click on Paste</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDCoRIodTPLFJUsWA68BDw.png" /></figure><blockquote>Enter</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4DHKBtPo1ahTYFfcNL8Drg.png" /></figure><blockquote>Complete</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NUeZUq7gcyRxAZsS9pP3_A.png" /></figure><blockquote>Download and unzip Terraform files in AWS Cloud Shell</blockquote><pre>mkdir final_project<br>cd final_project</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*Bak7h7SXZNV7-9l1H-e6kQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W5nkJUeEYdSAR0o581JfPw.png" /></figure><pre>wget https://bootcamp-aws.s3.amazonaws.com/projeto-final-terraform.zip<br>unzip projeto-final-terraform.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*lCJmCH5U7Xv44aeOK3Ok-A.png" /></figure><pre>rm -rf projeto-final-terraform.zip<br>cd terraform<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*vMsxj5V0IAEoLRBBhog1Vw.png" /></figure><blockquote>Edit Terraform files | variables</blockquote><pre>vi main.tf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*pg6RUFXACkpd46o86Qq39A.png" /></figure><blockquote>Press the bottom Insert</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*eRQFiVIXZozGMN25IMv3mg.png" /></figure><blockquote>Change the VPC-id: default VPC</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Q-VXcSWMZeXwdX6lg8jGQ.png" /></figure><blockquote>Insert the vpc info on cloud shell</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*klmTNn4MqJ85HZCIClL5YQ.png" /></figure><blockquote>SSH Key: sshkey1</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*LD6PGU2I4-b0FS72ccqM6A.png" /></figure><blockquote>Instance_type = “t3.medium ” [ It’s not Free: t3.medium $$0.0416 / hour ]</blockquote><p><a href="https://aws.amazon.com/ec2/pricing/on-demand/">EC2 On-Demand Instance Pricing</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*FqljHRPG0b23QqP5-FUBWg.png" /></figure><blockquote>Saving changes:</blockquote><blockquote>(“Esc” | “:x”)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*Q3I4JZoBQDJfKC0jJhLisQ.png" /></figure><blockquote>Running Terraform</blockquote><pre>terraform init</pre><blockquote>Confirmation: Terraform has been successfully initialized</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*_ybwwkYqGS800HsLx9hqRQ.png" /></figure><pre>terraform plan</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*Ffv1PE3WOiaD9Yts2N114A.png" /></figure><blockquote>Plan: 2 to add</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*usoKtEeLtSNQ_zVkwi57Qg.png" /></figure><pre>terrraform apply</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*OspmDkXX9z-Z2HmvauNx4A.png" /></figure><blockquote>Need to confirm: yes</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*Z7-cVsO-ZrowXu2s6yZerA.png" /></figure><blockquote>Start creating process</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*Yz-rSFv1NAStzbUHO8RKpw.png" /></figure><blockquote>Instance ecommerce1: running</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4fG6HTrVn4-jbcTXHyonAw.png" /></figure><blockquote>ls | new file was created: ‘terraform.tfstate’</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*iqenRG58qXEUXa_A6OOdeQ.png" /></figure><h4>Part 2: Connect to the EC2 instance via SSH and install Ansible to deploy Magento and customize the e-commerce website</h4><ul><li>Connecting to the EC2 instance via SSH using ‘GitBash’</li><li>Find the folder where is the key.pem</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*1XTrRiJj-8TnPGHKMOwTKQ.png" /></figure><pre>ssh -i sshkey1.pem ec2-user@ec2-public-ip</pre><blockquote>On gitbash, past the public ip</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*3TZ8NzEDY1ESdHFIRljuPA.png" /></figure><blockquote>Access confirmed: yes</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*uE80Dan_Q2VfiUyPQN6Sew.png" /></figure><blockquote>Installing Ansible on EC2</blockquote><blockquote>On git bash</blockquote><pre>sudo yum-config-manager - enable epel</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*JXQZTEEQ7TAbyXvIDX9J5w.png" /></figure><pre>sudo yum install ansible -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6S7pY5bFnu4RuSr3MKPuYQ.png" /></figure><blockquote><em>Download the Ansible playbooks and Unzip the configuration file</em></blockquote><pre>wget https://bootcamp-aws.s3.amazonaws.com/projeto-final-ansible-magento2.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uyzpoheJXIO71zLW0AO9_g.png" /></figure><pre>unzip project-final-ansible-magento2.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*kaZmB6ul7zNktc3RgDswnA.png" /></figure><blockquote>Remove folder</blockquote><pre>rm -rf projeto-final-ansible-magento2.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*vwC0n30RAggCuEae5MyiGA.png" /></figure><blockquote><em>Edit the parameters</em></blockquote><pre>cd ansible-magento2/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*Ilzv4Us85_isitfwJhEXwg.png" /></figure><pre>ls group_vars</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*5LBAbrlZNSeE8kpCV20hxQ.png" /></figure><pre>vi group_vars/all.yml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4wxVgCxDgz7gRJIwonwQMw.png" /></figure><blockquote>In Magento, click INSERT</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QGsLsvwDiTz58Dqx8gFpMw.png" /></figure><blockquote>4 changes:</blockquote><blockquote><em>a) Magento_domain: ec2-public-ip</em></blockquote><blockquote><em>ec2-public-ip =&gt; </em><a href="http://https//44.192.122.170"><em>HTTPS://44.192.122.170</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*10sXjwphG3dBvkFVsufo8w.png" /></figure><blockquote><em>b) Server_hostname: ec2-public-ip</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2D0xJ1p7wwRvRuvMR-7efg.png" /></figure><blockquote><em>c) Replace the keys repo_api_key and repo_secret_key (Magento info)</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnibYDI6vAj8bdG0b1t89w.png" /></figure><blockquote>ESC :x para sair do modo insert</blockquote><pre>Save the file (“Esc” | “:x”)</pre><blockquote>Running Ansible to deploy e-commerce tools</blockquote><pre>ansible-playbook -i hosts.yml ansible-magento2.yml -k -vvv — become</pre><blockquote>Start the installation process: no SSH just sign in</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dg5rtCTI2H3GGRLqtUlQEQ.png" /></figure><blockquote>Waiting few minutes</blockquote><blockquote>create a new folder on desktop: aws-mod07</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*qYofHdYWIaF9WLK1LCrEVQ.png" /></figure><blockquote>Download the files for this folder</blockquote><pre>https://aws-mod7-pf.s3.amazonaws.com/projeto-final-ansible-magento2.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*UNxT-QwY6r1pef62GSAmkQ.png" /></figure><blockquote>Unzip folder on aws-mod07 folder</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6-DrtUr-IFxXYzJd1BS3w.png" /></figure><blockquote>Ansible magento 2 files</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*wdZNyEB9FHHYJgbDNtydUA.png" /></figure><blockquote>Open the folder at Visual Studio Code</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*PwT8wkVdtR38QXSCY1YwcQ.png" /></figure><blockquote>Ansible-mangento2.yml file</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nsUwxYisnJdZmVTo4Lw8jg.png" /></figure><blockquote><em>Pause to see the Magento finishing install</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*iTeowBm07Ux7Y8VuFJDhFg.png" /></figure><blockquote>Testing E-commerce Website:</blockquote><blockquote><em>Copy and Paste the EC2 Public IP into a browser</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/164/1*ViQ4PU1v9QowmrrZ7loCLQ.png" /></figure><blockquote><em>Test locally: acces sec2 public ip</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R0Y2Hrs3uSs6-VBhA0SHpg.png" /></figure><blockquote><em>Setting up the e-commerce:</em></blockquote><p>• http://&lt;EC2_PUBLIC_IP&gt;/securelocation</p><p>User: admin<br>Password: Strong123Password#</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQ4rfMvgz2arU43Eb3KLdw.png" /></figure><blockquote><em>E-commerce page: dashboard magento admin</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wkg5_DQZCiM4EYRe1NiUlw.png" /></figure><blockquote><em>Download e-commerce files (images):</em></blockquote><ul><li><a href="https://tcb-bootcamps.s3.amazonaws.com/bootcamp-aws/en/final-project-images.zip">https://tcb-bootcamps.s3.amazonaws.com/bootcamp-aws/en/final-project-images.zip</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*ElMnlB58iH7-WAViHBruSw.png" /></figure><blockquote><em>save the files =&gt; final-project-images.zip</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*sIJonBizNPpmqi83gtIDfA.png" /></figure><blockquote><em>unzip the file</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*-3GA1E4Np36OTB7RVLa24w.png" /></figure><blockquote><em>Content &gt; Configuration &gt; Default Store View &gt; Edit</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJ5aZLrYVpGjPdGdYqZ0Yw.png" /></figure><blockquote><em>‘HTML Head’ | Default page title: The Cloud Bootcamp Store</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPXNQtzT5dhUdd_Dy58F3Q.png" /></figure><blockquote><em>‘Header’ &gt; Logo image: The Cloud Bootcamp logo from images</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LKxquZUn9MFzWW_CtTyIPw.png" /></figure><blockquote><em>Select the images</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekYjmCbcdAyxOB07Bv8_2g.png" /></figure><blockquote>‘Header’ &gt; Welcome text: Welcome to The Cloud Bootcamp Store!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mxX8eEdRru1KUl5QdrTnBw.png" /></figure><blockquote>SaveConfiguration!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tnQKhFWawRu0NITcSXV06Q.png" /></figure><blockquote>Saved configuration</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bhksv_W2aesctl64y1DwDg.png" /></figure><blockquote>Catalog &gt; Products &gt; Add product &gt; The Cloud Bootcamp T-Shirt</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ut42SMVCiCD09ghjUTV2gA.png" /></figure><blockquote>Add product: The Cloud Bootcamp T-Shirt</blockquote><blockquote>— — Price: 80<br> — — Quantity: 100</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mC7aRbQla_LWSj7dwGb1Qg.png" /></figure><blockquote>Scroll down<br>Images And Videos &gt; Add images</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wOTebwbn8fIsaoTcs6qemQ.png" /></figure><blockquote>Select the photos for the ecommerce</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*npmODRfP_G6z0DsDQJXMiA.png" /></figure><blockquote>Save</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YLF0hL2lpKGIXgV_oX1RUg.png" /></figure><blockquote>Confirmation: saved the product</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*06ZGcRrdBZEpSBTvrIPeGA.png" /></figure><blockquote>— Content &gt; Pages &gt; Home Pages &gt; Select | Edit</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B0CZmczuY-q8lT4U4GeRUw.png" /></figure><blockquote>Click Content &gt; Erase content</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9YBu1pfjgQni6m49wTYRVQ.png" /></figure><blockquote>Erase</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PhNJnrDHtcRDIY-5exgBLg.png" /></figure><blockquote>Insert Widget &gt; Widget type: Catalog New Products List &gt; Insert Widget</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5S9k7HGQ7fOyLiKk4KODOw.png" /></figure><blockquote>Insert Widget Type: Catalog New Products List</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vVMjMmw1caUNuU4gZfHHw.png" /></figure><blockquote>Save</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DCkviQrLKgVhUZO_vaTBcg.png" /></figure><blockquote>Click on Admin | customer view</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1YygzA3XlPbLR6aHi5y4Cg.png" /></figure><blockquote><em>Congratulations!!! E-commerce successfully implemented!!!</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ifqf8Zgp-cksnl2J1Rh9Xg.png" /></figure><blockquote><em>- Remove implemented features:</em></blockquote><p>- If necessary, re-install Terraform</p><pre>sudo yum install -y yum-utils<br>sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo<br>sudo yum -y install terraform</pre><blockquote><em>- Access the folder from where we ran Terraform in part 1:</em></blockquote><pre>cd ~/final_project/terraform/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X7OtOgd0zm8BkOnuIGHiqg.png" /></figure><pre>terraform destroy</pre><blockquote>2 resources to destroy</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*mZQZGEoufNpiK1bqeGmtWA.png" /></figure><blockquote>yes</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*N9fChDIOkjzE8DWYtWFrqQ.png" /></figure><blockquote>update instances ec2: Terminated</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ixLugt4IuWLWm4PnMJ3D-A.png" /></figure><p>- Links</p><p>Ansible Documentation: <a href="https://docs.ansible.com/ansible-core/devel/user_guide/index.html">https://docs.ansible.com/ansible-core/devel/user_guide/index.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce62c7b9946e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-step for preparing an executive presentation of infrastructure costs for a SAP migration…]]></title>
            <link>https://medium.com/@okubobarros/step-by-step-for-preparing-an-executive-presentation-of-infrastructure-costs-for-a-sap-migration-5563716b2f40?source=rss-2aa8328d3e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/5563716b2f40</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[amazon-price-calculator]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Alexandre Okubo]]></dc:creator>
            <pubDate>Fri, 27 Jan 2023 22:25:44 GMT</pubDate>
            <atom:updated>2023-03-01T19:37:07.116Z</atom:updated>
            <content:encoded><![CDATA[<h3>Step-by-step for preparing an executive presentation of infrastructure costs for a SAP migration project from on-premises to AWS cloud</h3><h3>AWS Pricing &amp; Billing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WGByiunNw6me6uU-.png" /></figure><p><strong>Project description:</strong> In this project based on a real-world scenario, I acted as a Cloud Architect. I created an executive presentation of infrastructure costs for a SAP migration project from On-Premises to AWS.</p><p>SAP workloads were running in a corporate DataCenter with the environment divided into Production, Quality Assurance — QA, and Development/Test layers.</p><p>My mission was to estimate the migration costs to AWS, considering that this infrastructure <strong>will run on AWS for at least the next 3 years</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rws2N1i5Zkiu6aIGTK3ckA.png" /></figure><p>Corporate Data Center (on-premises):</p><h4>Production 1</h4><ul><li>5 application serves (8/16)</li><li>1 LB — load balancer</li><li>2 TB Block Storage</li><li>1 TB NFS Storage</li></ul><h4>Stage 1</h4><ul><li>3 application serves(4/8)</li><li>1 LB</li><li>1 TB Block Storage</li><li>500 GB NFS Storage</li></ul><h4>Development /Testing 1</h4><ul><li>2 application serves (4/8)</li><li>1 LB</li><li>500 GB Block Storage</li><li>250 GB NFS Storage</li></ul><h4>Production 2</h4><ul><li>2 Oracle DBs(38/156)</li><li>3 TB Storage</li></ul><h4>Stage 2</h4><ul><li>2 Oracle DBs(16/64)</li><li>3 TB Storage</li></ul><h4>Development/Testing 2</h4><ul><li>2 Oracle DBs (8/30)</li><li>1 TB Storage</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xpeDssZErYuBJ9_0YEhZxQ.png" /></figure><p>PART 1:</p><blockquote>Production 1</blockquote><blockquote>Stage 1</blockquote><blockquote>Development /Testing 1</blockquote><blockquote>Production 1: 5 Application Servers (8 vCPUc 16 GiB memory)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ECg5ArpJeJCuUAGLOYSHUg.png" /><figcaption>sizing on-premises</figcaption></figure><blockquote>find for EC2</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrXEcy_auqtKL-hWUkB6eA.png" /></figure><blockquote>5 x 8 vCPUc 16 GiB memory</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZZSI6DBDkZvW5nC-_cGUzg.png" /></figure><blockquote>saving plan 3 years</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZepXFJhTcTQ8vN55__DHbQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*BHqyN9BOFTL8xTKPmKZQyQ.png" /></figure><h3>Production 1: 2 TB Block Storage</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYhIx10AE-GZfG8KjYkEJw.png" /></figure><blockquote>Amazon Elastic Block Storage (EBS)</blockquote><p>2.000 GB/ 5 storages = 400 GB /storage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gFJaxMFbY05mjpZNZ4rYSQ.png" /></figure><blockquote>show calculations</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApRvNEoaXq13rCXIyckdGA.png" /></figure><blockquote>first service added: successfully added Amazon EC2 estimate (1 /?)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vp3_7YCCjYQjW10zjjJPsA.png" /></figure><blockquote>my estimate with Amazon EC2</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vp3_7YCCjYQjW10zjjJPsA.png" /></figure><h3>Production 1/ Stage 1/ Development/testing: 3LB</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fqaJTe5SJ9eVyT6LqTU9og.png" /></figure><blockquote>Elastic Load Balacing</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thBdIQ74fCyC38TI9Pgn2w.png" /></figure><blockquote>3 load balancing: 1 for production, 1 for stage, and 1 for development/testing.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sRsbtdE5IZznfljNApQV9w.png" /></figure><blockquote>second service added: my estimate =&gt; Amazon EC2, Elastic Load Balancing (2 /?)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sRQzGwnwrwPJYzEj62o0-A.png" /></figure><h3>Production 1, Stage 1, Development/Testing - 1,75 TB NFS Storage</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKVsPpxuUd46P-i1jgYQaw.png" /></figure><blockquote>EFS — Elastic File System</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*AAXluYQIKbr5JUi28pw0qA.png" /></figure><blockquote>Standard Storage: 1750 GB/ month</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s1XG2wRuZ2Tx5kLO2xcfLg.png" /></figure><blockquote>third service added: Amazon Elastic File System (3 /?) 10:45</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzxQsyBB5sk8spu-pSV6Aw.png" /></figure><h3>5 EC2 Instances: 3 for Stage, 2 for Development/ Testing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRUHPI-rBv0Frr5BxMywqQ.png" /></figure><blockquote>add service</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekpZHJxOOzDtI_WlEOBmMw.png" /></figure><blockquote><em>5 x 4vCPUs 8GiB memory =&gt; </em>3 for Stage, 2 for Development/Testing</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g9c1P7y-WUVANogca1yNZQ.png" /></figure><blockquote>use computing saving plans, 3 years plan</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*CnXRxfPiu-WM9jL76_juVA.png" /></figure><blockquote><em>show calculations</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*_gOPGg05bvWiYIZwbasK7w.png" /></figure><blockquote><em>storage 1500 / 5 = 300 GB ( 1TB for Stage 1 , and 0,5 GB for Development/ Testing)</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aVMfrSfmXfPOMocROGg-LA.png" /></figure><blockquote>1,5 TB x% 5 = 300 GB block storage / instance</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9hR1yirVKk5b5ksbSraXYQ.png" /></figure><blockquote>show calculations</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NxqjHE95V70mN4-mK6mP-Q.png" /></figure><blockquote>fourth service added (4 /?)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FXR0uJCskjWYk3hWHJWlNw.png" /></figure><h3>Part 2: Oracle Instances</h3><blockquote>Production 2</blockquote><blockquote>Stage 2</blockquote><blockquote>Development /Testing 2</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RhDIkiK8RpjMwtxyeSBzVA.png" /></figure><blockquote>Add Service: search for Amazon RDS for Oracle</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ibJcTJXHBy0Nw81jdJQEg.png" /></figure><h3>Production 2</h3><blockquote>details: 2 RDS Oracles Instanes 38 vCPUs x 156 Gibs memory</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EkD_SNZxyOGlKbN3g2TSpg.png" /></figure><blockquote>multi-az, 3 years term, partial upfront</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BWIOvcZKt8AJgngu-RofNg.png" /></figure><h3>Production 2</h3><blockquote>Storage</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zqDT9EXQRPZh-Pp_NxE-_w.png" /></figure><blockquote>Oracle storage: 3TB / 2 = 1.500</blockquote><blockquote>backup storage: 3.000 GB</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OTlpIrVA68TLHaxFrVaXTw.png" /></figure><blockquote>fifth service added (5/?)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3V35xs8vsvviTGReEmwz6A.png" /></figure><h3>Stage 2</h3><blockquote>Amazon RDS for Oracle</blockquote><ul><li>2 instances vCPU: 16 Memory: 64 GiB</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MM3AeznMzRy-LxKzIusTBQ.png" /></figure><blockquote>Search for RDS for Oracle</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eeXLUR-jvuoMRhtS-spRYw.png" /></figure><blockquote>2 instances vCPU: 16 Memory: 64 GiB, single-az</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ys_SrSm1y_MmbeknJ5lSjg.png" /></figure><blockquote>storage 3 T / 2 = 1.500 GB</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vFANhAprRfyzUVH-KtmbQ.png" /></figure><blockquote>backup storage 3.000 GB ( 2 DB)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aV_b9rCtxOZ_hHgHJPdp5A.png" /></figure><blockquote>sixth service added</blockquote><h3>Development / Tests 2</h3><blockquote>Amazon RDS for Oracle</blockquote><ul><li>2 instances vCPU: 8 + Memory: 30 GiB</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MSXIqnwdLkTJuE_3Tw5_5g.png" /></figure><blockquote>AWS RDS for Oracle configuration</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RsUvBqjluPf4C4zWIuNcOw.png" /></figure><p>1 TB de Storage / 2 instances = 500 GB /instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UNf8Vw6fptseENse9uSXSw.png" /></figure><blockquote>size equivalent to 1TB database</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z4e21X69Ka8nmwM7RND16g.png" /></figure><blockquote>size equivalent to 1TB database</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3GbIVBnWpaOc-EcVOZiWyw.png" /></figure><blockquote>seventh service added</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pqhtlXvW8GVNS5crwvB4gw.png" /></figure><h3>Enhanced technical support</h3><blockquote>need to add support</blockquote><p>if SAP down = loss</p><blockquote>Multiple AWS support associates can email or call me 24/7.</blockquote><blockquote>High severity response times: 15 minutes or less</blockquote><blockquote>entrepise support plan</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkyd4dSAwY8o-8Ssj_I9sg.png" /></figure><p>estimate: US$ 15.000,00</p><h4>7 services + support US$ 400.000,00</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9QHAoEn0zXpNwJDx4g963Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wNm5qnf0DUK1jdZMhusz7Q.png" /></figure><blockquote>export info in csv. format</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54ClfME4Prq-G8THcaA9rw.png" /></figure><p>adjust tables for slides</p><p>table 1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*uuyRVRWSyfbWCY9DE0uuLg.png" /></figure><p>table 2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*FR1L44628XfkT1x5nieLMQ.png" /></figure><blockquote>we design the tables in power point</blockquote><blockquote>ppt graph 1</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Ux5an-h1o9UhFduGjJBRQ.png" /></figure><blockquote>ppt graph 2</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WhujtTe6NktVlOFCWPh5bA.png" /></figure><p>You can analyze the impact of support on costs.<br>The other costs can be analyzed according to the graphs above.<br>Mission Accomplished.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5563716b2f40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementation of a set of EC2 instances using Terraform and AWS Systems Manager configuration with…]]></title>
            <link>https://medium.com/@okubobarros/implementation-of-a-set-of-ec2-instances-using-terraform-and-aws-systems-manager-configuration-with-9ad9396239f3?source=rss-2aa8328d3e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ad9396239f3</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-system-manager]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Alexandre Okubo]]></dc:creator>
            <pubDate>Thu, 12 Jan 2023 02:26:13 GMT</pubDate>
            <atom:updated>2023-01-12T02:26:13.425Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Implementation of a set of EC2 instances using Terraform and AWS Systems Manager configuration with Amazon Simple Notification Service for automated installation of security officers</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tDWTGNiPnSEjtjET.jpg" /></figure><p><strong>Project description:</strong></p><p>In this project based on a real-world scenario, I acted as DevSecOps Engineer, and I deployed a set of EC2 instances and infrastructure in an automated way using Terraform (infrastructure as code — IaC). Also, it was necessary to install a specific security agent on all these instances in an automated way.</p><p>Once I provisioned the infrastructure, AWS System Manager and its component Command Run were used to install the security agents in an automated way. I also used the Amazon Simple Notification Service — SNS to send an email informing the whole process status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5Z06cAxUXor_2MiT.jpg" /><figcaption>DevSecOps Automation of Security Agent Installation Solutions Architecture</figcaption></figure><p>The key tools used to implement this project are Terraform, AWS Systems Manager (SSM), and Amazon SNS.</p><p>To use Terraform as Infrastructure as a Service, we will install using the IDE (integrated development environment) VScode, and install the Terraform extension:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2T1y9Y67DiuLvLkyqn4ZGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ms2XCsvwPP5TasmAiF7XCg.png" /></figure><p>then, let’s download two Terraform files, in a folder to use in the project</p><p>`https://aws-mod5.s3.amazonaws.com/aws-mod05.zip</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ad9396239f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementation of a Scalable Web Application using the services of AWS Elastic Beanstalk, DynamoDB…]]></title>
            <link>https://medium.com/@okubobarros/implementation-of-a-scalable-web-application-using-the-services-of-aws-elastic-beanstalk-dynamodb-25328566775e?source=rss-2aa8328d3e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/25328566775e</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Alexandre Okubo]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 01:33:37 GMT</pubDate>
            <atom:updated>2023-01-09T01:33:37.740Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Implementation of a Scalable Web Application using the services of AWS Elastic Beanstalk, DynamoDB, CloudFront, and Edge Location</em></h3><h3>Project description:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vQxG0h9gS82h6gTA.jpg" /></figure><p>In this project based on a real-world scenario, I was responsible for implementing an application that needs to support the high demand of a large number of users accessing it simultaneously.</p><p>This application has been used in a large conference that had more than 10,000 people, in-person and online, with participants from all over the world.</p><p>This event was broadcast online and in person and 10 vouchers were drawn for 3 Cloud certifications. At that moment, more than 10,000 people in the audience registered their e-mails to guarantee their participation in the raffle.</p><p>I used AWS Elastic Beanstalk services to deploy the web application, DynamoDB to store emails, CloudFront to cache static and dynamic files in an Edge Location close to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HtRlpYSYwx7VPdhr.jpg" /></figure><p>We will start implementing this project by dividing it into three parts:</p><p><strong>Part 1:</strong> Create a table in DynamoDB to store users email addresses and create an Elastic Beanstalk to provision all the necessary infrastructures such as EC2, Elastic Load Balancer, and Auto Scaling group</p><p><strong>Part 2:</strong> Create a CloudFront distribution</p><p><strong>Part 3:</strong> Perform Load testing on the application</p><h4>Part 1: Create a Dynamo DB to store user email address</h4><p>Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.</p><p>Search for DynamoDB in the AWS console and click to select it. This service will be used to store users email address</p><blockquote><em>Table name: users</em></blockquote><blockquote><em>Partition key: email</em></blockquote><p>Leave everything else as default and click <strong>Create table</strong> at the bottom right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*f25ZUZkiNa8BO2PaOj0tvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*KY2Gj-xC7j_by8LMuMcpDQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*YmPm8B9pQZpF9a9K1pN_8g.png" /></figure><h3>Create an Elastic Beanstalk</h3><p>This service will be used to deploy and manage the web application in AWS Cloud without worrying about the infrastructure that runs it. We will upload the application files and it will automatically handle the details of capacity provisioning, load balancing, scaling, and application health monitoring.</p><blockquote><em>Search for elastic beanstalk in the AWS console and click to select it</em></blockquote><blockquote><em>Select “</em><strong><em>Create Application” a</em></strong><em>nd enter the information below</em></blockquote><blockquote><em>Application name: tcb-conference</em></blockquote><blockquote><em>Platform (runtime environ.): Python 3.7+</em></blockquote><blockquote><em>Application code: Upload the application file code -&gt; The Public S3 URL is provided below</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*-Qc8_fF6laaDbzvOsFr8sw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*fINwk2Qzf64G0gtzrb5XhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*yv8iW9jQug3TKhjenzaVHQ.png" /></figure><p><a href="https://tcb-bootcamps.s3.amazonaws.com/bootcamp-aws/en/tcb-conf-app-EN.zip">https://tcb-bootcamps.s3.amazonaws.com/bootcamp-aws/en/tcb-conf-app-EN.zip</a></p><p>After the information is inputted, click on <strong>“Configure more options”</strong> to make changes to our Elastic Bean Stalk.</p><blockquote><em>Set our presets to High availability.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gpX9Qi03D52xtQpOFAwrDw.png" /></figure><blockquote><em>Under Software, add the environment variable </em><strong><em>AWS_REGION</em></strong><em> with value </em><strong><em>us-east-1</em></strong><em> to the region and click Save</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*UPlKyIY_ObJm_UaQo4vcsg.png" /></figure><p>We will need to change the instances information and set our root volume type to General Purpose SSD and set the space to 8GB, and change our capacity for our instances.</p><p>The Elastic Bean Stalk will automatically create a Load Balancer for our application, with a minimum of two instances running and a max of 4. This will eliminate the need to respond manually in real-time to traffic spikes that merit the provision of new instances.</p><blockquote><strong><em>Instances:</em></strong><em><br>. Root volume type: General Purpose SSD — 8 GB</em></blockquote><blockquote><strong><em>Capacity:</em></strong><em><br>. Instances Min: 2<br>. Instances Max: 4<br>. Instance type: t2-micro</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*3zMh4twc-vyBul_2CgLaiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*JWFt0GxmLWLljWbN1eN2YQ.png" /></figure><p>This is triggered by an event of scaling action to either scale up or down instances based on CPU Utilization metric and setting our Unit to percent. This will allow Elastic Bean Stalk to automatically scale when our CPU hits a certain percentage of utilization.</p><p><strong>Scaling triggers:</strong></p><blockquote><em>. CPU Utilization<br>. Unit: Percent<br>. Period: 1 Min<br>. Breach durantion: 1 Min<br>. Upper threshold: 50<br>. Lower threshold: 40</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*wTlyGoapL-hG3_W7lf-GLQ.png" /></figure><p>Now we will edit the security section, for this area it&#39;s pretty easy we’ll be using the same SSH key we created earlier, select that and then hit save!</p><p><strong>Security:</strong></p><blockquote><em>Select SSH key</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2FZ8YQyDAyBXGjgWrZpASA.png" /></figure><p>The last thing we’ll need to edit is the networking, for this, we will set our VPC to default, add a public IP and select all subnets!</p><p><strong>Networking:</strong></p><blockquote><em>. VPC: Default:<br>. Add IP Public<br>. Select all subnets</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L_gYf7Fe5pU6kZtE6hc_QQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rpy_hpiiOFYOfy5G4yPO-g.png" /></figure><p>Review all the changes that have been made correctly and Click on <strong>Create App</strong></p><p>Elastic Bean Stalk will create everything for us, it will start with the EC2 instances, then the load balancer, and start the application, this can usually take a bit of time</p><p>If everything was done correctly you should have a link to the web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gkd7m0QVt25-llSPNIyG7g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nAG10g0x3F9DeYp_Ve5wWw.png" /></figure><blockquote><em>Access the application and simulate a record insertion</em></blockquote><p>Click on the URL and open a new browser window to register an email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SJiyRMTCeQLVs9VM76Qzsg.png" /></figure><p>In the conference, the participants will need to enter their email addresses on the web page and the application will insert the email address into the DynamoDB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wLevfaaunza91HBc3B4P4w.png" /><figcaption>Error message when I Inserted the email address</figcaption></figure><p>Should in case you come across an issue like the image above when you try to register an email, you will ensure that IAM roles are correctly set up.</p><p>Let’s try and troubleshoot the error message in the Elastic Bean Stalk logs</p><blockquote><em>Go to logs and click the last 100 lines for the log file of the two instances</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tBelTaz47O8RGXru508_ig.png" /></figure><p>The exception is telling us that the EC2 instance does not have the required permission to perform a PUT on DynamoDB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jymE0Uvj8khrNBWjL6QKUw.png" /></figure><p>We will need to make changes to the IAM role before the application is fully operational.</p><p><strong><em>Let’s fix this error!</em></strong></p><blockquote><em>Navigate to IAM| Click on roles| Click on </em><a href="https://us-east-1.console.aws.amazon.com/iamv2/home?region=us-east-1#/roles/details/aws-elasticbeanstalk-ec2-role"><em>aws-elasticbeanstalk-ec2-role</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_x4XIyTCNZZrsAgoAuACg.png" /></figure><blockquote><em>Add permission | Attach policies| Type ‘DynamoDB’ | Select AmazonDynamoDBFullAccess and then click attach policies to associate to the EC2 instances</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NJPEFZt_-uz48rcWcTksMg.png" /></figure><p>Copy and paste the URL again to enter the email address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C8WoinYHZ00LNVuG7gPVHw.png" /></figure><h3>Part 2: Create CloudFront Distribution</h3><p>Cloud Front also known as Content Delivery Network is a web service that speeds up the distribution of static and dynamic web content, such as .html, .css, .js, and image files users. It delivers content through data centers called edge locations. When a user requests content, the request is routed to the edge location that provides the lowest latency and speeds up performance</p><blockquote><em>In the console search bar, search for CloudFront and click</em><strong><em> Create CloudFront distribution</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n0VBx_Be-LWS8mJGNVuLfw.png" /></figure><p>Select the <strong>Origin domain</strong> where CloudFront will cache all the static files and leave all the configurations as default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*XwKzDicg1Mdf0EE09BpEIA.png" /></figure><p>Click on <strong>Allowed HTTP methods</strong> and select GET, HEAD, OPTIONS, PUT, POST, PATCH, and DELETE to allow the application to use POST to insert the data inside the DynamoDB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*QnOm_i_AAQR9IBue8nkd7Q.png" /></figure><p>On Settings, leave it as <strong>Use all edge locations (best performance)</strong></p><blockquote><em>Click Create Distribution</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*beTQ0Bhs4J0hVEnPAhokuA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pKJ26CrZIoJE9nsmp3jegA.png" /></figure><p>The CloudFront distribution is created. let’s confirm that we can access the application using the new CloudFront URL.</p><blockquote><em>Copy the URL and paste into a browser to see if the application will come up</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGa62dW5wTqxC14shfaVeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LkDAShawq05X3RuftOWBig.png" /></figure><p>Go to the DynamoDB we created to confirm the email has been added to the users table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L1fhZ-gl0cSNvLpx9ojwoQ.png" /></figure><h3>Part 3: Perform Load Test</h3><p>Load test induce load on CPU, RAM, HDD SSD, and more but for the aim of this project we will induce load on the CPU.</p><p>When a server is crashing or its hardware otherwise is misbehaving under load, it is helpful to induce a ‘fake load’ onto the system to help diagnose the problem. This can be done with the y <strong>stress</strong> tool that is available in most Linux distributions.</p><p>Let’s proceed to install the tools and packages that we need.</p><blockquote><em>Copy the IP-address from one of the EC2 instances.</em></blockquote><blockquote><em>SSH into the instance using the PowerShell or Git Bash terminal</em></blockquote><p>Run the command below:</p><p>&lt; ssh ec2-user@3.81.228.68 -I ssh-key.pem &gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*lyBu6z9mhv9QDVn0Gk6G8A.png" /></figure><p>sudo amazon-linux-extras install epel -y</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NRryeHfe5vF6LFsX4vcOgA.png" /></figure><p>sudo yum install stress -y</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4FfWzOBtma8URnPeGt0AgQ.png" /></figure><p>Now that it is installed, run the command below to bump the CPU utilization.</p><p>stress -c 4</p><p>You will see a warning for high CPU Utilization. If you recall, we configured the Auto Scaling group to create a new instance to cater to the changes in demand if the CPU utilization is up to 50%.</p><p>The instances are marked degraded and the Elastic Beanstalk will add one new instance with the Auto Scaling group to keep up with the workload and make sure the users have more instances available to use the application without any issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AJUL21fSDfDvwc0m7hWvFQ.png" /></figure><blockquote><em>Check inside the elastic beanstalk application Health</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vK_lHUX5XeoFwCKHxWxYOg.png" /></figure><blockquote><em>Check inside the EC2 instances</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6b_VMBFarfnH-4ybyu2RQ.png" /></figure><p>Now we have three instances that are up and running.</p><p>Let&#39;s access the application by pasting the <strong>Cloud Front URL</strong> into a browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LkDAShawq05X3RuftOWBig.png" /></figure><p>As you can see the Email was registered successfully</p><blockquote><em>Stop the loading process by running the command below</em></blockquote><p>ps -ef |grep stress</p><p>After the load test is stopped, the auto-scaling group will scale up and scale down the added instances depending on the CPU utilization configured in the elastic bean stalk.</p><h3>Congratulations!</h3><p>Reminder: Terminate all the resources when you are done.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25328566775e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migration of a Workload running in a Corporate Data Center to AWS using the Amazon EC2 and RDS…]]></title>
            <link>https://medium.com/@okubobarros/migration-of-a-workload-running-in-a-corporate-data-center-to-aws-using-the-amazon-ec2-and-rds-89c493ed7778?source=rss-2aa8328d3e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/89c493ed7778</guid>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-rds]]></category>
            <dc:creator><![CDATA[Alexandre Okubo]]></dc:creator>
            <pubDate>Wed, 04 Jan 2023 02:08:49 GMT</pubDate>
            <atom:updated>2023-01-04T02:08:49.436Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Migration of a Workload running in a Corporate Data Center to AWS using the Amazon EC2 and RDS service</em></h3><p><strong>Project description:</strong></p><p>In another project based on a real-world scenario, I acted as the Cloud Specialist responsible for migrating a workload running in a Corporate Data Center to AWS.</p><p>The application and database were migrated to AWS using the Lift &amp; Shift (rehost) model, moving both application and database data.</p><p>Lift and shift is an approach for migrating an exact copy of an application or workload ( and its data store and OS) from an on-premise environment to the cloud without redesigning the app.</p><p>I followed the migration steps below:</p><ul><li>Planning (sizing, prerequisites, resource naming) —</li><li>Execution (resource provisioning, best practices)</li><li>Go live (validation test — Dry-run, final migration — Cutover)</li><li>Post-Go-live (ensure the operation of the application and user access)</li></ul><h4>Solution Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lk7HQmvxE04GHzQ3.png" /></figure><h3>Planning</h3><p>When I started on this cloud migration project, the customer provided some information about host/server names, IP addresses, and descriptions of local resources.</p><p>After understanding the data involved, the scope of the data migration plan was defined with the necessary resources for the migration.</p><p>A planning worksheet has been created with the layout of local resources and AWS resources that will be used in this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g3aJQoXEc_GITgckFiG8OQ.png" /></figure><p>Another spreadsheet was created with the packages and libraries that need to be installed in our application for it to run successfully. The application server consists of python code that needs to be migrated from locally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ITx-bLyyggQG1-bKFo2mMA.png" /></figure><h3>Execution</h3><p><strong>Step 1:</strong> Create our network VPC</p><p>Log into the AWS management console, search for VPC, select it from the drop-down menu, and click <em>Create VPC.</em></p><p><strong>- VPC details:</strong></p><ul><li>CIDR Block: 10.0.0.0/16<br><strong><em>Note: It should NOT overlap with on-premises or other cloud providers</em></strong></li><li>VPC Name: vpc-production-1</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*vm4FABhcfkQe0N5HPueOjw.png" /></figure><p><strong>Step 2:</strong> Create our public and private subnets</p><p><strong>We will be creating one public and two private subnets as it is a requirement for RDS</strong></p><p><strong>- Public subnet details:</strong></p><ul><li>vpc-production-1-pu-1 (Public)<br>CIDR Block: 10.0.0.0/24</li></ul><p><strong>- Private subnet details:</strong></p><ul><li>vpc-production-1-pv-1 (Private)<br>CIDR Block: 10.0.1.0/2<strong>4</strong></li><li>vpc-production-1-pv-2 (Private)<br>CIDR Block: 10.0.2.0/24</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*rGnfb7evjhMCO6KURt9MEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*Xmgo1LpzM6zJW8LfZxG4Ag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*FmqannRhzF_FkCuxSH0wNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*NGLSysge2UykFrq1qdaZ7Q.png" /></figure><p>- Why Two Subnets in different AZ?</p><p>An RDS subnet group is a collection of subnets you can use to create an RDS DB instance in a VPC.<br>Our VPC must have at least two subnets in two different Availability Zones in the AWS Region where we want to deploy the ‘database’.</p><p><strong>Step 3: </strong>Create an Internet Gateway and attach to a VPC</p><blockquote><em>VPC |Internet Gateway: igw-mod3 |Action: Attach to VPC (vpc-production-1)</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/0*acB8nKlJNJyvPzQp.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Ag3h6FaxjDspJ1NQTFnHQ.png" /></figure><p><strong>Step 4: </strong>Create a Route table</p><p>Click on add routes and type internet gateway as a target and select igw-mod3 and then save changes.</p><blockquote><em>VPC | Route Table | Routes | Edit routes | Add route: 0.0.0.0/0 — Target: Internet Gateway (igw-mod3)</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IjkRXebkN6Ea6XBmdc4sNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3xDFQL7Ieo3WJgIPJ1vXiQ.png" /></figure><p>Let’s provision an EC2 instance that will host our application and create a key pair to access the EC2 instance.</p><p>In AWS console, search for EC2 in the search bar and click on EC2 to launch instance.</p><p><strong>EC2 instance details:</strong></p><ul><li>Amazon Machine Image: Ubuntu 18.04</li><li>Instance type: t2.micro</li><li>Instance details:</li><li>Network: vpc-production-1</li><li>Subnet: vpc-production-1-pu-1 (Public)</li><li>Assign public ip: Enable</li><li>Tags:</li><li>hostname: awsuse1app01</li><li>environment: bootcamp</li><li>Configure security group:</li><li>Port: 22 — Source: 0.0.0.0/0</li><li>Port: 8080 — Source: 0.0.0.0/0</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*W-2k1CMYt6C4vg1VZenw0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*2eETOd_QsO77zgId-sluvw.png" /></figure><p>Now, let’s move into the Network setting to create a security group. Click on edit.</p><p><strong>Step 5:</strong> Create a new Security Group.<strong> </strong>Name: <strong>app-sg01.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*zzJeB8n5AVH-znUQNswlnQ.png" /></figure><p>While creating the EC2 instance, a Key pair is needed to access the EC2 instance.</p><p><strong>Step 6:</strong> Create a Key Pair</p><blockquote><em>Network &amp; Security | Key Pairs | Create Key Pair</em></blockquote><p>Keep and save the Key Pair on your local machine. I will be naming the key pair <em>ssh-key </em>and making it a<em> .PEM</em> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*6FIIwS6zsXzB5mgzLbZP4g.png" /></figure><p>Let’s provision the RDS instance by selecting MySQL database engine using and setting up the connectivity to our VPC, as well as creating a new VPC security group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qOS4d_VMfxwiWi68F3Kblg.png" /></figure><p><strong>Step 7:</strong> Create RDS instance</p><p>In AWS console, search for RDS in the search bar and click on RDS</p><p><strong>RDS instance details:</strong></p><ul><li>MySQL</li><li>MySQL 5.7.33</li><li>Templates: free-tier</li><li>Settings:</li><li>DB Instance: awsuse1db01</li><li>Master username: admin</li><li>Master password: admin123456</li><li>DB instance class: db.t2.micro</li><li>Storage: 20 GB</li><li>Connectivity:</li><li>VPC: vpc-production-1</li><li>Public access: No</li><li>Create new VPC security group</li><li>New VPC security group name: sec-group-db-01</li><li>Availability Zone: us-east-1a</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*U6KrYH4CfMeBKqUFIcow1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*9BvUm6XqoZyof_u-9TrFkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*b5Q1kN04JeGG7VKdx3GftQ.png" /></figure><p>Let’s connect to the EC2 instance. We will need the <em>s</em><strong><em>sh-key.pem</em></strong> file we kept a side. Using GitBash, we will run the commands to install the libraries and packages<strong> </strong>onto the EC2 instance (Application Server)</p><blockquote><strong><em>Step 8:</em></strong><em> Connect to the EC2 instance using the SSH</em></blockquote><p>Note: When trying to connect into the EC2 instance using SSH, if you encounter a permission issues. use the command below to give permission to the ssh key.</p><pre>sudo chmod 600 Desktop/AWS/ssh-key.pem</pre><p>The commands below will be utilized to install the libraries and packages.</p><p>Let’s test using the command prompt: CMD</p><pre>ssh -i keyssh ubuntu@ip-publico-ec2</pre><p>Download the Application and Database Dump files</p><pre>- wget https://bootcamp-aws.s3.amazonaws.com/wikiapp.zip<br>- wget https://bootcamp-aws.s3.amazonaws.com/dump.sql</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BGNC7PwE_1D7uZ9CBaSL7A.png" /></figure><p>- Connect to MySQL server on AWS RDS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xMgDVX65xZQhnp2M8Ab4HA.png" /></figure><p>- Create the ‘wikidb’ database and import the data</p><ul><li>show databases;<br>- create database wikidb;<br>- show databases;<br>- use wikidb;<br>- show tables;<br>- source dump.sql;<br>- show tables;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*qxOz10yB8RXPGKPocT0Qbg.png" /></figure><p>- select * from articles;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z5LhrE4A4ACngEHkN9rcww.png" /></figure><p>- Create wiki user in wikidb Database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*RAGWtLn-HzPs17qTludYsQ.png" /></figure><p>- Unzip application files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*SzNj47RWQHiE3Y1cNiWZ0w.png" /></figure><p>- Edit the Python file ‘wiki.py’ and change the hostname to the ‘RDS endpoint’ and ‘DB user’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8GL3SbiqhYC3Gw4eEz8rrg.png" /></figure><p>DAWSN</p><p><strong>Lets launch the application to validate the migration</strong></p><p>Lets check to see if our application is running. We will use the public IP address of our EC2 instance and adding :8080 at the end of it.</p><blockquote><em>Navigate to AWS Console | EC2 and Copy the public IP-address and paste in a web browser</em></blockquote><p>If everything was done correctly you should see this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ueAA2Rl3w2aoVudM8ZdaRQ.png" /></figure><p>Success! The application is up and running.</p><p>Let’s test the application and create an article</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_LSg46l3-8w-vY7IOZNdYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TI_lJvDQonRf5lejVkdDGQ.png" /></figure><p>Article successfully created, application working perfectly.</p><p><strong>Post Go-live</strong></p><p>The application and database will be tested for stability and ongoing support will be provided. The cloud team will need to make sure that all the users are able to access the application post migration.</p><p>If you did everything correctly, you will see the application is up and running. Also, the application is able to communicate with the database</p><p><strong>Reminder:</strong> Terminate your instance when you are done. You do not want to incur charges for keeping the instance running.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89c493ed7778" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automated user migration and management of AWS Identity and Access Management (IAM) resources]]></title>
            <link>https://medium.com/@okubobarros/automated-user-migration-and-management-of-aws-identity-and-access-management-iam-resources-e4a9af5e905f?source=rss-2aa8328d3e54------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4a9af5e905f</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[iam-roles]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Alexandre Okubo]]></dc:creator>
            <pubDate>Thu, 29 Dec 2022 00:04:24 GMT</pubDate>
            <atom:updated>2022-12-29T00:04:24.152Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L2dcIc4PyfTsFKldcxqtYg.png" /></figure><p><strong>Project description:</strong></p><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 GitBash with AWS CLI and Shell Script, I came up with a solution.</p><h4>Solution Architecture</h4><p>In addition to migrating these users, it will be necessary to associate permissions to groups and users must have MFA enabled, adding an additional layer of security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7SjMZ3-2IfxoiiOPKgxAJQ.png" /></figure><h4>Step 1: Create a spreadsheet that holds the user information of the IT team.</h4><p>This information includes email address, user group, and password, and save the data as Users.csv file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*04DfHtVr8Wm8JM2Z.jpeg" /></figure><p>The Users.csv file will be used to automate the User groups creation process.</p><h4>Step 2: Create User groups to place our user(s) into</h4><p>Log into your AWS root account, and create five new User groups:</p><ul><li>CloudAdmin</li><li>DBA: DatabaseAdmin</li><li>Linux Admin</li><li>NetworkAdmin</li><li>Trainees / Intern</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UpE6gABinbMSqgDceHAfUg.png" /></figure><p>In the navigation pane, choose <strong>User groups</strong> and click the blue <strong>Create group</strong> button at the upper right-hand side of the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*8YpoOl7vt33-oiE9.png" /></figure><h4>Step 3: Attach a policy to allow users to change their passwords:</h4><p>By default, all actions for all services are denied, so we have to explicitly grant rights by adding a policy with our targeted actions and resources to the User groups.</p><p>Let&#39;s give the following access to the user groups we just created by attaching the policy to them.</p><p>Navigate to the <strong>permissions</strong> section to attach the policies</p><ol><li><strong>CloudAdmin Access — </strong>AdministratorAccess, Iamchangepassword</li><li><strong>NetworkAdmin</strong> — VPCFullAccess, Iamchangepassword</li><li><strong>DatabaseAdmin</strong> — AmazonRDSFullAccess, Iamchangepassword</li><li><strong>LinuxAdmin </strong>— AmazonEC2FullAccess, Iamchangepassword</li><li><strong>Trainees</strong> — ReadOnlyAccess, Iamchangepassword</li></ol><p>We have successfully created the User groups and attached the policy to it</p><p>Let’s jump into the Migration process.</p><h4>Migration Process</h4><ol><li>Download the automation script for AWS CLI</li><li>Convert the spreadsheet users file see “users.csv file”</li><li>Run the automation script</li><li>Test a user Created</li></ol><p><strong>Step 1:</strong> Open the AWS Cloud Shell — The AWS cloud shell</p><p>From the AWS Management Console, in the Search box, write Cloudsheel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hA2ZIpMLE5w-_zyUfqKTAA.png" /></figure><p><strong>Step 2:</strong> Install dos2unix on AWS Cloud Shell (required by the script)</p><pre>sudo yum install dos2unix -y</pre><p><strong>Step 3</strong>. Download the script that automates the creation of Users in IAM on AWS Cloud Shell</p><pre>wget https://tcb-bootcamps.s3.amazonaws.com/bootcamp-aws/en/aws-iam-create-user.sh</pre><p><strong>Step 4:</strong> Upload the <strong>User.csv</strong> file to AWS Cloud Shell</p><p>Navigate to actions on the top right corner in the AWS cloud shell environment and select the upload file. Now, upload the user.csv file we just created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ma0R935yyfmUUI13oKiv0Q.png" /></figure><p><strong>Step 5: </strong>Run the script aws-iam-create-user.sh to create the IAM users</p><pre>./aws-iam-create-user.sh users.csv<br>Download the aws-iam-create-user.sh script on AWS Cloud Shell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*MCk6BYUALqWp0WXX.png" /></figure><p>Go back to the console to confirm the Users have been migrated to the IAM.</p><p><strong>Step 6 :</strong>Now, we have to change the password policy settings for our users.</p><p>we select each user group to add the policy for change the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x8abnF159z7atkl7rtPA_A.png" /></figure><p>Filter IAM, add the IAMUserChange Password permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gzpVG25vIJH9MhDcJcMKmQ.png" /></figure><p>Repeat for all groups. We have successfully updated the password policy.</p><p><strong>Step 7 : </strong>Password change permission validation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G4oTohI4SyAVmGjXHjkElQ.png" /></figure><p>In another navigation tab, with the provided url of the root account, we validate the users’ access, with the default login and password. A new password will be requested for access. Done, the access is validated.</p><h4>Multi-Factor Autentication</h4><p><strong>Step 1:</strong> Enable MFA on your Root user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*trmwsTtZdtISHvBZswntwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zLFXCwQf7tiE6n_2GS5ufw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*qlDKTOdovLb1SjsX1DPiPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SN_mS0q7aLQi34LaqLi9GQ.png" /></figure><p><strong>Step 2:</strong> Create a custom policy for the MFA</p><p>Navigate to <strong>Policies</strong> and select<strong> create policy.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2isjrkYqDvjOD-1j6GD8aA.png" /></figure><p>Select <strong>JSON</strong> and replace the script with the JSON file that has the custom script to automate the Enforce MFA policy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*p6B0_YJkxoFu3t8hvAKILQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8CasbNSsVSEE_LCd8vCpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BxBgKXmKTiDyWdtjjxtfgQ.png" /></figure><p><strong>Step 3:</strong> Add <strong>EnforceMFApolicy </strong>permissions to the User groups</p><p>Select the <strong>CloudAdmin </strong>and click on <strong>Permissions and a</strong>dd the <strong>EnforceMFApolicy</strong> permissions we just created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OmcvAuhInjV6BAt0C6WafA.png" /></figure><p>Repeat the same steps by adding the <strong>EnforceMFAPolicy </strong>to all the User groups.</p><p><strong>Step 4:</strong> Change the password policy that comes with AWS.</p><p>As security best practice lets create a strong requirement for the default password policy.</p><p>In the navigation pane, choose <strong>Account settings </strong>and navigate to the <strong>Password policy</strong> section, choose <strong>Change password policy</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gy4-09TCUZor4Fj64tP2rA.png" /></figure><p>Select the options that you want to apply to your password policy and save the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rOABt3W4BW4SuMR4iEJmsQ.png" /></figure><p><strong>Step 5:</strong> Enable a MultiFactor Authentication for the users</p><p>Multi Factor Authentication is another layer of security that helps users ensure that their account is protected even if their password is compromised or stolen.</p><p>There are different methods including a virtual MFA device that can be installed on an app on a phone (Ex: Microsoft Authenticator)</p><p>Select a name under the User group we created and navigate to the <strong>Security credentials</strong> where it says <strong>Assigned MFA device</strong>, click on <strong>Manage</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*eiGYFe7TZ-_RZiDz.png" /></figure><p>Select the <strong>Virtual MFA device</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/0*13TQYn8ZGmZzwEwp.jpeg" /></figure><p><strong>Step 6: </strong>Download an authenticator device to receive the MFA code.</p><p>Scan the QR code from the authenticator device to receive the MFA code and enter two consecutive numbers as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*EIGjIFWuT0IJZKaH.png" /></figure><p>Upon entering the MFA code you will see the successful message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*3PSC_t5rs2Rv01m-.png" /></figure><p>In case you face any issues during the deployment, leave a comment and don’t forget to click the like button!</p><p>we have successfully migrated users from the on-premise environment to the AWS Cloud environment in an automated way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4a9af5e905f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>