<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AWS &#8211; Sumanas Tech</title>
	<atom:link href="https://www.sumanastech.com/category/aws/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sumanastech.com</link>
	<description></description>
	<lastBuildDate>Tue, 06 Jan 2026 05:40:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.sumanastech.com/wp-content/uploads/2025/03/sumanas-logo-square.png</url>
	<title>AWS &#8211; Sumanas Tech</title>
	<link>https://www.sumanastech.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Artificial Intelligence and Web development</title>
		<link>https://www.sumanastech.com/artificial-intelligence-and-web-development/</link>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Fri, 07 Mar 2025 10:47:38 +0000</pubDate>
				<category><![CDATA[Blockchain]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://sumanastech.com/?p=58</guid>

					<description><![CDATA[Coming Soon.]]></description>
										<content:encoded><![CDATA[
<p>Coming Soon.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Deploy your Web Applications to the Cloud Right Away! Here is how you can!</title>
		<link>https://www.sumanastech.com/deploy-your-web-applications-to-the-cloud-right-away-here-is-how-you-can/</link>
					<comments>https://www.sumanastech.com/deploy-your-web-applications-to-the-cloud-right-away-here-is-how-you-can/#respond</comments>
		
		<dc:creator><![CDATA[sumanasweb]]></dc:creator>
		<pubDate>Wed, 17 Apr 2019 10:45:00 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Adding CSS to our website]]></category>
		<category><![CDATA[Deploy your Web Applications to the Cloud]]></category>
		<category><![CDATA[Flask]]></category>
		<category><![CDATA[gcloud app deploy]]></category>
		<category><![CDATA[Here is how you can]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[pip install flask]]></category>
		<category><![CDATA[use of Flask and virtualenv]]></category>
		<category><![CDATA[virtualenv]]></category>
		<category><![CDATA[Web Applications to the Cloud Right Away]]></category>
		<guid isPermaLink="false">https://www.sumanastech.com/?p=1570</guid>

					<description><![CDATA[The Cloud isn’t cool anymore! Everyone here uses it! Over hyped or not cloud has deeply changed how we build and run the software. With the much more changes happening in the world of Cloud, here is what you need to know about web applications and how to deploy them in the cloud. In this [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><span style="font-weight: 400;">The Cloud isn’t cool anymore! Everyone here uses it! Over hyped or not cloud has deeply changed how we build and run the software. With the much more changes happening in the world of Cloud, here is what you need to know about web applications and how to deploy them in the cloud.</span></p>
<p><span style="font-weight: 400;">In this tutorial, we have given step by step guide along with the code for a quick and simple flow path. </span></p>
<p><span style="font-weight: 400;">Let’s discuss them in detail!</span></p>
<p><b>So what is HTTP?</b></p>
<p><span style="font-weight: 400;">HTTP (Hyper Text Transfer Protocol) is the vital factor for a website. The Internet makes use of this the servers and computers for interaction. </span></p>
<p><span style="font-weight: 400;">When we type the name of a website in a browser and hit enter, it automatically turns into an HTTP server.</span></p>
<p><span style="font-weight: 400;">This happens once you hit enter, the HTTP request is sent to the server.</span></p>
<p><b>What Does it Have to do with Flask?</b></p>
<p><span style="font-weight: 400;">Flask makes the process of designing simple for a web application. Moreover, Flask focuses on what users are requesting and what sort of responses need to be given back.</span></p>
<p><span style="font-weight: 400;">Flask being a Python Micro framework can run the basic web applications as well.</span></p>
<p><b>from flask import Flask  </b><b>//importing a flask</b><b><br />
</b><b>app = Flask(__name__)  </b><b>//__name__ represents current file of the web application</b><b><br />
</b><b>@app.route(&#8220;/&#8221;) </b><b>//when the user visits the site and goes to default site this is activated</b><b><br />
</b><b>def home():</b><b><br />
</b><b>    return &#8220;Hello, World!&#8221;</b><b><br />
</b><b>if __name__ == &#8220;__main__&#8221;: </b><b>//assigns the name when you run your python script</b><b><br />
</b><b>    app.run(debug=True) </b><b>//helps to trace the errors</b></p>
<p><span style="font-weight: 400;">This is stored as main.py</span></p>
<p><b>Let’s run the file main.py</b></p>
<p><span style="font-weight: 400;">In your terminal or command prompt go to the folder which contains main.py file. </span></p>
<p><span style="font-weight: 400;">Type </span><b>py main.py or python main.py</b></p>
<p><span style="font-weight: 400;">You can view the output similar to this on your screen<img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-1574" src="https://www.sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-2.png" alt="" width="540" height="157" srcset="https://www.sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-2.png 540w, https://www.sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-2-300x87.png 300w" sizes="(max-width: 540px) 100vw, 540px" /></span></p>
<p><span style="font-weight: 400;">You need to take note when it says </span><b>Running on </b><a href="#"><b>http://127.0.0.1:5000/</b></a><b>.</b></p>
<p><span style="font-weight: 400;">Where 127. 0.0.1. Represents your local computer. Go to the address and you can see<br />
<img decoding="async" class="alignnone size-full wp-image-1575" src="https://sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-3.png" alt="" width="335" height="151" srcset="https://www.sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-3.png 335w, https://www.sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-3-300x135.png 300w" sizes="(max-width: 335px) 100vw, 335px" /> </span></p>
<p><span style="font-weight: 400;">Now we shall add more routes to note the difference</span></p>
<p><b>from flask import Flask</b></p>
<p><b>app = Flask(__name__)</b></p>
<p><b>@app.route(&#8220;/&#8221;)</b></p>
<p><b>def home():</b></p>
<p><b>    return &#8220;Hello, World!&#8221;</b></p>
<p><b>@app.route(&#8220;/salvador&#8221;) </b><b>//added a new route to salvador</b></p>
<p><b>def salvador():</b></p>
<p><b>    return &#8220;Hello, Salvador&#8221;</b></p>
<p><b>if __name__ == &#8220;__main__&#8221;:</b></p>
<p><b>    app.run(debug=True)</b></p>
<p><span style="font-weight: 400;">When you again run the page, go to </span><a href="#"><span style="font-weight: 400;">http://localhost:5000/salvador</span></a><span style="font-weight: 400;">. You canview the one similar to this image:</span></p>
<p><span style="font-weight: 400;"> <img decoding="async" class="alignnone size-full wp-image-1576" src="https://www.sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-4.png" alt="" width="325" height="134" srcset="https://www.sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-4.png 325w, https://www.sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-4-300x124.png 300w" sizes="(max-width: 325px) 100vw, 325px" /></span></p>
<p><span style="font-weight: 400;">Now we shall add HTML and CSS to make our website more attractive!</span></p>
<p><b>HTML, CSS and Virtual Environment</b></p>
<p><span style="font-weight: 400;">Here is a sample code to get started</span></p>
<p><b>&lt;!DOCTYPE html&gt;</b></p>
<p><b>&lt;html lang=&#8221;en&#8221; dir=&#8221;ltr&#8221;&gt;</b></p>
<p><b>  &lt;head&gt;</b></p>
<p><b>    &lt;meta charset=&#8221;utf-8&#8243;&gt;</b></p>
<p><b>    &lt;title&gt;Flask Tutorial&lt;/title&gt;</b></p>
<p><b>  &lt;/head&gt;</b></p>
<p><b>  &lt;body&gt;</b></p>
<p><b>    &lt;h1&gt; My First Try Using Flask &lt;/h1&gt;</b></p>
<p><b>    &lt;p&gt; Flask is Fun &lt;/p&gt;</b></p>
<p><b>  &lt;/body&gt;</b></p>
<p><b>&lt;/html&gt;</b></p>
<p><span style="font-weight: 400;">Moreover, the flask framework looks for the HTML files in the folder called ‘templates’. You need to put all your HTML files by creating this folder.<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-1577" src="https://sumanastech.com/wp-content/uploads/2019/04/pasted-image-0-5.png" alt="" width="127" height="95" /></span></p>
<p><span style="font-weight: 400;">Make sure your main.py file is outside the folder!</span></p>
<p><span style="font-weight: 400;">Now we need to make changes in main.py so that we can view the HTML file we created.</span></p>
<p><b>from flask import Flask, render_template  </b><b>//will render the template from the folder</b><b>            </b></p>
<p><b>app = Flask(__name__)</b></p>
<p><b>@app.route(&#8220;/&#8221;)</b></p>
<p><b>def home():</b></p>
<p><b>    return render_template(&#8220;home.html&#8221;)  </b><b>//returns to the HTML file</b></p>
<p><b>@app.route(&#8220;/salvador&#8221;)</b></p>
<p><b>def salvador():</b></p>
<p><b>    return &#8220;Hello, Salvador&#8221;</b></p>
<p><b>if __name__ == &#8220;__main__&#8221;:</b></p>
<p><b>    app.run(debug=True)</b></p>
<p><b>Adding CSS to our website</b></p>
<p><span style="font-weight: 400;">Similar to the folder created as ‘template’, you need to foldernamed‘static’.<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-1578" src="https://sumanastech.com/wp-content/uploads/2019/04/unnamed-1.png" alt="" width="164" height="213" /></span></p>
<p><b>Linking the CSS with our HTML file:</b></p>
<p><b>&lt;!DOCTYPE html&gt;</b></p>
<p><b>&lt;html lang=&#8221;en&#8221; dir=&#8221;ltr&#8221;&gt;</b></p>
<p><b>  &lt;head&gt;</b></p>
<p><b>    &lt;meta charset=&#8221;utf-8&#8243;&gt;</b></p>
<p><b>    &lt;title&gt;Flask Parent Template&lt;/title&gt;</b></p>
<p><b>    &lt;link rel=&#8221;stylesheet&#8221; href=&#8221;{{ url_for(&#8216;static&#8217;,    filename=&#8217;css/template.css&#8217;) }}&#8221;&gt;</b></p>
<p><b>&lt;/head&gt;</b></p>
<p><b>  &lt;body&gt;</b></p>
<p><b>    &lt;header&gt;</b></p>
<p><b>      &lt;div class=&#8221;container&#8221;&gt;</b></p>
<p><b>        &lt;h1 class=&#8221;logo&#8221;&gt;First Web App&lt;/h1&gt;</b></p>
<p><b>        &lt;strong&gt;&lt;nav&gt;</b></p>
<p><b>          &lt;ul class=&#8221;menu&#8221;&gt;</b></p>
<p><b>            &lt;li&gt;&lt;a href=&#8221;{{ url_for(&#8216;home&#8217;) }}&#8221;&gt;Home&lt;/a&gt;&lt;/li&gt;</b></p>
<p><b>            &lt;li&gt;&lt;a href=&#8221;{{ url_for(&#8216;about&#8217;) }}&#8221;&gt;About&lt;/a&gt;&lt;/li&gt;</b></p>
<p><b>          &lt;/ul&gt;</b></p>
<p><b>        &lt;/nav&gt;&lt;/strong&gt;</b></p>
<p><b>      &lt;/div&gt;</b></p>
<p><b>    &lt;/header&gt;</b></p>
<p><b>{% block content %}</b></p>
<p><b>{% endblock %}</b></p>
<p><b> &lt;/body&gt;</b></p>
<p><b>&lt;/html&gt;</b></p>
<p><b>Making use of Flask and virtualenv</b></p>
<p><span style="font-weight: 400;">Now you would probably know about using Flask, to go ahead let us know about the usage of virtualenv.</span></p>
<p><b>Why use virtualenv?</b></p>
<p><span style="font-weight: 400;">You may make use of Python for your projects besides web development. Your projects might have various versions of Python installed, different dependencies and packages.</span></p>
<p><span style="font-weight: 400;">We make use of virtualenv to create an isolated environment for your Python project. This indicates that each project can have its own dependencies regardless of what dependencies every other project has.</span></p>
<p><b>Getting started with virtualenv</b></p>
<p><span style="font-weight: 400;">Initially, run this command on your Command Prompt or Terminal:</span></p>
<p><b>pip install virtualenv</b></p>
<p><span style="font-weight: 400;">The next thing is to:</span></p>
<p><b>virtualenv “name of the virtual environment”</b></p>
<p><b>Activating the virtual environment</b></p>
<p><span style="font-weight: 400;">Now operate your terminal or command prompt. Go to the directory which contains the file called activate. The file termed as activate is found inside a folder called Scripts for Windows and bin for OS X and Linux.</span></p>
<p><b>For OS X and Linux Environment:</b></p>
<p><span style="font-weight: 400;">$ name of virtual environmnet/bin/activate</span></p>
<p><b>For Windows Environment:</b></p>
<p><b>name of virtual environment\Scripts\activate</b></p>
<p><span style="font-weight: 400;">You should see this at the opening of your command prompt line:</span></p>
<p><span style="font-weight: 400;">The subsequent step is to install flask on your virtual environment so that we can run the application inside our environment. Run the command:</span></p>
<p><b>pip install flask</b></p>
<p><span style="font-weight: 400;">Run your application and go to http://localhost:5000/</span></p>
<p><span style="font-weight: 400;">We finally made our web application! </span></p>
<p><span style="font-weight: 400;">Now let’s deploy to the cloud!</span></p>
<p><b>Deploying the Application</b></p>
<p><span style="font-weight: 400;">To deploy the application to Google App Engine, use this command.</span></p>
<p><b>gcloud app deploy</b></p>
<p><span style="font-weight: 400;">This specifies what project you are deploying. </span></p>
<p><span style="font-weight: 400;">The command will look like this:</span></p>
<p><span style="font-weight: 400;">gcloud app deploy &#8211;project [ID of Project]</span></p>
<p><b>The Application</b></p>
<p><span style="font-weight: 400;">Now check the URL of your application. </span></p>
<p><span style="font-weight: 400;">The application gets stored in the following way:</span></p>
<p><span style="font-weight: 400;">&#8220;your project id&#8221;.appspot.com</span></p>
<p><b>Final Verdict</b></p>
<p><span style="font-weight: 400;">Now you develop your web applications with flask and deploy them in the cloud with these simple steps!</span></p>
<p><span style="font-weight: 400;">If you found this article useful, do share your thoughts in the comments section anytime!</span></p>
<p><span style="font-weight: 400;">Happy Reading <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sumanastech.com/deploy-your-web-applications-to-the-cloud-right-away-here-is-how-you-can/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Lost your PEM files? Use these steps to connect AWS Instance!</title>
		<link>https://www.sumanastech.com/lost-your-pem-files-use-these-steps-to-connect-aws-instance/</link>
					<comments>https://www.sumanastech.com/lost-your-pem-files-use-these-steps-to-connect-aws-instance/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Mon, 25 Feb 2019 05:57:22 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[PEM]]></category>
		<category><![CDATA[Services]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://www.sumanastech.com/?p=1500</guid>

					<description><![CDATA[Worried about your PEM files? Here we have listed out a set of strategies you need to follow to get connected with AWS Instance. This process is applicable if you have lost your .pem or .ppk key. Initially, you need to take a snapshot of the root volume of your instance. Secondly, you can create [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Worried about your PEM files? Here we have listed out a set of strategies you need to follow to get connected with AWS Instance.<br></p>



<p>This process is applicable if you have lost your .pem or .ppk key.<br></p>



<figure class="wp-block-image"><img decoding="async" src="https://lh5.googleusercontent.com/GZb5IVNe6J3vq2qMIXHOq8D0WadUOlEmlJhITN7avjzJglVartf8b6Pj5um5VlJcbMl9jRH5V9dnWyLPhuNJW_4XbYXxoQ8AK29dc-ZjAMSDWZTNHQu4td53IuxU6oX1sIsJxgGr" alt=""/></figure>



<p></p>



<ul class="wp-block-list"><li>Initially, you need to take a snapshot of the root volume of your instance.</li></ul>



<ul class="wp-block-list"><li>Secondly, you can create a new instance (for temporary purposes) in the same AZ just as the original instance. And remember, it is highly suggested that the recovery instance should be same as OS.</li></ul>



<ul class="wp-block-list"><li>Once you create a snapshot of the instance, you need to stop the original instance.</li></ul>



<ul class="wp-block-list"><li>You need to detach the root EBS volume from the original instance and make sure you make a note of volume (example /dev/xda or /dev/sda).</li></ul>



<ul class="wp-block-list"><li>Once you are done with detaching, refer to the status column. Ensure the status being changed to availability. Attach this detached volume to the newly created temporary instance.</li></ul>



<ul class="wp-block-list"><li>Make sure you mention your instance name while attaching the volume and device name like /dev/sdf or /dev/xdf.</li></ul>



<ul class="wp-block-list"><li>The next steps are <g class="gr_ gr_6 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="6" data-gr-id="6">to</g> mount it in /mnt folder since it is a secondary folder.</li></ul>



<p><strong>Commands to list attached block devices:</strong></p>



<div  class="comment-text">
<p><br><strong>$ &nbsp;</strong><strong>lsblk </strong><strong><br></strong><strong><br></strong><strong> xvda 202:0 0 8G 0 disk</strong><strong><br></strong><strong> </strong><strong>	</strong><strong>└─xvda1 202:1 0 8G 0 part / </strong><strong><br></strong><strong>xvdf 202:80 0 8G 0 disk </strong><strong><br></strong><strong>└─xvdf1 202:81 0 8G 0 part </strong><strong><br><br></strong></p>
</div>



<ul class="wp-block-list"><li>Mount the secondary device (dev/xvdf1) to &#8216;/mnt&#8217; mount point using the command: </li></ul>



<p class="comment-text"><strong># mount /dev/xvdf1 /mnt/</strong><br></p>



<ul class="wp-block-list"><li>If you need to change the authorized key in original instance, check the .ssh directory.</li></ul>



<ul class="wp-block-list"><li>You need to create a backup of the old authorized key in the original instance.</li></ul>



<p class="comment-text"><strong>/mnt/home/ubuntu/.ssh/authorized_keys to &nbsp;/mnt/home/ubuntu/.ssh/authorized_keys_back</strong><br></p>



<p>Using the command:	<br></p>



<p class="comment-text"><strong>cp /mnt/home/ubuntu/.ssh/authorized_keys /mnt/home/ubuntu/.ssh/authorized_keys.bck</strong><br></p>



<ul class="wp-block-list"><li>You need to append the new key to the authorized_keys file of the original instance<br><br></li></ul>



<p>You can use the Command:<br></p>



<p class="comment-text"><strong>cat /home/ubuntu/.ssh/authorized_keys &gt;&gt; </strong></p>



<p class="comment-text"><strong>/mnt/home/ubuntu/.ssh/authorized_keys </strong><br></p>



<ul class="wp-block-list"><li>Once you have appended, unmount the original instance volume from the temporary instance.</li></ul>



<p>You can perform this with the Command:<br></p>



<p class="comment-text"><strong># umount /mnt</strong><br></p>



<ul class="wp-block-list"><li>You can attach the volume back to the original instance. This can be done <strong>/dev/sda1 </strong>during the attach of the root volume back to the instance.</li></ul>



<ul class="wp-block-list"><li>Finally, you can start the original instance and connect using temporary instance pem file and access file.</li></ul>



<p><strong>Wrap Up</strong><br></p>



<p>We hope now you would be relaxed! You can make use of this proven track strategy if you have lost your .ppm or ppk key.<br></p>



<p>If you have any other suggestions or queries, do register your comments in the comments section below!<br></p>



<p>Thanks for reading!<br></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sumanastech.com/lost-your-pem-files-use-these-steps-to-connect-aws-instance/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Lost your PEM files? Use these steps to connect AWS Instance!</title>
		<link>https://www.sumanastech.com/lost-your-pem-files-use-these-steps-to-connect-aws-instance-2/</link>
					<comments>https://www.sumanastech.com/lost-your-pem-files-use-these-steps-to-connect-aws-instance-2/#respond</comments>
		
		<dc:creator><![CDATA[sumanasweb]]></dc:creator>
		<pubDate>Mon, 25 Feb 2019 05:57:22 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[PEM]]></category>
		<category><![CDATA[Services]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://www.sumanastech.com/?p=1500</guid>

					<description><![CDATA[Worried about your PEM files? Here we have listed out a set of strategies you need to follow to get connected with AWS Instance. This process is applicable if you have lost your .pem or .ppk key. Initially, you need to take a snapshot of the root volume of your instance. Secondly, you can create [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Worried about your PEM files? Here we have listed out a set of strategies you need to follow to get connected with AWS Instance.<br></p>



<p>This process is applicable if you have lost your .pem or .ppk key.<br></p>



<figure class="wp-block-image"><img decoding="async" src="https://lh5.googleusercontent.com/GZb5IVNe6J3vq2qMIXHOq8D0WadUOlEmlJhITN7avjzJglVartf8b6Pj5um5VlJcbMl9jRH5V9dnWyLPhuNJW_4XbYXxoQ8AK29dc-ZjAMSDWZTNHQu4td53IuxU6oX1sIsJxgGr" alt=""/></figure>



<p></p>



<ul class="wp-block-list"><li>Initially, you need to take a snapshot of the root volume of your instance.</li></ul>



<ul class="wp-block-list"><li>Secondly, you can create a new instance (for temporary purposes) in the same AZ just as the original instance. And remember, it is highly suggested that the recovery instance should be same as OS.</li></ul>



<ul class="wp-block-list"><li>Once you create a snapshot of the instance, you need to stop the original instance.</li></ul>



<ul class="wp-block-list"><li>You need to detach the root EBS volume from the original instance and make sure you make a note of volume (example /dev/xda or /dev/sda).</li></ul>



<ul class="wp-block-list"><li>Once you are done with detaching, refer to the status column. Ensure the status being changed to availability. Attach this detached volume to the newly created temporary instance.</li></ul>



<ul class="wp-block-list"><li>Make sure you mention your instance name while attaching the volume and device name like /dev/sdf or /dev/xdf.</li></ul>



<ul class="wp-block-list"><li>The next steps are <g class="gr_ gr_6 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="6" data-gr-id="6">to</g> mount it in /mnt folder since it is a secondary folder.</li></ul>



<p><strong>Commands to list attached block devices:</strong></p>



<div  class="comment-text">
<p><br><strong>$ &nbsp;</strong><strong>lsblk </strong><strong><br></strong><strong><br></strong><strong> xvda 202:0 0 8G 0 disk</strong><strong><br></strong><strong> </strong><strong>	</strong><strong>└─xvda1 202:1 0 8G 0 part / </strong><strong><br></strong><strong>xvdf 202:80 0 8G 0 disk </strong><strong><br></strong><strong>└─xvdf1 202:81 0 8G 0 part </strong><strong><br><br></strong></p>
</div>



<ul class="wp-block-list"><li>Mount the secondary device (dev/xvdf1) to &#8216;/mnt&#8217; mount point using the command: </li></ul>



<p class="comment-text"><strong># mount /dev/xvdf1 /mnt/</strong><br></p>



<ul class="wp-block-list"><li>If you need to change the authorized key in original instance, check the .ssh directory.</li></ul>



<ul class="wp-block-list"><li>You need to create a backup of the old authorized key in the original instance.</li></ul>



<p class="comment-text"><strong>/mnt/home/ubuntu/.ssh/authorized_keys to &nbsp;/mnt/home/ubuntu/.ssh/authorized_keys_back</strong><br></p>



<p>Using the command:	<br></p>



<p class="comment-text"><strong>cp /mnt/home/ubuntu/.ssh/authorized_keys /mnt/home/ubuntu/.ssh/authorized_keys.bck</strong><br></p>



<ul class="wp-block-list"><li>You need to append the new key to the authorized_keys file of the original instance<br><br></li></ul>



<p>You can use the Command:<br></p>



<p class="comment-text"><strong>cat /home/ubuntu/.ssh/authorized_keys &gt;&gt; </strong></p>



<p class="comment-text"><strong>/mnt/home/ubuntu/.ssh/authorized_keys </strong><br></p>



<ul class="wp-block-list"><li>Once you have appended, unmount the original instance volume from the temporary instance.</li></ul>



<p>You can perform this with the Command:<br></p>



<p class="comment-text"><strong># umount /mnt</strong><br></p>



<ul class="wp-block-list"><li>You can attach the volume back to the original instance. This can be done <strong>/dev/sda1 </strong>during the attach of the root volume back to the instance.</li></ul>



<ul class="wp-block-list"><li>Finally, you can start the original instance and connect using temporary instance pem file and access file.</li></ul>



<p><strong>Wrap Up</strong><br></p>



<p>We hope now you would be relaxed! You can make use of this proven track strategy if you have lost your .ppm or ppk key.<br></p>



<p>If you have any other suggestions or queries, do register your comments in the comments section below!<br></p>



<p>Thanks for reading!<br></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sumanastech.com/lost-your-pem-files-use-these-steps-to-connect-aws-instance-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
