<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ramu Ummadishetty</title>
    <description>The latest articles on Forem by Ramu Ummadishetty (@ramushetty).</description>
    <link>https://forem.com/ramushetty</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F570715%2F52be0be8-a647-4ff7-861a-f92d7d9a9444.jpeg</url>
      <title>Forem: Ramu Ummadishetty</title>
      <link>https://forem.com/ramushetty</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ramushetty"/>
    <language>en</language>
    <item>
      <title>Token vs Session Based Authentication</title>
      <dc:creator>Ramu Ummadishetty</dc:creator>
      <pubDate>Tue, 25 Oct 2022 09:11:41 +0000</pubDate>
      <link>https://forem.com/ramushetty/token-vs-session-based-authentication-3bhi</link>
      <guid>https://forem.com/ramushetty/token-vs-session-based-authentication-3bhi</guid>
      <description>&lt;h1&gt;
  
  
  Session based authentication
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;In session based authentication server stores the user information and each users has a corresponding session ID to validate them.&lt;/li&gt;
&lt;li&gt;Session based or token based authentication is a process that allows the server to handle multiple requests from the same user without asking the user to login again&lt;/li&gt;
&lt;li&gt;When user log out server ends the session or invalidate the token and revokes the authentication&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Most of the time this session ID and Token is shared to browser in form of HTTP cookie. For each request this cookie is included for validating the user&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Token based Authentication
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Token-based authentication system stores this info directly in some sort of token.&lt;/li&gt;
&lt;li&gt;Using token server decodes it for user identity and it reduces the process of storing the session ID's &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Token auth flow
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Users login with their credentials.&lt;/li&gt;
&lt;li&gt;Those credentials are provided to server for validation and if those are valid a signed token will be given to user&lt;/li&gt;
&lt;li&gt;For each request and response this signed token is included for user identity &lt;/li&gt;
&lt;li&gt;This token can be included in headers or cookies&lt;/li&gt;
&lt;li&gt;Every time server upon validating the token shares the resources for user&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Token security
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Integrity of token is protected by signing the token and verifying its signature each time when it arrives at server&lt;/li&gt;
&lt;li&gt;Server uses secret key to generate the special string for signing the token. If any user or third party tampers the token signature will be not valid &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check for JSON Web Tokens &lt;a href="https://dev.to/ramushetty/json-web-tokens-4l7g"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>jwt</category>
      <category>auth</category>
      <category>token</category>
      <category>beginners</category>
    </item>
    <item>
      <title>JSON Web Tokens</title>
      <dc:creator>Ramu Ummadishetty</dc:creator>
      <pubDate>Tue, 25 Oct 2022 09:11:18 +0000</pubDate>
      <link>https://forem.com/ramushetty/json-web-tokens-4l7g</link>
      <guid>https://forem.com/ramushetty/json-web-tokens-4l7g</guid>
      <description>&lt;p&gt;JSON web token is one of the most commonly used type of authentication tokens. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It consists of three components &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Header, Payload, signature&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;All this 3 are separated by '.' &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Header.payload.signature&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is base64url-encoded string &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Header
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9&lt;/code&gt; - is a header consists of algorithm used to generate the signature.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
  "alg": "HS256",&lt;br&gt;
  "typ": "JWT"&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Payload
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ&lt;/code&gt; - This contains the user meta data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Signature
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c&lt;/code&gt; - It helps to validate the token that no one is tampered with it &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Token's signatures need to be verified at server end compulsory.&lt;/p&gt;

&lt;p&gt;Token need to restricted with 'alg' field in backend with some algorithm it should not left to 'none'&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  HMAC and RSA
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;HMAC requires the token to be signed with a key and then later verified with the same key(secret key)&lt;/li&gt;
&lt;li&gt;RSA token first creates with private key and it is verified with public key later&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading &lt;/p&gt;

&lt;p&gt;Read my &lt;a href="https://dev.to/ramushetty/token-vs-session-based-authentication-3bhi"&gt;article&lt;/a&gt; about token based authentication&lt;/p&gt;

</description>
      <category>token</category>
      <category>json</category>
      <category>auth</category>
    </item>
    <item>
      <title>NGINX</title>
      <dc:creator>Ramu Ummadishetty</dc:creator>
      <pubDate>Mon, 24 Oct 2022 14:53:51 +0000</pubDate>
      <link>https://forem.com/ramushetty/nginx-installing-32ff</link>
      <guid>https://forem.com/ramushetty/nginx-installing-32ff</guid>
      <description>&lt;h1&gt;
  
  
  Installing in Debian/Ubuntu Machine
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Installing from Ubuntu repository
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To verify the nginx installation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl status nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--89iVRrmQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7yhpp58biojomhxxjnv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--89iVRrmQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7yhpp58biojomhxxjnv.png" alt="Image description" width="627" height="93"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WrgZ2ROB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umr28f90sp7fwxrw1b72.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WrgZ2ROB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umr28f90sp7fwxrw1b72.png" alt="Image description" width="448" height="38"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Uninstalling Nginx
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get purge nginx nginx-common
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;from Ubuntu repo we get outdated nginx version so for latest we can install from nginx repo &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Installing from Official Nginx repository
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo wget https://nginx.org/keys/nginx_signing.key
$ sudo apt-key add nginx_signing.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo vi /etc/apt/sources.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*Here i am using vi editor to save the changes use Esc :wq&lt;br&gt;
*Add the below two lines into this sources.list &lt;br&gt;
&lt;code&gt;deb https://nginx.org/packages/mainline/debian/ &amp;lt;CODENAME&amp;gt; nginx&lt;br&gt;
deb-src https://nginx.org/packages/mainline/debian/ &amp;lt;CODENAME&amp;gt; nginx&lt;/code&gt;&lt;br&gt;
Here replace CODENAME with your OS CODENAME&lt;br&gt;
to know CODENAME use this cmd&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo cat /etc/lsb-release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P2Qsm4k3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3a2llkkg8x2jl02aofd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P2Qsm4k3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t3a2llkkg8x2jl02aofd.png" alt="Image description" width="580" height="95"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; $ sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt-get install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xQrPx0JN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zr3ank9ag0qzbs95crt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xQrPx0JN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zr3ank9ag0qzbs95crt.png" alt="Image description" width="452" height="41"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To know nginx status
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl status nginx

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZDl6k5yx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnmu3trs4rs4q4pil4p1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZDl6k5yx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnmu3trs4rs4q4pil4p1.png" alt="Image description" width="743" height="88"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;using PS we can get the nginx status
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ps -ef | grep nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will find master and worker process then its working fine&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OBcXFKQX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umhfz1ya4093xauvizp1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OBcXFKQX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umhfz1ya4093xauvizp1.png" alt="Image description" width="741" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;http://localhost/&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nginx by default runs on port 80, HTTP server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uxLGxgtT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ze27qsjx2p2ecq8wttmh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uxLGxgtT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ze27qsjx2p2ecq8wttmh.png" alt="Image description" width="880" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start nginx
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo systemctl start nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Key nginx folders,files,cmds
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;/etc/nginx/&lt;/code&gt; - default nginx configuration files located here&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f2ZkdZvQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tlvpdoxvw812gtuu85ac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f2ZkdZvQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tlvpdoxvw812gtuu85ac.png" alt="Image description" width="767" height="70"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/etc/nginx/nginx.conf&lt;/code&gt; - default nginx configuration entry point used by nginx service.Contain the global settings like logs location,workers, files locations etc&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YdkOIF_X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thoxhgtqe6zm0t93p3qs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YdkOIF_X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thoxhgtqe6zm0t93p3qs.png" alt="Image description" width="714" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/etc/nginx/conf.d&lt;/code&gt; - default http server configuration file,which is added in http directive of nginx.conf referred using inculde(include /etc/nginx/conf.d/*.conf;)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/var/log/nginx&lt;/code&gt; - store the access and error log of nginx server.&lt;br&gt;
access.log - logs each request&lt;br&gt;
error.log - logs error events and for debugging&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ nginx -v
$ nginx -V
$ nginx -t
$ nginx -v
$ nginx -h

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zhSIaGG6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/onex8to0978t02i6fqdt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zhSIaGG6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/onex8to0978t02i6fqdt.png" alt="Image description" width="733" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>server</category>
    </item>
    <item>
      <title>Python UNIT Testing</title>
      <dc:creator>Ramu Ummadishetty</dc:creator>
      <pubDate>Tue, 13 Jul 2021 12:53:56 +0000</pubDate>
      <link>https://forem.com/ramushetty/python-unit-testing-2b3p</link>
      <guid>https://forem.com/ramushetty/python-unit-testing-2b3p</guid>
      <description>&lt;h1&gt;
  
  
  UNIT Testing
&lt;/h1&gt;

&lt;p&gt;It is the processing of testing whether a particular unit is working properly or not is called unit testing&lt;/p&gt;

&lt;h1&gt;
  
  
  Test Scenario vs Test Case vs Test Suite
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Test Scenario consists of multiple test case for single scenario&lt;/li&gt;
&lt;li&gt;So there will be different scenarios consists of test cases for a given application example of one scenario is testing login functionality.&lt;/li&gt;
&lt;li&gt;Test Suite is something like grouping of test cases and executing them at a time&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Implementing Python Unit testing
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;We will use Python in-built module &lt;strong&gt;unittest&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;We will  use &lt;strong&gt;TestCase&lt;/strong&gt; class to implement&lt;/li&gt;
&lt;li&gt;We also use 3 instance methods &lt;strong&gt;setUp(), test(), tearDown()&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here is the simple test class&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wDccXfUb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obnzxr2vrxyila0t4b63.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wDccXfUb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obnzxr2vrxyila0t4b63.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Output of above code is &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SHce8rZI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dowo3gufp6a3isitzvmj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SHce8rZI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dowo3gufp6a3isitzvmj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here we need to be careful that setUp and tearDown method names are fixed but we can change the test method name as we like bit it need to be prefix with "test" example test_sample(), test1().&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We can include as many test methods we want into the class&lt;/p&gt;
&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For every test method setUp(),tearDown() methods will be executed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To avoid this repeated call of setUp and tearDown methods we can use &lt;strong&gt;setUpClass(), tearDownClass()&lt;/strong&gt; methods, now only one time setup and teardown methods are called regardless of how many number of testcases.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hf4B1NkD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z4ea5me8gwpc7jkml8mv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hf4B1NkD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z4ea5me8gwpc7jkml8mv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;O/P&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kusOQc29--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3e60n9pg3v9e6bb454a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kusOQc29--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3e60n9pg3v9e6bb454a.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also use assert functions in test method &lt;/p&gt;

&lt;p&gt;Hope you learned something!!!&lt;br&gt;
Happy coding!!!&lt;/p&gt;

</description>
      <category>python</category>
      <category>testing</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>AMI=Amazon Machine Image,Custom AMI</title>
      <dc:creator>Ramu Ummadishetty</dc:creator>
      <pubDate>Sat, 03 Jul 2021 15:40:33 +0000</pubDate>
      <link>https://forem.com/ramushetty/ami-amazon-machine-image-custom-ami-hg4</link>
      <guid>https://forem.com/ramushetty/ami-amazon-machine-image-custom-ami-hg4</guid>
      <description>&lt;ul&gt;
&lt;li&gt;AMI is something like preconfigured template with required server configuration. &lt;/li&gt;
&lt;li&gt;By using this AMI we can quickly create as many instance we want 
&lt;strong&gt;Creating your own custom AMI&lt;/strong&gt;
For creating custom AMI you need to have your own instance running.
If you don't know how to create a instance please check this article below
&lt;div class="ltag__link"&gt;
  &lt;a href="/ramushetty" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QQ43H4ZB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--mCEVjEZ0--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/570715/52be0be8-a647-4ff7-861a-f92d7d9a9444.jpeg" alt="ramushetty"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ramushetty/aws-creating-an-ec2-instance-29fl" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;AWS Creating an EC2 Instance&lt;/h2&gt;
      &lt;h3&gt;Ramu Ummadishetty ・ Jun 23 ・ 2 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#aws&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#cloud&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JiFlhrAF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3umne4feu6s31r7xrdny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JiFlhrAF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3umne4feu6s31r7xrdny.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you have instance go to instances select your instance click on &lt;strong&gt;Actions&lt;/strong&gt; and click on &lt;strong&gt;Image and Templates&lt;/strong&gt; and select &lt;strong&gt;Create Image&lt;/strong&gt; and enter create image&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Enter your image name&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5YJifjLY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owh4w7az0290pq2yhesw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5YJifjLY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owh4w7az0290pq2yhesw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to AMI section which is present in the side nav bar&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here you can find your AMIs&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8Fh6zLGL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fl2yq8q0mt2j1j96kwdb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8Fh6zLGL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fl2yq8q0mt2j1j96kwdb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once the AMI is available go to instances click on launch instance&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AP0gWo7_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qdhxzhvb8ccab6acovi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AP0gWo7_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qdhxzhvb8ccab6acovi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now here in choose AMI section select &lt;strong&gt;My AMIs&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fMJ6x9XC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrfd3bqzqocxyqcaze23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fMJ6x9XC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nrfd3bqzqocxyqcaze23.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can see your own custom created AMI here 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0A6oboc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zgioho30147vue1mhyts.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Select it and follow the same instructions that we use for creating instance.&lt;/p&gt;

&lt;p&gt;That's it, hope you enjoyed it!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>EBS-Elastic Block Store, Creating Additional Volume,Snapshots</title>
      <dc:creator>Ramu Ummadishetty</dc:creator>
      <pubDate>Mon, 28 Jun 2021 14:54:28 +0000</pubDate>
      <link>https://forem.com/ramushetty/ebs-elastic-block-store-3ab8</link>
      <guid>https://forem.com/ramushetty/ebs-elastic-block-store-3ab8</guid>
      <description>&lt;p&gt;EBS is a &lt;strong&gt;storage volume&lt;/strong&gt; for an EC2 instance.&lt;/p&gt;

&lt;p&gt;By default while creating EC2 instance root volume is used &lt;br&gt;
EBS is something like hard disk&lt;/p&gt;

&lt;p&gt;Root volumes are set to deleted when instance is terminated.&lt;br&gt;
In this case we can use additional volumes which can be attached and detached at any time from the instance and it is not deleted by default when instance is deleted&lt;br&gt;
Additional volumes can be attached to running instance in same availability zone&lt;br&gt;
Table Of Contents&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating Additional Volume for instance&lt;/li&gt;
&lt;li&gt;Disk Read/Write operations&lt;/li&gt;
&lt;li&gt;Unmount Additional Volume&lt;/li&gt;
&lt;li&gt;Snapshot of EBS  Volume&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Creating additional volume &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step1&lt;/strong&gt;&lt;br&gt;
First you need to have running instance to attach a volume to it&lt;br&gt;
If you don't have running instance please check this &lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/ramushetty" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F570715%2F52be0be8-a647-4ff7-861a-f92d7d9a9444.jpeg" alt="ramushetty"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ramushetty/aws-creating-an-ec2-instance-29fl" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;AWS Creating an EC2 Instance&lt;/h2&gt;
      &lt;h3&gt;Ramu Ummadishetty ・ Jun 23 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#aws&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#cloud&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
 to create EC2 instance

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftoq89gpck0mxprcf5fqe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftoq89gpck0mxprcf5fqe.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Click on Volumes in Elastic Block store which is present in left sidebar&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcsqcuzrbx2ld4j1osh2d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcsqcuzrbx2ld4j1osh2d.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F42aji8mrc8vqevvpewv0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F42aji8mrc8vqevvpewv0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After getting into volumes Click on &lt;strong&gt;Create Volume&lt;/strong&gt;&lt;br&gt;
 &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjm3a8ufy6xcbb9iu8mt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjm3a8ufy6xcbb9iu8mt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flqyc9ft593s20q8hzn0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flqyc9ft593s20q8hzn0y.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure you select the current available zone of which your instance is running.Select the additional volume size&lt;br&gt;
Add tag nothing but your additional volume name and then click on create volume&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F27chvlmhwyrpwqed1p7q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F27chvlmhwyrpwqed1p7q.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Successfully volume created now it is available to attach to any instance&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flioayoacru0145qrmeu8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flioayoacru0145qrmeu8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now select additional volume and click on attach then select Attach Volume&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flw6no1d3x3ryg93jqgvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flw6no1d3x3ryg93jqgvb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the instance that you want to attach and click on attach &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhpg1g4amzemfz0vypq9p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhpg1g4amzemfz0vypq9p.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now volume status will be in-use&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmldmk05nacspv5qzjqiv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmldmk05nacspv5qzjqiv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Making disk usable &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Now connect to your instance using ssh and execute following cmd&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo fdisk -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you can see &lt;br&gt;
Disk /dev/xvda - root volume&lt;br&gt;
Disk /dev/xvdf - additional volume&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybnrmkisxu51t0glhvcj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybnrmkisxu51t0glhvcj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Its not enough that attaching a volume doesn't make that additional volume usable.&lt;br&gt;
It just like new pen drive we need to format and mount it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# sudo mkfs.ext4 /dev/xvdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# mkdir myfolder
# sudo mount /dev/xvdf myfolder/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbklrwm0izri5tr6fol1g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbklrwm0izri5tr6fol1g.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it is successfully attached and we can use it for read and write operations&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb13avf9f088g7otqqcwl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb13avf9f088g7otqqcwl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Unmount  additional volume &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# umount myfolder/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Don't detach additional volume directly from EBS please unmount it in specific instance&lt;/p&gt;

&lt;p&gt;you can cross-check again &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxv13i54z08k9o0g4hv3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxv13i54z08k9o0g4hv3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now go to the EBS volumes tab and select additional volume and detach it &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18ftyefideifq6p7gmvj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18ftyefideifq6p7gmvj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the detached volume will be available for use and data created in it will be also persisted and we can also attach it to another running instance &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feid15qm5z4th05xfvjdr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feid15qm5z4th05xfvjdr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: Please don't use this below cmd if you want data to be persisted while attaching the volume to another instance&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo mkfs.ext4 /dev/xvdf&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;If you use the above cmd again means data will be erased &lt;br&gt;
use the above cmd only when it is new volume&lt;/p&gt;

&lt;p&gt;just use below cmds and mount the additional volume in any instance&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# mkdir myfolder
# sudo mount /dev/xvdf myfolder/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Snapshot of EBS volume &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Note: Your created additional volume can be used only for one instance at a time and can not be used for multiple instances parallel&lt;/p&gt;

&lt;p&gt;When you want to share one volume data to multiple instance then create a snapshot of that volume and create another new volume using that snapshot as template&lt;/p&gt;

&lt;p&gt;Here snapshot is nothing but "image" of am EBS volume, which can be used as backup of volume or used to create a duplicate.&lt;br&gt;
You need to be clear that snapshot can not be attached and detached to an EC2 instance it is not an active EBS volume&lt;br&gt;
But, one can create EBS volume using this snapshot&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating snapshot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlkijl9pvi79m794r3up.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlkijl9pvi79m794r3up.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Click on Volumes and select a volume that you want to  create a snapshot, go to  actions and click on create snapshot&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nn6bsn9490nt0mbf5au.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nn6bsn9490nt0mbf5au.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Enter Description and click on Create snapshot&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bocmzzd0pb89ptv6ric.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bocmzzd0pb89ptv6ric.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Now go to snapshot section and you can see the list of snapshots &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faddpx6pkxqdaze9avd1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faddpx6pkxqdaze9avd1u.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Select the snapshot click on actions and select create volume&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2ozgw0n486x3llx3qsb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2ozgw0n486x3llx3qsb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: here size need to be &amp;gt;= volume size not less than volume&lt;br&gt;
Select availability zone and click on create volume&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7a672nfu60iziasres7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7a672nfu60iziasres7i.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Go to Volumes you find new volume created you use add tag for specifying names to volumes while creating it or else you can also edit directly on double click on Name of volume&lt;/p&gt;

&lt;p&gt;As it is not new volumes you can directly mount it to any instance with out formatting it &lt;/p&gt;

</description>
      <category>aws</category>
      <category>tutorial</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>AWS Creating an EC2 Instance</title>
      <dc:creator>Ramu Ummadishetty</dc:creator>
      <pubDate>Wed, 23 Jun 2021 15:20:30 +0000</pubDate>
      <link>https://forem.com/ramushetty/aws-creating-an-ec2-instance-29fl</link>
      <guid>https://forem.com/ramushetty/aws-creating-an-ec2-instance-29fl</guid>
      <description>&lt;p&gt;EC2 stands for Amazon Elastic Compute cloud.Simple way you will get a VM in the cloud just like your PC.&lt;br&gt;
Advantage of this EC2 is scalable computing capacity, can launch as many as virtual servers as you required.&lt;/p&gt;

&lt;p&gt;Now will see how to configure EC2 in AWS&lt;br&gt;
Before configuration make sure that you have sign up in AWS&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step1&lt;/strong&gt;&lt;br&gt;
click on services on top left and click on EC2 under compute section&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p1tm--Q7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b6bvetj0c4g7q5h9aute.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p1tm--Q7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b6bvetj0c4g7q5h9aute.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step2&lt;/strong&gt; &lt;br&gt;
click on launch instance&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Th7PHxIu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr18pjqarjl7t4dh1g6h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Th7PHxIu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr18pjqarjl7t4dh1g6h.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;setp3&lt;/strong&gt;&lt;br&gt;
Here in the search box please search and select for your required operating system that needed to be present in the instance&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1A37q-8h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x2esj9gzmmqkzsxkhynu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1A37q-8h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x2esj9gzmmqkzsxkhynu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;step4&lt;/strong&gt;&lt;br&gt;
Choose instance type based on your requirement&lt;br&gt;
and click on next: configure instance details present below&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step5&lt;/strong&gt;&lt;br&gt;
select your required region and number of instance and click on add storage&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kFv_PhZb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzdayqmpjz0h3vu3lqlh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kFv_PhZb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzdayqmpjz0h3vu3lqlh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step6&lt;/strong&gt;&lt;br&gt;
select the storage and click on add tag&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GMmPV6Rq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/72ir0pugowaj18lmntb0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GMmPV6Rq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/72ir0pugowaj18lmntb0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step7&lt;/strong&gt;&lt;br&gt;
click on add new tag name &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sMTNoICE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r3iynsdxwxzwkpgajhxd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sMTNoICE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r3iynsdxwxzwkpgajhxd.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step8&lt;/strong&gt;&lt;br&gt;
Here configure your security group like click on add rule and add what ever the protocols you needed &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z29533MX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bs4bi0nlotox1xdyt5bp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z29533MX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bs4bi0nlotox1xdyt5bp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step9&lt;/strong&gt;&lt;br&gt;
click on review and launch instance &lt;br&gt;
create new .pem file like it creates public key and private key &lt;br&gt;
where you download private key which is used for connecting to instance from your machine &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hP4GSxOv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hytsnptreilychbdwyr3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hP4GSxOv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hytsnptreilychbdwyr3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
make sure that you .pem file only works for the selected region instance only &lt;br&gt;
click on launch instance&lt;/p&gt;

&lt;p&gt;Again click on service , EC2 and click on running instances&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---1ujD9hi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d72mqbsseb5z68ax4cp4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---1ujD9hi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d72mqbsseb5z68ax4cp4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;select  and click on connect on top&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VfwncFY5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9irvnkw2io0ys73goav4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VfwncFY5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9irvnkw2io0ys73goav4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will find ssh client and ssh cmd&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Tat3geaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nsm92g348t4vbtemcj4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tat3geaN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nsm92g348t4vbtemcj4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;use that in your git bash or terminal to connect to server&lt;br&gt;
Make sure you use 'sudo' if you get permission denied error&lt;/p&gt;

&lt;p&gt;Note: Please select free instance if you are new to AWS&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>OAuth2 Authorization Grants</title>
      <dc:creator>Ramu Ummadishetty</dc:creator>
      <pubDate>Sun, 31 Jan 2021 11:48:49 +0000</pubDate>
      <link>https://forem.com/ramushetty/oauth2-authorization-grants-313i</link>
      <guid>https://forem.com/ramushetty/oauth2-authorization-grants-313i</guid>
      <description>&lt;h2&gt;
  
  
  What is OAuth?
&lt;/h2&gt;

&lt;p&gt;OAuth is an open standard used for authorization;i.e to grant access to data or functionality etc without having to deal with the original authentication.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication vs Authorization
&lt;/h2&gt;

&lt;p&gt;Authentication is confirming your own identity whereas authorization is giving access to the system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different type of Authorization Grants
&lt;/h2&gt;

&lt;p&gt;There are four Authorization Grant type and used in different contexts&lt;br&gt;
&lt;strong&gt;Authorization code:&lt;/strong&gt; used for backend web apps&lt;br&gt;
&lt;strong&gt;Implicit:&lt;/strong&gt; used for SPA applications executing on the browser&lt;br&gt;
&lt;strong&gt;Client credentials:&lt;/strong&gt; used for machine to machine authentication of service accounts&lt;br&gt;
&lt;strong&gt;Resource owner password credentials:&lt;/strong&gt; used for highly trusted applications&lt;/p&gt;

&lt;h2&gt;
  
  
  Actors in OAuth2.0 workflow
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;User/Resource Owner:&lt;/strong&gt; end-user;i.e. owner of a user resource&lt;br&gt;
&lt;strong&gt;User-Agent/Device:&lt;/strong&gt; Browser or native application&lt;br&gt;
&lt;strong&gt;Client Application:&lt;/strong&gt;API's;i.e. application that is attempting to get access to the user's account. The application could be a website, mobile app, etc&lt;br&gt;
&lt;strong&gt;Authorization Server:&lt;/strong&gt; The server where the client applications are registered. Issued an access token to the client app.&lt;br&gt;
&lt;strong&gt;Resource Server:&lt;/strong&gt; Which hosts the secured and protected user resources on appropriate access token it shares the user resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow of Authorization Code Grant Type
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo8ajaelpjcmxtfnlvohp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo8ajaelpjcmxtfnlvohp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;remaining coming soon ...&lt;/p&gt;

</description>
      <category>python</category>
      <category>fastapi</category>
      <category>oauth</category>
      <category>jwt</category>
    </item>
  </channel>
</rss>
