<?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 Tejas Joshi on Medium]]></title>
        <description><![CDATA[Stories by Tejas Joshi on Medium]]></description>
        <link>https://medium.com/@tejas.joshi_15060?source=rss-54c60ad8ef5b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*jHGl2KmcUK4j9rAs.jpg</url>
            <title>Stories by Tejas Joshi on Medium</title>
            <link>https://medium.com/@tejas.joshi_15060?source=rss-54c60ad8ef5b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:24:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tejas.joshi_15060/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[Automatically Extract data using AWS Textract.]]></title>
            <link>https://medium.com/petabytz/automatically-extract-data-using-aws-textract-7a599b80b92?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a599b80b92</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[aws-textract]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Fri, 26 Jul 2019 14:12:04 GMT</pubDate>
            <atom:updated>2019-07-26T14:12:04.002Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/318/0*fMik7g-VisyLK5Hn" /></figure><p>Documents are a primary tool for record keeping, communication, collaboration, and transactions across many industries, including financial, medical, legal, and real estate. The millions of mortgage applications and hundreds of millions of W2 tax forms processed each year are just a few examples of such documents. A lot of information is locked in unstructured documents. It usually requires time-consuming and complex processes to enable search and discovery, business process automation, and compliance control for these documents.</p><p>In this post, I show how you can take advantage of Amazon Textract to automatically extract text and data from scanned documents without any machine learning (ML) experience. While AWS takes care of building, training, and deploying advanced ML models in a highly available and scalable environment, you take advantage of these models with simple-to-use API actions.</p><ul><li>Text detection from documents</li><li>Multi-column detection and reading order</li><li>Natural language processing and document classification</li><li>Natural language processing for medical documents</li><li>Document translation</li><li>Search and discovery</li><li>Form extraction and processing</li><li>Compliance control with document redaction</li><li>Table extraction and processing</li><li>PDF document processing</li></ul><p>What do you mean by Amazon Textract..?</p><p>Amazon Textract goes beyond simple optical character recognition (OCR) to also identify the contents of fields in forms and information stored in tables. This allows you to use Amazon Textract to instantly “read” virtually any type of document and accurately extract text and data without the need for any manual effort or custom code.</p><p>Steps to extract a Sample data:</p><p>Step 1- The following images show an example document and corresponding extracted text, form, and table data using Amazon Textract in the AWS Management Console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*TlOYw6sgOnq6mn9Q.gif" /></figure><p>Step2- The following image shows the lines extracted as raw text from the document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xdJttnMGuxNZehT-.png" /></figure><p>Step 3- The following image shows the extracted form fields and their corresponding values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*PyOSG11VNs86rpO8.gif" /></figure><p>Step 4- The following image shows the extracted table, cells, and the text in those cells.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*07Vq8CXTEERiE0LL.gif" /></figure><p>Step 5- o quickly download a zip file containing the output, choose <strong>Download results</strong>. You can choose various formats, including raw JSON, text, and CSV files for forms and tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*IOr0Vrx1KiNsLEXi.gif" /></figure><p>In addition to the detected content, Amazon Textract provides additional information, like confidence scores and bounded boxes for detected elements. It gives you control on how you consume extracted content and integrate it into various business applications.</p><p>Amazon Textract provides both synchronous and asynchronous API actions to extract document text and analyze the document text data. Synchronous APIs can be used for single page document and low latency use cases such as mobile capture. Asynchronous APIs can be used for multi page documents such as PDF documents with thousands of pages.</p><p><strong>Text detection from documents:</strong></p><p>I start with a simple example on how to detect text from a document. Use the following image as an input document to Amazon Textract. As you can see, the sample image is not of good quality, but Amazon Textract can still detect the text with accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*s7w2H2nyj2ROiaK2.gif" /></figure><p>The following code example shows how to use a few lines of code to send this sample image to Amazon Textract and get a JSON response back. You then iterate over the blocks in JSON and print the detected text, as shown below.</p><pre>import boto3<br><br># Document<br>s3BucketName = &quot;ki-textract-demo-docs&quot;<br>documentName = &quot;simple-document-image.jpg&quot;<br><br># Amazon Textract client<br>textract = boto3.client(&#39;textract&#39;)<br><br># Call Amazon Textract<br>response = textract.detect_document_text(<br>    Document={<br>        &#39;S3Object&#39;: {<br>            &#39;Bucket&#39;: s3BucketName,<br>            &#39;Name&#39;: documentName<br>        }<br>    })<br><br>#print(response)<br><br># Print detected text<br>for item in response[&quot;Blocks&quot;]:<br>    if item[&quot;BlockType&quot;] == &quot;LINE&quot;:<br>        print (&#39;\033[94m&#39; +  item[&quot;Text&quot;] + &#39;\033[0m&#39;)</pre><p>The following JSON response is what you receive from Amazon Textract, with blocks representing detected text in the document.</p><pre>{<br>    &quot;Blocks&quot;: [<br>        {<br>            &quot;Geometry&quot;: {<br>                &quot;BoundingBox&quot;: {<br>                    &quot;Width&quot;: 1.0, <br>                    &quot;Top&quot;: 0.0, <br>                    &quot;Left&quot;: 0.0, <br>                    &quot;Height&quot;: 1.0<br>                }, <br>                &quot;Polygon&quot;: [<br>                    {<br>                        &quot;Y&quot;: 0.0, <br>                        &quot;X&quot;: 0.0<br>                    }, <br>                    {<br>                        &quot;Y&quot;: 0.0, <br>                        &quot;X&quot;: 1.0<br>                    }, <br>                    {<br>                        &quot;Y&quot;: 1.0, <br>                        &quot;X&quot;: 1.0<br>                    }, <br>                    {<br>                        &quot;Y&quot;: 1.0, <br>                        &quot;X&quot;: 0.0<br>                    }<br>                ]<br>            }, <br>            &quot;Relationships&quot;: [<br>                {<br>                    &quot;Type&quot;: &quot;CHILD&quot;, <br>                    &quot;Ids&quot;: [<br>                        &quot;2602b0a6-20e3-4e6e-9e46-3be57fd0844b&quot;, <br>                        &quot;82aedd57-187f-43dd-9eb1-4f312ca30042&quot;, <br>                        &quot;52be1777-53f7-42f6-a7cf-6d09bdc15a30&quot;, <br>                        &quot;7ca7caa6-00ef-4cda-b1aa-5571dfed1a7c&quot;<br>                    ]<br>                }<br>            ], <br>            &quot;BlockType&quot;: &quot;PAGE&quot;, <br>            &quot;Id&quot;: &quot;8136b2dc-37c1-4300-a9da-6ed8b276ea97&quot;<br>        }..... <br>        <br>    ], <br>    &quot;DocumentMetadata&quot;: {<br>        &quot;Pages&quot;: 1<br>    }<br>}</pre><p>The following image shows the output of the detected text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*GSigEGpQFWWSBVAT.gif" /></figure><h3>Natural language processing and document classification:</h3><p>Customer emails, support tickets, product reviews, social media, even advertising copy all represent insights into customer sentiment that can be put to work for your business. A lot of such content contains images or scanned versions of documents. After text is extracted from these documents, you can use Amazon Comprehend to detect sentiment, entities, key phrases, syntax and topics. You can also train Amazon Comprehend to detect custom entities based on your business domain. These insights can then be used to classify documents, automate business process workflows, and ensure compliance.</p><p>The following example code shows processing the first image sample used earlier with Amazon Textract to extract text and then using Amazon Comprehend to detect sentiment and entities.</p><pre>import boto3<br><br># Document<br>s3BucketName = &quot;ki-textract-demo-docs&quot;<br>documentName = &quot;simple-document-image.jpg&quot;<br><br># Amazon Textract client<br>textract = boto3.client(&#39;textract&#39;)<br><br># Call Amazon Textract<br>response = textract.detect_document_text(<br>    Document={<br>        &#39;S3Object&#39;: {<br>            &#39;Bucket&#39;: s3BucketName,<br>            &#39;Name&#39;: documentName<br>        }<br>    })<br><br>#print(response)<br><br># Print text<br>print(&quot;\nText\n========&quot;)<br>text = &quot;&quot;<br>for item in response[&quot;Blocks&quot;]:<br>    if item[&quot;BlockType&quot;] == &quot;LINE&quot;:<br>        print (&#39;\033[94m&#39; +  item[&quot;Text&quot;] + &#39;\033[0m&#39;)<br>        text = text + &quot; &quot; + item[&quot;Text&quot;]<br><br># Amazon Comprehend client<br>comprehend = boto3.client(&#39;comprehend&#39;)<br><br># Detect sentiment<br>sentiment =  comprehend.detect_sentiment(LanguageCode=&quot;en&quot;, Text=text)<br>print (&quot;\nSentiment\n========\n{}&quot;.format(sentiment.get(&#39;Sentiment&#39;)))<br><br># Detect entities<br>entities =  comprehend.detect_entities(LanguageCode=&quot;en&quot;, Text=text)<br>print(&quot;\nEntities\n========&quot;)<br>for entity in entities[&quot;Entities&quot;]:<br>    print (&quot;{}\t=&gt;\t{}&quot;.format(entity[&quot;Type&quot;], entity[&quot;Text&quot;]))</pre><p>The following image shows the output text along with the text analysis from Amazon Comprehend. You can see that it found the sentiment to be “Neutral” and detected “Amazon” as an organization, “Seattle, WA” as a location and “July 5th, 1994” as a date, along with other entities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*IyXwHEi-CfAcvqxo.gif" /></figure><h3>Document translation:</h3><p>Many organizations localize content for international users, such as websites and applications. They must translate large volumes of documents efficiently. You can use Amazon Textract along with Amazon Translate to extract text and data and then translate them into other languages.</p><p>The following code example shows translating the text in the first image to German.</p><pre>import boto3<br><br># Document<br>s3BucketName = &quot;ki-textract-demo-docs&quot;<br>documentName = &quot;simple-document-image.jpg&quot;<br><br># Amazon Textract client<br>textract = boto3.client(&#39;textract&#39;)<br><br># Call Amazon Textract<br>response = textract.detect_document_text(<br>    Document={<br>        &#39;S3Object&#39;: {<br>            &#39;Bucket&#39;: s3BucketName,<br>            &#39;Name&#39;: documentName<br>        }<br>    })<br><br>#print(response)<br><br># Amazon Translate client<br>translate = boto3.client(&#39;translate&#39;)<br><br>print (&#39;&#39;)<br>for item in response[&quot;Blocks&quot;]:<br>    if item[&quot;BlockType&quot;] == &quot;LINE&quot;:<br>        print (&#39;\033[94m&#39; +  item[&quot;Text&quot;] + &#39;\033[0m&#39;)<br>        result = translate.translate_text(Text=item[&quot;Text&quot;], SourceLanguageCode=&quot;en&quot;, TargetLanguageCode=&quot;de&quot;)<br>        print (&#39;\033[92m&#39; + result.get(&#39;TranslatedText&#39;) + &#39;\033[0m&#39;)<br>    print (&#39;&#39;)</pre><p>The following image shows the output of the detected text, translated to German line by line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*X8gRU9Eg3icuM5hC.gif" /></figure><h3>Form extraction and processing:</h3><p>Amazon Textract can provide the inputs required to automatically process forms without human intervention. For example, a bank could write code to read PDFs of loan applications. The information contained in the document could be used to initiate all of the necessary background and credit checks to approve the loan so that customers can get instant results for their application rather than having to wait several days for manual review and validation.</p><p>The following image is an employment application with form fields and a table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*2z9jKi6QaOj7DhGD.gif" /></figure><p>The following code example shows how to extract forms from the employment application and process different fields.</p><pre>import boto3<br>from trp import Document<br><br># Document<br>s3BucketName = &quot;ki-textract-demo-docs&quot;<br>documentName = &quot;employmentapp.png&quot;<br><br># Amazon Textract client<br>textract = boto3.client(&#39;textract&#39;)<br><br># Call Amazon Textract<br>response = textract.analyze_document(<br>    Document={<br>        &#39;S3Object&#39;: {<br>            &#39;Bucket&#39;: s3BucketName,<br>            &#39;Name&#39;: documentName<br>        }<br>    },<br>    FeatureTypes=[&quot;FORMS&quot;])<br><br>#print(response)<br><br>doc = Document(response)<br><br>for page in doc.pages:<br>    # Print fields<br>    print(&quot;Fields:&quot;)<br>    for field in page.form.fields:<br>        print(&quot;Key: {}, Value: {}&quot;.format(field.key, field.value))<br><br>    # Get field by key<br>    print(&quot;\nGet Field by Key:&quot;)<br>    key = &quot;Phone Number:&quot;<br>    field = page.form.getFieldByKey(key)<br>    if(field):<br>        print(&quot;Key: {}, Value: {}&quot;.format(field.key, field.value))<br><br>    # Search fields by key<br>    print(&quot;\nSearch Fields:&quot;)<br>    key = &quot;address&quot;<br>    fields = page.form.searchFieldsByKey(key)<br>    for field in fields:<br>        print(&quot;Key: {}, Value: {}&quot;.format(field.key, field.value))</pre><p>The following image is the output of detected form for the employment application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*Q3s1wR9b8NEn0TtN.gif" /></figure><h3>Compliance control with document redaction</h3><p>Because Amazon Textract identifies data types and form labels automatically, AWS helps secure infrastructure so that you can maintain compliance with information controls. For example, an insurer could use Amazon Textract to feed a workflow that automatically redacts personally identifiable information (PII) for review before archiving claim forms. Amazon Textract recognizes the important fields that require protection.</p><p>The following code example shows extracting all the form fields in the employment application used earlier, and then redacting all the address fields.</p><pre>import boto3<br>from trp import Document<br>from PIL import Image, ImageDraw<br><br># Document<br>s3BucketName = &quot;ki-textract-demo-docs&quot;<br>documentName = &quot;employmentapp.png&quot;<br><br># Amazon Textract client<br>textract = boto3.client(&#39;textract&#39;)<br><br># Call Amazon Textract<br>response = textract.analyze_document(<br>    Document={<br>        &#39;S3Object&#39;: {<br>            &#39;Bucket&#39;: s3BucketName,<br>            &#39;Name&#39;: documentName<br>        }<br>    },<br>    FeatureTypes=[&quot;FORMS&quot;])<br><br>#print(response)<br><br>doc = Document(response)<br><br># Redact document<br>img = Image.open(documentName)<br><br>width, height = img.size<br><br>if(doc.pages):<br>    page = doc.pages[0]<br>    for field in page.form.fields:<br>        if(field.key and field.value and &quot;address&quot; in field.key.text.lower()):<br>        #if(field.key and field.value):<br>            print(&quot;Redacting =&gt; Key: {}, Value: {}&quot;.format(field.key.text, field.value.text))<br>            <br>            x1 = field.value.geometry.boundingBox.left*width<br>            y1 = field.value.geometry.boundingBox.top*height-2<br>            x2 = x1 + (field.value.geometry.boundingBox.width*width)+5<br>            y2 = y1 + (field.value.geometry.boundingBox.height*height)+2<br><br>            draw = ImageDraw.Draw(img)<br>            draw.rectangle([x1, y1, x2, y2], fill=&quot;Black&quot;)<br><br>img.save(&quot;redacted-{}&quot;.format(documentName))</pre><p>The following image is the output redacted version of employment application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*OdvYxUJIwqI9Qvjw.gif" /></figure><h3>Table extraction and processing</h3><p>Amazon Textract can detect tables and their content. A company can extract all the amounts from an expense report and apply rules, such as any expense more than $1000 needs extra review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*9Ptw0hLfrv3oL2jO.gif" /></figure><p>The following code example uses the expense report sample document and prints the content of each cell, along with a warning message if any expense is more than $1000.</p><pre>import boto3<br>from trp import Document<br><br># Document<br>s3BucketName = &quot;ki-textract-demo-docs&quot;<br>documentName = &quot;expense.png&quot;<br><br># Amazon Textract client<br>textract = boto3.client(&#39;textract&#39;)<br><br># Call Amazon Textract<br>response = textract.analyze_document(<br>    Document={<br>        &#39;S3Object&#39;: {<br>            &#39;Bucket&#39;: s3BucketName,<br>            &#39;Name&#39;: documentName<br>        }<br>    },<br>    FeatureTypes=[&quot;TABLES&quot;])<br><br>#print(response)<br><br>doc = Document(response)<br><br>def isFloat(input):<br>  try:<br>    float(input)<br>  except ValueError:<br>    return False<br>  return True<br><br>warning = &quot;&quot;<br>for page in doc.pages:<br>     # Print tables<br>    for table in page.tables:<br>        for r, row in enumerate(table.rows):<br>            itemName  = &quot;&quot;<br>            for c, cell in enumerate(row.cells):<br>                print(&quot;Table[{}][{}] = {}&quot;.format(r, c, cell.text))<br>                if(c == 0):<br>                    itemName = cell.text<br>                elif(c == 4 and isFloat(cell.text)):<br>                    value = float(cell.text)<br>                    if(value &gt; 1000):<br>                        warning += &quot;{} is greater than $1000.&quot;.format(itemName)<br>if(warning):<br>    print(&quot;\nReview needed:\n====================\n&quot; + warning)</pre><p>The following text is the output of the table cells and the text within.</p><pre>Table[0][0] = Expense Description <br>Table[0][1] = Type <br>Table[0][2] = Date <br>Table[0][3] = Merchant Name <br>Table[0][4] = Amount (USD) <br>Table[1][0] = Furniture (Desks and Chairs) <br>Table[1][1] = Office Supplies <br>Table[1][2] = 5/10/1019 <br>Table[1][3] = Merchant One <br>Table[1][4] = 1500.00 <br>Table[2][0] = Team Lunch <br>Table[2][1] = Food <br>Table[2][2] = 5/11/2019 <br>Table[2][3] = Merchant Two <br>Table[2][4] = 100.00 <br>Table[3][0] = Team Dinner <br>Table[3][1] = Food <br>Table[3][2] = 5/12/2019 <br>Table[3][3] = Merchant Three <br>Table[3][4] = 300.00 <br>Table[4][0] = Laptop <br>Table[4][1] = Office Supplies <br>Table[4][2] = 5/13/2019 <br>Table[4][3] = Merchant Three <br>Table[4][4] = 200.00 <br>Table[5][0] = <br>Table[5][1] = <br>Table[5][2] = <br>Table[5][3] = <br>Table[5][4] = <br>Table[6][0] = <br>Table[6][1] = <br>Table[6][2] = <br>Table[6][3] = <br>Table[6][4] = <br>Table[7][0] = <br>Table[7][1] = <br>Table[7][2] = <br>Table[7][3] = <br>Table[7][4] = <br>Table[8][0] = <br>Table[8][1] = <br>Table[8][2] = <br>Table[8][3] = Total <br>Table[8][4] = 2100.00 <br><br>Review needed:<br>====================<br>Furniture (Desks and Chairs) is greater than $1000.</pre><h3>PDF document processing:</h3><p>For the earlier examples, you used images with the sync API operations. Now, see how you can process PDF files using the async API operations.</p><p>First, use Start Document detection or Start Doument analysis to start an Amazon Textract job. As the job completes, Amazon Textract publishes the results of an Amazon Textract request, including completion status, to Amazon SNS. You can then use Get Document Text detection or Get Document Analysis to get the results from Amazon Textract.</p><p>The following code example shows how to start a job, get job status, and then process the results.</p><pre>import boto3<br>import time<br><br>def startJob(s3BucketName, objectName):<br>    response = None<br>    client = boto3.client(&#39;textract&#39;)<br>    response = client.start_document_text_detection(<br>    DocumentLocation={<br>        &#39;S3Object&#39;: {<br>            &#39;Bucket&#39;: s3BucketName,<br>            &#39;Name&#39;: objectName<br>        }<br>    })<br><br>    return response[&quot;JobId&quot;]<br><br>def isJobComplete(jobId):<br>    # For production use cases, use SNS based notification <br>    # Details at: https://docs.aws.amazon.com/textract/latest/dg/api-async.html<br>    time.sleep(5)<br>    client = boto3.client(&#39;textract&#39;)<br>    response = client.get_document_text_detection(JobId=jobId)<br>    status = response[&quot;JobStatus&quot;]<br>    print(&quot;Job status: {}&quot;.format(status))<br><br>    while(status == &quot;IN_PROGRESS&quot;):<br>        time.sleep(5)<br>        response = client.get_document_text_detection(JobId=jobId)<br>        status = response[&quot;JobStatus&quot;]<br>        print(&quot;Job status: {}&quot;.format(status))<br><br>    return status<br><br>def getJobResults(jobId):<br><br>    pages = []<br><br>    client = boto3.client(&#39;textract&#39;)<br>    response = client.get_document_text_detection(JobId=jobId)<br>    <br>    pages.append(response)<br>    print(&quot;Resultset page recieved: {}&quot;.format(len(pages)))<br>    nextToken = None<br>    if(&#39;NextToken&#39; in response):<br>        nextToken = response[&#39;NextToken&#39;]<br><br>    while(nextToken):<br><br>        response = client.get_document_text_detection(JobId=jobId, NextToken=nextToken)<br><br>        pages.append(response)<br>        print(&quot;Resultset page recieved: {}&quot;.format(len(pages)))<br>        nextToken = None<br>        if(&#39;NextToken&#39; in response):<br>            nextToken = response[&#39;NextToken&#39;]<br><br>    return pages<br><br># Document<br>s3BucketName = &quot;ki-textract-demo-docs&quot;<br>documentName = &quot;Amazon-Textract-Pdf.pdf&quot;<br><br>jobId = startJob(s3BucketName, documentName)<br>print(&quot;Started job with id: {}&quot;.format(jobId))<br>if(isJobComplete(jobId)):<br>    response = getJobResults(jobId)<br><br>#print(response)<br><br># Print detected text<br>for resultPage in response:<br>    for item in resultPage[&quot;Blocks&quot;]:<br>        if item[&quot;BlockType&quot;] == &quot;LINE&quot;:<br>            print (&#39;\033[94m&#39; +  item[&quot;Text&quot;] + &#39;\033[0m&#39;)</pre><p>The following image shows the job status as the API call proceeds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*nK2Ff0fX9sg7QuE9.gif" /></figure><p>Conclusion:</p><p>This is how, to use Amazon Textract to automatically extract text and data from scanned documents without any machine learning (ML) experience.But there are many other opportunities where the ability to unlock text and data from unstructured documents could be most useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a599b80b92" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/automatically-extract-data-using-aws-textract-7a599b80b92">Automatically Extract data using AWS Textract.</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IPSec VPN Configuration on AWS Cloud using CloudFormation.]]></title>
            <link>https://medium.com/petabytz/ipsec-vpn-configuration-on-aws-cloud-using-cloudformation-92078c3aa4c9?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/92078c3aa4c9</guid>
            <category><![CDATA[vpc-endpoint]]></category>
            <category><![CDATA[cloudformation]]></category>
            <category><![CDATA[ipsec]]></category>
            <category><![CDATA[vpc]]></category>
            <category><![CDATA[vpn]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Wed, 24 Jul 2019 13:36:54 GMT</pubDate>
            <atom:updated>2019-07-24T13:36:54.611Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/301/0*0hgxhTKSU98OcyXr" /></figure><p>Secure network connections with IPsec :</p><p>IP packages, the basic elements in internet data communication, are made up of two parts: user data like speech, text, or images, and header<strong> </strong>data containing, among others elements, the addresses of the sender and recipient. The biggest issue with these data packages, as they pass through various routers on their way to the recipient, is the fact that Internet Protocol doesn’t have encryption or authentication mechanisms. This means that data is transferred unencrypted from router to router and can be read or tampered with. And the three pillars of information security — <strong>confidentiality, authenticity, and integrity</strong> — are not guaranteed.</p><p>The Internet Protocol security, or IPsec for short, was developed in order to give the Internet Protocol vastly increased safety protection. Together, the two combine to ensure reliable security during data package transfers over open networks, which is why IPsec is an important building block for many VPN connections (virtual private network).</p><p>What is IPSec.?</p><p>IPsec is a protocol suite, the architecture of which was suggested as a standard by the Internet Engineering Task Force (IETF). The IETF is an organization concerned with the technical advancement of the internet. IPsec was developed for the newest version of Internet Protocol (IPv6) and retrospectively also for IPv4. It can be divided into the following three function groups:</p><ul><li><strong>Transfer protocols</strong>: Authentication Header (AH), Encapsulating Security Payload (ESP)</li><li><strong>Key management</strong>: Internet Security Association and Key Management Protocol (ISAKMP), Internet Key Exchange (IKE)</li><li><strong>Database</strong>: Security Association Database (SAD), Security Policy Database (SPD)</li></ul><p>Through the two transfer protocols, AH and ESP, IPsec guarantees the authenticity and integrity of sent data, ensuring that <strong>content from the sender reaches the recipient without being altered</strong>. For this purpose, AH offers both data origin authentication, to confirm its legitimacy, and protection for the package during transfer. Additionally, the AH protocol assigns a sequence number to the header, protecting packages from potential repeated transfer.</p><p><strong>The two types of IPsec: Tunnel vs Transport</strong>:</p><p>There are two existing transfer modes for secure connection with IPsec: transport mode, in which two end hosts are connected directly, and tunnel mode, which creates a connection between two IP networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S2T_pmrXjmBLu95g.png" /></figure><h3>Transport mode</h3><p>The following occurs when IPsec is used in transport mode: the header of the transmission protocol is inserted between the IP header of the data package, which remains untouched, and the user data. Protection begins from the sender and remains throughout the transfer until the target computer is reached. Only after the package has been received is the original user data released and made available to the recipient. This means that the <strong>cryptographic and communicative terminal points are identical</strong>. Transport mode has the advantage of a very quick processing time, but only secures the user data, while the source and target addresses remain unprotected. In practical use, this mode is common for host-to-host or host-to-router connections, e.g. for network management.</p><h3>Tunnel mode</h3><p>In tunnel mode, the data package receives a completely new IP header in which both the source and target address are hidden together with the user data. The header of the transfer protocol is also implemented — just as in transport mode. So it can be said that the <strong>original package is encapsulated</strong> as well. The new, outer IP header defines the cryptographic terminal point, which isn’t identical to the actual communications point stored in the inner IP header. Only once the package reaches this cryptographic end point, known as a security gateway, can it then be decrypted and forwarded on to the intended recipient. Data transfer in tunnel mode is typically carried out from <strong>gateway to gateway</strong>; host-to-gateway and host-to-host connections are also possible.</p><p><strong>IPv4 and IPv6 Architectures :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*7ypIKVqHGg8z9AsD.png" /></figure><p><strong>1. IPv4 Architecture</strong><br> The protocol contains a couple aspects which caused problems with its use. These problems do not all relate to security. They are mentioned to gain a comprehensive understanding of the internet protocol and its shortcomings. The causes of problems with the protocol are:<br> 1. Address Space<br> 2. Routing<br> 3. Configuration<br> 4. Security<br> 5. Quality of Service</p><ul><li>The IPv4 architecture has an address that is 32 bits wide. This limits the maximum number of computers that can be connected to the internet. The 32 bit address provides for a maximum of two billions computers to be connected to the internet.</li><li>The problem of exceeding that number was not foreseen when the protocol was created. The small address space of the IPv4 facilitates malicious code distribution. Routing is a problem for this protocol because the routing tables are constantly increasing in size. The maximum theoretical size of the global routing tables was 2.1 million entries.</li><li>Methods have been adopted to reduce the number of entries in the routing table. This is helpful for a short period of time, but drastic change needs to be made to address this problem.</li></ul><p><strong>2. IPv6 Architecture</strong><br> When IPv6 was being developed, emphasis was placed on aspects of the IPv4 protocol that needed to be improved. The development efforts were placed in the following areas:<br> 1. Routing and addressing<br> 2. Multi‐protocol architecture<br> 3. Security architecture<br> 4. Traffic control</p><ul><li>The IPv6 protocol’s address space was extended by supporting 128 bit addresses.</li><li>With 128 bit addresses, the protocol can support up to 3.4 * (10)³⁸ machines.</li><li>The address bits are used less efficiently in this protocol because it simplifies addressing configuration.</li><li>The IPv6 routing system is more efficient and enables smaller global routing tables.</li><li>The host configuration is also simplified. Hosts can automatically configure themselves.</li><li>This new design allows ease of configuration for the user as well as network administrator. The security architecture of the IPv6 protocol is of great interest.</li><li>IPsec is embedded within the IPv6 protocol. IPsec functionality is the same for IPv4 and IPv6. The only difference is that IPv6 can utilize the security mechanism along the entire route.</li><li>The quality of service problem is handled with IPv6. The internet protocol allows for special handling of certain packets with a higher quality of service.</li><li>From a high‐level view, the major benefits of IPv6 are its scalability and increased security.</li><li>IPv6 also offers other interesting features that are beyond the scope of this paper. It must be emphasized that after researching IPv6 and its security features, it is not necessarily more secure than IPv4. The approach to security is only slightly better, not a radical improvement.</li></ul><p><strong>What is a VPN?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*l-14iOs8qpYLxUju.jpg" /></figure><p>A virtual private network (VPN) is a kind of virtual communication network that operates on the basis of a physical network. Generally, the internet is the most commonly used transport medium for VPNs. In order to ensure that data remains safe when transferred through a public cable, transport channels are secured through encryption and authentication methods. Given that data transferred via a VPN is not accessible to participants of the public network it runs on, the term “tunneling” is often used to describe this process. Following this, a VPN makes it possible to transport sensitive data via untrustworthy connections. As a result, it presents an affordable alternative to private cables.</p><p>VPN with IPsec</p><p>‘Internet protocol security’ (IPSec) is a protocol suite designed for the internet protocol (IP) with version 6 (IPv6) and <strong>enables secure communication via non-trustworthy IP networks</strong>. Encryption and authentication mechanisms help ensure that the data traffic’s privacy, authenticity, and integrity are safeguarded. IPSec was developed with IPv6 and was retroactively specified for IPv4.</p><p>L2TP over IPSec</p><p>A VPN implemented with LTOP over IPSec uses the ‘Layer 2 Tunneling Protocol’ (L2TP). L2TP alone doesn’t contain any encryption. For this reason, the protocol is normally combined with IPSec. While IPSec is only able to tunnel IP packets, L2TP supports a variety of packet-transferring protocols. The combination L2TP over IPSec <strong>combines the strengths of both standards</strong>. The result is a highly secure and flexible tunneling protocol.</p><p>Step by step guide for configuring a Site-to-Site, Hardware VPN connection using AWS CloudFormation.</p><p><em>Types of VPN connections</em></p><p>There are primarily 2 types of VPN connections :</p><p>1) Site-to-site ( S-2-S ) VPN : Site-to-site VPN’s connect entire networks to each other — for example, connecting your entire customer network to your VPC ( Virtual Private Cloud ).</p><p>2) Remote access VPN : They connect individual hosts to private networks — for example, developers working from their homes who need to access the VPC.</p><p><strong>Setting up a Site-to-Site, Hardware VPN connection as per the steps below</strong>.</p><p>Step 1 : Create a VPC:</p><pre>&quot;Resources&quot; : {<br>  &quot;myVPC&quot; : {<br>    &quot;Type&quot; : &quot;AWS::EC2::VPC&quot;,<br>    &quot;Properties&quot; : {<br>      &quot;CidrBlock&quot; : &quot;10.0.0.0/16&quot;,<br>      &quot;Tags&quot; : [ {&quot;Key&quot; : &quot;Name&quot;, &quot;Value&quot; : &quot;My Test VPC&quot;} ]<br>    }<br>  }<br>}</pre><p>Enter the above code in a json file and run the “create stack” command. Poof! A VPC will be created (having the CIDR range specified) which can be checked in the web console.</p><p>Step 2 : Create a customer gateway configuration</p><p>Once the VPC is created, lets create a customer gateway. Add the below code, to the “Resources” object.</p><pre>&quot;myVpcCustomerGateway&quot;: {<br>         &quot;Type&quot;: &quot;AWS::EC2::CustomerGateway&quot;,<br>         &quot;Properties&quot;: {<br>              &quot;BgpAsn&quot;: 65000,<br>              &quot;IpAddress&quot;: &quot;<strong>Internet facing IP of the customer gateway&quot;</strong>,<br>              &quot;Tags&quot;: [<br>                    {<br>                        &quot;Key&quot;: &quot;Name&quot;,<br>                        &quot;Value&quot;: &quot;My Test Customer Gateway&quot;<br>                    }<br>              ],<br>              &quot;Type&quot;: &quot;ipsec.1&quot;<br>         }<br>}</pre><p>Now, every time we change the stack, we will run the “update stack” command. When you run this command, a customer gateway will be created.</p><p><strong>Important Note : </strong>There are 2 types of routing, static and dynamic. For dynamic routing, the customer gateway device should support the Border Gateway Protocol. Dynamic routing should be used for high availability across multiple VPN connections. Static routing is used when you don’t need to route your traffic via an alternate VPN connection when one VPN connection fails.</p><p>When dynamic routing is chosen, you need to provide a BgpAsn number of your customer gateway. It is not needed for static routing.</p><p>CloudFormation however has an open issue because of which, providing a BgpAsn is mandatory. The trick here is that if we need static routing, we give a default value of the BgpAsn eg. 65000.</p><p>Step 3 : Create a virtual private gateway</p><pre>&quot;myVpcVpnGateway&quot;: {<br>       &quot;Type&quot;: &quot;AWS::EC2::VPNGateway&quot;,<br>       &quot;Properties&quot;: {<br>            &quot;Type&quot;: &quot;ipsec.1&quot;,<br>            &quot;Tags&quot;: [<br>                {<br>                        &quot;Key&quot;: &quot;Name&quot;,<br>                        &quot;Value&quot;: &quot;My Test VPN Gateway&quot;<br>                }<br>             ]<br>       }<br>}</pre><p>Step 4 : Attach the VPN Gateway created above to your VPC</p><pre>&quot;myVpcVpnGatewayAttachment&quot; : {<br>       &quot;Type&quot; : &quot;AWS::EC2::VPCGatewayAttachment&quot;,<br>       &quot;Properties&quot; : {<br>              &quot;VpcId&quot; : {&quot;Ref&quot; : &quot;myVPC&quot;},<br>                &quot;VpnGatewayId&quot; : { &quot;Ref&quot; : &quot;myVpcVpnGateway&quot; }<br>       }<br>}</pre><p>Step 4 : Create a VPN connection</p><pre>&quot;myVpcVpnConnectionPrimary&quot;: {<br>       &quot;Type&quot;: &quot;AWS::EC2::VPNConnection&quot;,<br>       &quot;Properties&quot;: {<br>           &quot;Type&quot;: &quot;ipsec.1&quot;,<br>           &quot;CustomerGatewayId&quot;: {<br>             &quot;Ref&quot;:&quot;myVpcCustomerGateway&quot;<br>            },<br>            &quot;StaticRoutesOnly&quot;: true,<br>            &quot;Tags&quot;: [<br>               {<br>                    &quot;Key&quot;: &quot;Name&quot;,<br>                    &quot;Value&quot;: &quot;My Test VPN Connection&quot;<br>               }<br>             ],<br>             &quot;VpnGatewayId&quot;: {<br>               &quot;Ref&quot; : &quot;myVpcVpnGateway&quot;<br>             }<br>       }<br>}</pre><p>The “StaticRoutesOnly” option should be set to true if you choose the static routing option. If dynamic routing is chosen, this field need not be added.</p><p>Ok, Once the above step is completed, this is what you have achieved :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PT5wxJwx_WoVo4Nh" /></figure><p>Obviously, the connection will not be up until the customer gateway is configured, but this is how traffic will be routed from your customer network to your VPC. For each VPN connection, AWS provides you 2 tunnels which is their way of achieving high availability. The route table and the connection highlighted in red will be achieved via the next step ( This is the reverse routing process from your VPC back to your network ).</p><p>Step 5 : Allow propagation of the static routes to the main route table of the VPC</p><pre>&quot;myVpcVpnGatewayRouteProp&quot; : {<br>        &quot;Type&quot; : &quot;AWS::EC2::VPNGatewayRoutePropagation&quot;,<br>        &quot;Properties&quot; : {<br>            &quot;RouteTableIds&quot; : [&quot;rtb-1a3cab7f&quot;],<br>            &quot;VpnGatewayId&quot; : {&quot;Ref&quot; : &quot;myVpcVpnGateway&quot;}<br>        },<br>        &quot;DependsOn&quot; : &quot;myVpcVpnGatewayAttachment&quot;<br>}</pre><p>Step 6 : Add a static route from the customer network to your VPC</p><pre>&quot;myVpcConnectionRoutePrimary&quot; : {<br>       &quot;Type&quot; : &quot;AWS::EC2::VPNConnectionRoute&quot;,<br>       &quot;Properties&quot; : {<br>          &quot;DestinationCidrBlock&quot; : &quot;<strong>A static IP within your customer network</strong>&quot;,<br>          &quot;VpnConnectionId&quot; : {&quot;Ref&quot; : &quot;myVpcVpnConnectionPrimary&quot;}<br>       }<br>}</pre><p>Now, on your AWS console, on the “VPN connections” tab, for the VPN connection you have just created there will be a “Download Configuration” file. Download the file and provide it to your network administrator. You also need to provide two other things : <strong>a)</strong> The 2 tunnel IP’s which AWS provides you and <strong>b) </strong>The entire range of IP addresses you want to access from your network. Once the customer gateway is configured, your VPN connection is up and running!</p><p>Conclusion:</p><p>Create a subnet in your VPC and launch an instance in it. Set the ACL of the subnet and the security group of the instance to allow communication. Now, from your customer network ping a machine in your VPC using its private IP. If the ping is successful, you have setup your VPN connection!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92078c3aa4c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/ipsec-vpn-configuration-on-aws-cloud-using-cloudformation-92078c3aa4c9">IPSec VPN Configuration on AWS Cloud using CloudFormation.</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Application Deplyoment using AWS Elastic BeanStalk]]></title>
            <link>https://medium.com/@tejas.joshi_15060/application-deplyoment-using-aws-elastic-beanstalk-7580822c6c80?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7580822c6c80</guid>
            <category><![CDATA[beanstalk]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[elb]]></category>
            <category><![CDATA[web-applications]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Fri, 19 Jul 2019 14:14:31 GMT</pubDate>
            <atom:updated>2019-07-19T14:14:31.778Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REDwf_vLj0J2PrB1rt42mw.png" /></figure><h3>What is Amazon Elastic Beanstalk?</h3><p>With Elastic Beanstalk, you can quickly deploy and manage applications in the AWS Cloud without having to learn about the infrastructure that runs those applications. Elastic Beanstalk reduces management complexity without restricting choice or control. You simply upload your application, and Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring.</p><p>Elastic Beanstalk supports applications developed in Go, Java, .NET, Node.js, PHP, Python, and Ruby. When you deploy your application, Elastic Beanstalk builds the selected supported platform version and provisions one or more AWS resources, such as Amazon EC2 instances, to run your application.</p><p>You can interact with Elastic Beanstalk by using the AWS Management Console, the AWS Command Line Interface (AWS CLI), or <strong>eb</strong>, a high-level CLI designed specifically for Elastic Beanstalk.</p><p>You can also perform most deployment tasks, such as changing the size of your fleet of Amazon EC2 instances or monitoring your application, directly from the Elastic Beanstalk web interface (console).</p><p>To use Elastic Beanstalk, you create an application, upload an application version in the form of an application source bundle (for example, a Java .war file) to Elastic Beanstalk, and then provide some information about the application. Elastic Beanstalk automatically launches an environment and creates and configures the AWS resources needed to run your code. After your environment is launched, you can then manage your environment and deploy new application versions. The following diagram illustrates the workflow of Elastic Beanstalk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*6SkRndglB6a7Le1ZK5Irew.png" /></figure><p>After you create and deploy your application, information about the application — including metrics, events, and environment status — is available through the AWS Management Console, APIs, or Command Line Interfaces, including the unified AWS CLI.</p><p><strong>Benefits of using Elastic Beanstalk:</strong></p><p>AWS Elastic Beanstalk provides a cost-effective price in which you only have to pay for what you use and there are no hidden costs.</p><p>Amazon Elastic BeanStalk builds the setup and configures. Moreover, it spectators the AWS services such as EC2, Elastic Load Balancers, RDS to create Web Services.</p><p>Fast access is provided such that you can access the AWS management console in less than one hour.</p><p>EBS creates a fairly standard configuration for modern railway applications.</p><p>AWS Elastic Beanstalk supports <strong>Java</strong> .NET, PHP, Node.js, <strong>Python</strong>, Ruby, Go, and many more web applications.</p><p><strong>SQL </strong>Server is configured through Amazon RDS but there is an EC2 server behind with a database running on it.</p><h3>AWS Elastic Beanstalk Components:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*vHZowlBD0sJ9CFwe6aTFOw.png" /></figure><h3>Application:</h3><p>An application in Elastic Beanstalk is conceptually similar to a folder</p><p>An application is a collection of components including <strong><em>environments, versions </em></strong>and <strong><em>environment configuration</em></strong></p><h3>Application Version:</h3><p>An application version refers to a specific, labeled iteration of deployable code for a web application</p><p>An application version points to an Amazon S3 object that contains the deployable code such as a Java WAR file</p><h3>Environment:</h3><p>Environments within Elastic Beanstalk Application is where the current version of the application will be active.</p><p>Each environment runs only a single application version at a time. But it is possible to run same or different versions of an application in many environments at the same time</p><h3>Environment Tier:</h3><p>Based on requirement beanstalk offers two different Environment tiers: Web Server Environment, Worker Environment.</p><p><strong>Web Server Environment: Handles HTTP requests from clients</strong></p><p>Worker Environment: Processes background tasks which are resource consuming and time intensive</p><p>Here is an illustration to show how Application, Application version and Environments relate to each other:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*ZxFjBrHyYrNSak3TQwDvdA.png" /></figure><p>And here is how Beanstalk Environment using default container type looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*lxkZMEqF4xBS1j5zzLo_Ow.png" /></figure><h3>Elastic Beanstalk Architecture:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*uZJ1YmOWQRqfIllykNwpDQ.png" /></figure><p>Elastic Beanstalk environment requires an environment tier, platform, and<br> environment type</p><p>Environment tier determines whether Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks.</p><p><strong>Web Environment Tier</strong></p><p>An environment tier whose web application processes web requests is known as a web server tier.</p><p>AWS resources created for a web environment tier include a Elastic Load Balancer, an Auto Scaling group, one or more EC2 instances .</p><p>Every Environment has a CNAME url pointing to the ELB, aliased in Route 53 to ELB url .</p><p>Each EC2 server instance that runs the application uses a container type, which defines the infrastructure topology and software stack .</p><p>A software component called the host manager (HM) runs on each EC2 server instance and is responsible for</p><p>Deploying the application</p><p>Aggregating events and metrics for retrieval via the console, the API, or the command line</p><p>Generating instance-level events</p><p>Monitoring the application log files for critical errors</p><p>Monitoring the application server</p><p>Patching instance components</p><p>Rotating your application’s log files and publishing them to S3</p><p><strong>Worker Environment Tier</strong></p><p>An environment tier whose web application runs background jobs is known as a worker tier</p><p>AWS resources created for a worker environment tier include an Auto Scaling group, one or more Amazon EC2 instances, and an IAM role.</p><p>For the worker environment tier, Elastic Beanstalk also creates and provisions an SQS queue, if one doesn’t exist</p><p>When a worker environment tier is launched, Elastic Beanstalk installs the necessary support files for the programming language of choice and a daemon on each EC2 instance in the Auto Scaling group reading from the same SQS queue</p><p>Daemon is responsible for pulling requests from an SQS queue and then sending the data to the web application running in the worker environment tier that will process those messages</p><p>Elastic Beanstalk worker environments support SQS dead letter queues which can be used to store messages that could not be successfully processed. Dead letter queue provides the ability to sideline, isolate and analyze the unsuccessfully processed messages</p><p>One environment cannot support two different environment tiers because each requires its own set of resources; a worker environment tier and a web server environment tier each require an Auto Scaling group, but Elastic Beanstalk supports only one Auto Scaling group per environment.</p><h3>Deploy an Application on Elastic Beanstalk:</h3><p>Deploying an application on Elastic Beanstalk is a fairly simple process. Let’s see how to deploy an application stepwise.</p><p><strong>Step 1:</strong> On Elastic Beanstalk console click on <em>Create New Application</em> option. A dialog box appears where you can give a name and appropriate description for your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*AHsgKWBPYi2mXv1jEV04fQ.png" /></figure><p><strong>Step 2:</strong> Now that the application folder has been created, you can click on the <em>Actions tab</em> and select Create Environment option. Beanstalk provides you with an option where you can create multiple Environments for your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*3TNctgARSlF_vzIQz8yR_Q.png" /></figure><p><strong>Step 3:</strong> Choose among two different Environment Tier options. Choose Web Server Environment if you want your application to handle HTTP requests or choose Worker Environment to handle background tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*IOQyoEbe_Di80tMRx8Di1Q.png" /></figure><p><strong>Step 4:</strong> Another dialog appears, where you need to provide a domain name and description for your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*2yc20Jvip9BTjO6uARBbHg.png" /></figure><p><strong>Step 5:</strong> Choose a platform of your choice for your application. Elastic Beanstalk will provide you with multiple options. You can choose a sample application provided by Beanstalk, or upload a file which has code for your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*FQYuPibNgT6v08x9v1CrGA.png" /></figure><p>Beanstalk will take a few minutes to launch an Environment. Once the Environment is launched, on the navigation pane you can see multiple options where you can change the configuration of your application, view log files, and events. Since you’re already on Environment page, try exploring different features that Beanstalk offers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*0EXzCbyUU8qJTGtU9FFe8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*8B7C9HJQnrX3dyFwdiuSAQ.png" /></figure><p><strong>Step 6:</strong> On the top right corner, you will find the URL of your application version. Click on that URL. You will be taken to a page which will confirm that you have successfully launched your application on Elastic Beanstalk.</p><p>You have successfully deployed an application on Elastic Beanstalk Platform.</p><h3>Conclusion:</h3><p>Hence, in this AWS EBS , we studied Elastic Beanstalk helps us to easily manage the infrastructure of the AWS. EBS offers fine-grain control which helps us to choose between different technologies that are most helpful for us. Automation feature of EBS helps us to deploy applications with an ease. Containers like Docker help to enhance the deployment process. If one wants to reduce system operations focus on developing codes without worrying about other issues AWS Elastic Bean Stalk is a good choice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7580822c6c80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenVPN Configuration over Centos]]></title>
            <link>https://medium.com/petabytz/openvpn-configuration-over-centos-ec1c8763d140?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec1c8763d140</guid>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[vpn-server]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[openvpn]]></category>
            <category><![CDATA[vpn]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Thu, 18 Jul 2019 17:14:32 GMT</pubDate>
            <atom:updated>2019-07-18T17:14:32.432Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/309/0*ptokQEiv3kPWm1bO" /></figure><p>What do you mean by OpenVPN..?</p><p><strong>OpenVPN</strong>. <strong>OpenVPN</strong> is an open-source commercial software that implements virtual private network (<strong>VPN</strong>) techniques to create secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol that utilizes SSL/TLS for key exchange.</p><p>Why OpenVPN..?</p><ul><li>OpenVPN’s principal strengths include cross-platform portability across most of the known computing universe, excellent stability, scalability to hundreds or thousands of clients, relatively easy installation, and support for dynamic IP addresses and NAT.</li><li>OpenVPN provides an extensible VPN framework which has been designed to ease site-specific customization, such as providing the capability to distribute a customized installation package to clients, or supporting alternative authentication methods via OpenVPN’s plugin module interface (For example the openvpn-auth-pam module allows OpenVPN to authenticate clients using any PAM authentication method — such methods may be used exclusively or combined with X509 certificate-based authentication).</li><li>OpenVPN offers a management interface which can be used to remotely control or centrally manage an OpenVPN daemon. The management interface can also be used to develop a GUI or web-based front-end application for OpenVPN.</li><li>On Windows, OpenVPN can read certificates and private keys from smart cards which support the Windows Crypto API.</li><li>OpenVPN uses an <a href="https://openvpn.net/community-resources/openvpn-protocol/">i</a>ndustrial strenght security model designed to protect against both passive and active attacks. OpenVPN’s security model is based on using SSL/TLS for session authentication and the IPSec ESP protocol for secure tunnel transport over UDP. OpenVPN supports the X509 PKI (public key infrastructure) for session authentication, the TLS protocol for key exchange, the OpenSSL cipher-independent EVP interface for encrypting tunnel data, and the HMAC-SHA1 algorithm for authenticating tunnel data.</li><li>OpenVPN is built for portability. At the time of this writing, OpenVPN runs on Linux, Solaris, OpenBSD, FreeBSD, NetBSD, Mac OS X, and Windows (2000/XP and later versions). Because OpenVPN is written as a user-space daemon rather than a kernel module or a complex modification to the IP layer, porting efforts are dramatically simplified.</li><li>OpenVPN is easy to use. In general, a tunnel can be created and configured with a single command (and without any required configuration files). OpenVPN’s documentation contain examples illustrative of its ease of use.</li><li>OpenVPN has been rigorously designed and tested to operate robustly on unreliable networks. A major design goal of OpenVPN is that it should be as responsive, in terms of both normal operations and error recovery, as the underlying IP layer that it is tunneling over. That means that if the IP layer goes down for 5 minutes, when it comes back up, tunnel traffic will immediately resume even if the outage interfered with a dynamic key exchange which was scheduled during that time.</li><li>OpenVPN has been built with a strongly modular design. All of the crypto is handled by the OpenSSL library, and all of the IP tunneling functionality is provided through the TUN/TAP virtual network driver. The benefits of this modularity can be seen, for example, in the way that OpenVPN can be dynamically linked with a new version of the OpenSSL library and immediately have access to any new functionality provided in the new release. For example, when OpenVPN is built with the latest version of OpenSSL (0.9.7), it automatically has access to new ciphers such as AES-256 (Advanced Encryption Standard with 256 bit key) and the encryption engine capability of OpenSSL that allows utilization of special-purpose hardware accelerators to optimize encryption, decryption, and authentication performance. In the same way, OpenVPN’s user-space design allows straightforward porting to any OS which includes a TUN/TAP virtual network driver.</li><li>OpenVPN is fast. Running Redhat 7.2 on a Pentium II 266mhz machine, using TLS-based session authentication, the Blowfish cipher, SHA1 authentication for the tunnel data, and tunneling an FTP session with large, pre-compressed files, OpenVPN achieved a send/receive transfer rate of 1.455 megabytes per second of CPU time (combined kernel and user time).</li><li>While OpenVPN provides many options for controlling the security parameters of the VPN tunnel, it also provides options for protecting the security of the server itself, such as — chroot for restricting the part of the file system the OpenVPN daemon has access to, — user and — group for downgrading daemon privileges after initialization, and — mlock to ensure that key material and tunnel data is never paged to disk where it might later be recovered.</li></ul><p>Step 1 — Installing OpenVPN:</p><p>To start, we will install OpenVPN on the server. We’ll also install Easy RSA, a public key infrastructure management tool which will help us set up an internal certificate authority (CA) for use with our VPN. We’ll also use Easy RSA to generate our SSL key pairs later on to secure the VPN connections.</p><p>Log in to the server as the non-root sudo user, and update the package lists to make sure you have all the latest versions.</p><pre>sudo yum update -y</pre><p>The Extra Packages for Enterprise Linux (EPEL) repository is an additional repository managed by the Project containing non-standard but popular packages. OpenVPN isn’t available in the default CentOS repositories but it is available in EPEL, so install EPEL:</p><pre>sudo yum install epel-release -y</pre><p>Then update your package lists once more:</p><pre>sudo yum update -y</pre><p>Next, install OpenVPN and wget, which we will use to install Easy RSA:</p><pre>sudo yum install -y openvpn wget</pre><p>Using wget, download Easy RSA.</p><pre>wget -O /tmp/easyrsa https://github.com/OpenVPN/easy-rsa-old/archive/2.3.3.tar.gz</pre><p>Next, extract the compressed file with tar:</p><pre>tar xfz /tmp/easyrsa</pre><p>This will create a new directory on your server called easy-rsa-old-2.3.3 Make a new subdirectory under /etc/openvpn and name it easy-rsa:</p><pre>sudo mkdir /etc/openvpn/easy-rsa</pre><p>Copy the extracted Easy RSA files over to the new directory:</p><pre>sudo cp -rf easy-rsa-old-2.3.3/easy-rsa/2.0/* /etc/openvpn/easy-rsa</pre><p>Then change the directory’s owner to your non-root sudo user:</p><pre>sudo chown petabytz /etc/openvpn/easy-rsa/</pre><p>Step 2 — Configuring OpenVPN:</p><p>OpenVPN has several example configuration files in its documentation directory. First, copy the sample server.conf file as a starting point for your own configuration file.</p><pre>sudo cp /usr/share/doc/openvpn-2.4.4/sample/sample-config-files/server.conf /etc/openvpn</pre><p>Open the new file for editing with the text editor of your choice. We’ll use nano in our example, which you can download with the yum install nano command if you don’t have it on your server already:</p><pre>sudo nano /etc/openvpn/server.conf</pre><p>To get started, find and uncomment the line containing push &quot;redirect-gateway def1 bypass-dhcp&quot;. Doing this will tell your client to redirect all of its traffic through your OpenVPN server. Be aware that enabling this functionality can cause connectivity issues with other network services, like SSH:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*rh296xdg2gk_qoZnkKKL8A.png" /></figure><p>Because your client will not be able to use the default DNS servers provided by your ISP (as its traffic will be rerouted), you need to tell it which DNS servers it can use to connect to OpenVPN.</p><p>We want OpenVPN to run with no privileges once it has started, so we need to tell it to run with a user and group of <strong>nobody</strong>. To enable this, uncomment the user nobody and group nobody lines:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*qjcXN2M-a6vJvzz8WpBBQg.png" /></figure><p>Next, uncomment the topology subnet line. This, along with the server 10.8.0.0 255.255.255.0 line below it, configures your OpenVPN installation to function as a subnetwork and tells the client machine which IP address it should use. In this case, the server will become 10.8.0.1 and the first client will become 10.8.0.2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*J5DkQaQRJKIfijxLGNd_qw.png" /></figure><p>It’s also recommended that you add the following line to your server configuration file. This double checks that any incoming client certificates are truly coming from a client, hardening the security parameters we will establish in later steps:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*jz9TdCvM7gB9klQrGJUEng.png" /></figure><p>Lastly, OpenVPN strongly recommends that users enable TLS Authentication, a cryptographic protocol that ensures secure communications over a computer network. To do this, you will need to generate a static encryption key (named in our example as myvpn.tlsauth, although you can choose any name you like). Before creating this key, comment the line in the configuration file containing tls-auth ta.key 0 by prepending it with a semicolon. Then, add tls-crypt myvpn.tlsauth to the line below it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*Gkm54VAked_WQ9URMQbyjQ.png" /></figure><p>Save and exit the OpenVPN server configuration file.Then generate the static encryption key with the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*_Z2RAYeZHIG_Q3cp-g0_rA.png" /></figure><p>Now that your server is configured, you can move on to setting up the SSL keys and certificates needed to securely connect to your VPN connection.</p><p>Step 3 — Generating Keys and Certificates:</p><p>Easy RSA uses a set of scripts that come installed with the program to generate keys and certificates. In order to avoid re-configuring every time you need to generate a certificate, you can modify Easy RSA’s configuration to define the default values it will use for the certificate fields, including your country, city, and preferred email address.</p><p>We’ll begin our process of generating keys and certificates by creating a directory where Easy RSA will store any keys and certs you generate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*hA-B5cE4stwEjnTJ7WDTTA.png" /></figure><p>The default certificate variables are set in the vars file in /etc/openvpn/easy-rsa, so open that file for editing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*e6efcVJ8YB_hykHDx32_Ag.png" /></figure><p>Change the values that start with export KEY_ to match your information. The ones that matter the most are:</p><ul><li>KEY_CN: Here, enter the domain or subdomain that resolves to your server.</li><li>KEY_NAME: You should enter server here. If you enter something else, you would also have to update the configuration files that reference server.key and server.crt.</li></ul><p>The other variables in this file that you may want to change are:</p><ul><li>KEY_COUNTRY: For this variable, enter the two-letter abbreviation of the country of your residence.</li><li>KEY_PROVINCE: This should be the name or abbreviation of the state of your residence.</li><li>KEY_CITY: Here, enter the name of the city you live in.</li><li>KEY_ORG: This should be the name of your organization or company.</li><li>KEY_EMAIL: Enter the email address that you want to be connected to the security certificate.</li><li>KEY_OU: This should be the name of the “Organizational Unit” to which you belong, typically either the name of your department or team.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*kQDGkVzFaDDXiBJ4opDgMA.png" /></figure><p>Save and close the file.</p><p>To start generating the keys and certificates, move into the easy-rsa directory and source in the new variables you set in the vars file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*Hc3dnGoJqrLQWOTcjkMHzg.png" /></figure><p>Run Easy RSA’s clean-all script to remove any keys and certificates already in the folder and generate the certificate authority.</p><p>Next, build the certificate authority with the build-ca script. You&#39;ll be prompted to enter values for the certificate fields, but if you set the variables in the vars file earlier, all of your options will already be set as the defaults. You can press ENTER to accept the defaults for each one.</p><p>This script generates a file called ca.key. This is the private key used to sign your server and clients’ certificates. If it is lost, you can no longer trust any certificates from this certificate authority, and if anyone is able to access this file they can sign new certificates and access your VPN without your knowledge.</p><p>Next, create a key and certificate for the server using the build-key-server script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*ebGh3O5ntJUxluOYsddzCg.png" /></figure><p>The last part of creating the server keys and certificates is generating a Diffie-Hellman key exchange file. Use the build-dh script to do this:</p><p>./build-dh</p><p>This may take a few minutes to complete.</p><p>Once your server is finished generating the key exchange file, copy the server keys and certificates from thekeys directory into the openvpn directory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*7Mlz6V56RPvCm1KNSoFOdA.png" /></figure><p>Each client will also need a certificate in order for the OpenVPN server to authenticate it. These keys and certificates will be created on the server and then you will have to copy them over to your clients.It’s advised that you generate separate keys and certificates for each client you intend to connect to your VPN.</p><p>Because we’ll only set up one client here, we called it client, but you can change this to a more descriptive name if you’d like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*Y8kbtYF7pdNJYfoXptjpkg.png" /></figure><p>Finally, copy the versioned OpenSSL configuration file, openssl-1.0.0.cnf, to a versionless name, openssl.cnf</p><pre>cp /etc/openvpn/easy-rsa/openssl-1.0.0.cnf /etc/openvpn/easy-rsa/openssl.cnf</pre><p>Now that all the necessary keys and certificates have been generated for your server and client, you can move on to setting up routing between the two machines.</p><p>Step 4 — Routing:</p><p>OpenVPN with any instructions on where to send incoming web traffic from clients. You can stipulate how the server should handle client traffic by establishing some firewall rules and routing configurations.</p><p>To allow OpenVPN through the firewall, you’ll need to know what your active firewalld zone is. Find this with the following command:</p><pre>sudo firewall-cmd --get-active-zones</pre><pre>Output</pre><pre>trusted<br>  Interfaces: tun0</pre><p>Next, add the openvpn service to the list of services allowed by firewalld within your active zone, and then make that setting permanent by running the command again but with the --permanent option added:</p><pre>sudo firewall-cmd --zone=trusted --add-service openvpn</pre><pre>sudo firewall-cmd --zone=trusted --add-service openvpn --permanent</pre><p>You can check that the service was added correctly with the following command:</p><pre>sudo firewall-cmd --list-services --zone=trusted<br>Output</pre><pre>openvpn</pre><p>Next, add a masquerade to the current runtime instance, and then add it again with the --permanent option to add the masquerade to all future instances:</p><pre>sudo firewall-cmd --add-masquerade</pre><pre>sudo firewall-cmd --permanent --add-masquerade</pre><p>You can check that the masquerade was added correctly with this command:</p><pre>sudo firewall-cmd --query-masquerade</pre><pre>Output<br>yes</pre><p>Next, forward routing to your OpenVPN subnet. You can do this by first creating a variable (SHARK in our example) which will represent the primary network interface used by your server, and then using that variable to permanently add the routing rule:</p><pre>SHARK=$(ip route get 8.8.8.8 | awk &#39;NR==1 {print $(NF-2)}&#39;)</pre><pre>sudo firewall-cmd --permanent --direct --passthrough ipv4 -t nat -A POSTROUTING -s 10.8.0.0/24 -o $SHARK -j MASQUERADE</pre><p>Be sure to implement these changes to your firewall rules by reloading firewalld:</p><pre>sudo firewall-cmd --reload</pre><p>Next, enable IP forwarding. This will route all web traffic from your client to your server’s IP address, and your client’s public IP address will effectively be hidden.</p><p>Open</p><pre>sudo nano /etc/sysctl.conf</pre><p>Then add the following line at the top of the file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*axi36216CTwO-_UxgQCDwQ.png" /></figure><p>Finally, restart the network service so the IP forwarding will take effect:</p><pre>sudo systemctl restart network.service</pre><p>With the routing and firewall rules in place, we can start the OpenVPN service on the server.</p><p>Step 5 — Starting OpenVPN:</p><p>OpenVPN is managed as a systemd service using systemctl. We will configure OpenVPN to start up at boot so you can connect to your VPN at any time as long as your server is running. To do this, enable the OpenVPN server by adding it to systemctl:</p><pre>Sudo systemctl -f enable openvpn@server.service</pre><p>Then start the OpenVPN service:</p><pre>sudo systemctl start openvpn@server.service</pre><p>Double check that the OpenVPN service is active with the following command. You should see active (running) in the output:</p><pre>sudo systemctl status openvpn@server.service</pre><pre>Output</pre><pre>● openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server<br>   Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled; vendor preset: disabled)<br>   Active: **active (running)** since Wed 2018-03-14 15:20:11 EDT; 7s ago<br> Main PID: 2824 (openvpn)<br>   Status: &quot;Initialization Sequence Completed&quot;<br>   CGroup: /system.slice/system-openvpn.slice/openvpn@server.service<br>           └─2824 /usr/sbin/openvpn --cd /etc/openvpn/ --config server.conf<br>. . .</pre><p>We’ve now completed the server-side configuration for OpenVPN. Next, you will configure your client machine and connect to the OpenVPN server.</p><p>Step 6 — Configuring a Client</p><p>Locate the following files on your server. If you generated multiple client keys with unique, descriptive names, then the key and certificate names will be different. In this article we used client.</p><pre>/etc/openvpn/easy-rsa/keys/ca.crt<br>/etc/openvpn/easy-rsa/keys/client.crt<br>/etc/openvpn/easy-rsa/keys/client.key<br>/etc/openvpn/myvpn.tlsauth</pre><p>Copy these files to your client machine. You can use SFTP or your preferred method. You could even just open the files in your text editor and copy and paste the contents into new files on your client machine. Regardless of which method you use, be sure to note where you save these files.</p><p>Next, create a file called client.ovpn on your client machine. This is a configuration file for an OpenVPN client, telling it how to connect to the server:</p><pre>sudo nano client.ovpn</pre><p>Then add the following lines to client.ovpn. Notice that many of these lines reflect those which we uncommented or added to the server.conf file, or were already in it by default:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*IsJoxtbAP8qBo9arLJvRBw.png" /></figure><p>When adding these lines, please note the following:</p><ul><li>You’ll need to change the first line to reflect the name you gave the client in your key and certificate; in our case, this is just client</li><li>You also need to update the IP address from your_server_ip to the IP address of your server; port 1194 can stay the same</li><li>Make sure the paths to your key and certificate files are correct.</li></ul><p>Conclusion:</p><p>You should now have a fully operational virtual private network running on your OpenVPN server. You can browse the web and download content without worrying about malicious actors tracking your activity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec1c8763d140" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/openvpn-configuration-over-centos-ec1c8763d140">OpenVPN Configuration over Centos</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inter Region Aws VPC Peering]]></title>
            <link>https://medium.com/petabytz/inter-region-aws-vpc-peering-e81108b0f201?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e81108b0f201</guid>
            <category><![CDATA[vpc-peering]]></category>
            <category><![CDATA[subnet]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[vpc]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Wed, 17 Jul 2019 14:35:02 GMT</pubDate>
            <atom:updated>2019-07-17T14:35:02.015Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/379/0*ft9MymYhWygX866G" /><figcaption>VPC Peering</figcaption></figure><p>What is Vpc?</p><p>Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network that you’ve defined. This virtual network closely resembles a traditional network that you’d operate in your own data center, with the benefits of using the scalable infrastructure of AWS.</p><p>Concepts of VPC</p><ol><li>VPCs and Subnets:</li></ol><p>A <em>virtual private cloud</em> (VPC) is a virtual network dedicated to your AWS account. It is logically isolated from other virtual networks in the AWS Cloud. You can launch your AWS resources, such as Amazon EC2 instances, into your VPC. You can specify an IP address range for the VPC, add subnets, associate security groups, and configure route tables.</p><p>A <em>subnet</em> is a range of IP addresses in your VPC. You can launch AWS resources into a specified subnet. Use a public subnet for resources that must be connected to the internet, and a private subnet for resources that won’t be connected to the internet. For more information about public and private subnets.</p><p>To protect the AWS resources in each subnet, you can use multiple layers of security, including security groups and network access control lists (ACL).</p><p>2. Accessing the Internet:</p><p>You control how the instances that you launch into a VPC access resources outside the VPC.</p><p>Your default VPC includes an internet gateway, and each default subnet is a public subnet. Each instance that you launch into a default subnet has a private IPv4 address and a public IPv4 address. These instances can communicate with the internet through the internet gateway. An internet gateway enables your instances to connect to the internet through the Amazon EC2 network.</p><h3>Adding IPv4 CIDR Blocks to a VPC</h3><p>You can associate secondary IPv4 CIDR blocks with your VPC. When you associate a CIDR block with your VPC, a route is automatically added to your VPC route tables to enable routing within the VPC (the destination is the CIDR block and the target is local).</p><p>In the following example, the VPC on the left has a single CIDR block (10.0.0.0/16) and two subnets. The VPC on the right represents the architecture of the same VPC after you’ve added a second CIDR block (10.2.0.0/16) and created a new subnet from the range of the second CIDR.</p><p>What is VPC peering..?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/0*wAY9iFDT81DujkLh.png" /><figcaption>VPC Peering between VPCA — VPCB</figcaption></figure><p>A <strong>VPC peering</strong> connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. Instances in either <strong>VPC</strong> can communicate with each other as if they are within the same network.</p><h4>Implementation of VPC Peering:</h4><p>Let’s follow the below steps to see how VPC Peering can be implemented.</p><p>The first few steps will involve creating 2 VPC’s first before peering them together.</p><p>Step 1) Log into your AWS Console. Choose the relevant region and go to the VPC section under Networking and Content Delivery section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*Pvuy532ujnffjVjwG3SsJA.png" /></figure><p>Step 2) Create one VPC with a name tag of VPCA and CIDR block of 10.0.0.0/16</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*DB8fRd8JUGDgCsgNFmkFBQ.png" /></figure><p>Step 3) Create another VPC with a name tag of VPCB and CIDR block of 20.0.0.0/16</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/0*tYeXBWhLthRaFx4A.png" /></figure><p>Step 4) Now let’s create subnets in each of these VPC’s. In VPCA let’s create a subnet with a Name tag of SubnetA with a CIDR block of 20.0.1.0/24</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*GJrWgqvcuQ2F_ZpT.png" /></figure><p>Step 5) Nowlet’s create a subnet in VPCB. In VPCA let’s create a subnet with a Name tag of SubnetB with a CIDR block of 10.0.1.0/24</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/0*GIvjTb13ez5gb_dt.png" /></figure><p>Step 6) Now we are going to launch instances in both of the subnets. We want to ensure that both subnets get Public IP addresses, so enable them for the each subnet accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*OtSNsfSahkEhD8Be.png" /></figure><p>Ensure the Auto-assign IP settings is enabled for both subnets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*xuU_eHvI-6u1wsOz.png" /></figure><p>Step 7) Now let’s create a VPC Peering connection between both of the VPC’s</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/0*MXzUGpQJn-0kKRxp.png" /></figure><p>Step 8)In the next screen go ahead and click on Creating a new peering connection.For the peering connection, give a name tag for the connection. And then put the requester of the VPC as VPCA</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/0*-kF1xRBlMW0G13Qo.png" /></figure><p>Then choose the other VPC as the VPC to Peer with and then click on Create Peering connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/0*Fp_nd6By4A1VdRQn.png" /></figure><p>Step 9) Now the VPC Peering connection you can see that the Status is Pending Acceptance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/0*MxS39cSnTBQCturw.png" /></figure><p>Choose the connection, click on Actions-&gt;Accept Request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*pMXSz0gIGBqowdbr.png" /></figure><p>And then accept the request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*RspW7FTxWOzwo6sA.png" /></figure><p>Once done, the connection will be in the Active State</p><p>Step 10) Now we need to modify the route tables of both the VPC’s to ensure that communication can flow via the VPC Peering connection.</p><p>So in the Route Table for VPC B, we need to add the destination for the CIDR of VPC A as the destination and the VPC Peering connection as the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/0*OEjI1dskDjxchXpe.png" /></figure><p>We need to do the same thing for the Route table of VPC A</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*ERWa9U4tLLtQvRIT.png" /></figure><p>If you want to connect to anyone of the instances in the VPC via the internet, ensure that the internet gateway is attached to the Route table as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/0*r3nO8vh0O0wrU3pG.png" /></figure><p>Step 11) Now it’s time to launch instances in each VPC.</p><p>So here we have 2 servers, one is ServerA which is launched in VPCA and ServerB launched in VPCB</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/0*yap0SVENp2di_nSE.png" /></figure><p>Now we are going to connect to ServerA in VPCA and then ping ServerB. The private IP of ServerB is 10.0.1.138.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*_XxcqyjUkMJArCit.png" /></figure><p>Since we are going to use the ping command , ensure that the Security Group for both instances have the security group modified to allow the ICMP protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*-nXvPA45819nlJRG.png" /></figure><p>Once all of this is in place, you will be able to ping ServerB from ServerA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*U3GpbrQcjzFDin6CcGzGYQ.png" /></figure><p>Main Points to Remember:</p><p>VPC and Subnet Sizing for IPv4</p><p>When you create a VPC, you must specify an IPv4 CIDR block for the VPC. The allowed block size is between a /16 netmask (65,536 IP addresses) and /28 netmask (16 IP addresses). After you’ve created your VPC, you can associate secondary CIDR blocks with the VPC. For more information, see Adding IPv4 CIDR Blocks to a VPC.</p><p>When you create a VPC, we recommend that you specify a CIDR block (of /16 or smaller) from the private IPv4 address ranges as specified in RFC 1918:</p><p>10.0.0.0–10.255.255.255 (10/8 prefix)</p><p>172.16.0.0–172.31.255.255 (172.16/12 prefix)</p><p>192.168.0.0–192.168.255.255 (192.168/16 prefix)</p><p>You can create a VPC with a publicly routable CIDR block that falls outside of the private IPv4 address ranges specified in RFC 1918; however, for the purposes of this documentation, we refer to private IP addresses as the IPv4 addresses that are within the CIDR range of your VPC.</p><p>So here we have VPCA peered to VPCB and VPCB peered to VPCC. This does not mean that VPCA can communicate with VPCC through VPCB.</p><p>For VPCA to communicate with VPCC, there has to be one explicit VPC Peering connection from VPCA to VPCC as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/0*vrWaeOJIIitO9F0-.png" /></figure><ul><li>You are not allowed to create a VPC peering connection between VPCs with overlapping or matching IPv6 or IPv4 CIDR blocks</li><li>It is not possible to create a VPC peering connection between VPCs present in different regions</li><li>Only one VPC peering connection is possible between two VPCs at a time</li><li>In case of following VPC peering connections, it is not allowed to extend the peering</li></ul><p>(a) If corporate network have VPN or AWS Direct connection</p><p>(b) If internet is connected through a NAT device in a private subnet</p><p>© If internet is connected via an internet gateway</p><p>(d) VPC endpoint to an AWS service, such as an endpoint to Amazon S3.</p><p>Conclusion:</p><p>VPC peering should be carefully planned, taking into account the limitations and considerations, and, it’s not always the most flexible solution in the long run.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e81108b0f201" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/inter-region-aws-vpc-peering-e81108b0f201">Inter Region Aws VPC Peering</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazon Workspace for Business (Poc)]]></title>
            <link>https://medium.com/petabytz/amazon-workspace-for-business-poc-67999d8c5ae?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/67999d8c5ae</guid>
            <category><![CDATA[aws-vpc]]></category>
            <category><![CDATA[workspace]]></category>
            <category><![CDATA[nat-gateway]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Wed, 03 Jul 2019 14:16:01 GMT</pubDate>
            <atom:updated>2019-07-03T14:16:01.030Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*QMOULUtOinySNMXHQ3lt8A.png" /></figure><p><strong><em>WORKSPACES:</em></strong></p><p>When deploying an Amazon WorkSpaces environment, adhering to the principles outlined in the AWS Well-Architected Framework will help ensure a secure, scalable, high-performing, and cost-optimized solution. This guide reviews the Framework and leads the architect through the process of deploying a Well-Architected Amazon WorkSpaces.</p><p><strong>LETS BEGIN: </strong>Lets Begin The architect should have a basic understanding of core AWS technologies, including Amazon Virtual Private Cloud (VPC) Amazon Elastic Compute Cloud (Amazon EC2), Security Groups, Network Access Control Lists, subnetting, and routing.</p><p><strong>Secure Proper Access and Privileges</strong></p><p>The engineer ought to guarantee that they approach the accompanying:</p><p>• An AWS record and comfort access with adequate benefits to control the required assets engaged with the POC. For guidelines on setting consents for WorkSpaces assets and activities.</p><p>WorkSpaces Resources section of the Amazon WorkSpaces Administrator Guide.</p><p>2 AWS suggests applying the standards of Least Privilege when giving access to assets to decrease potential assault surface. This guideline involves giving clients close to the base measure of benefit required to play out their job.</p><ul><li>Access and benefits to control client premise assets that might be engaged with the POC, for example, Microsoft Active Directory (for verification and approval), firewalls, switches, VPN gadgets, multifaceted verification (MFA) gadgets, and so on. Firewalls square unapproved access to organize assets while allowing system traffic to and from approved sources.</li></ul><p><strong><em>Identify and Supported Availability Zones:</em></strong></p><p>Amazon WorkSpaces is supported in 11 commercial regions around the world. The service may not be supported in every Availability Zone (AZ) within those regions. When creating the subnets for your Amazon WorkSpaces POC, you must ensure that they are created in AZs that support the Amazon WorkSpaces service.</p><p><strong>Well Architected Framework:</strong></p><p>The AWS Well-Architected Framework has been created to help cloud draftsmen manufacture secure, high-performing, versatile, and proficient framework for their applications.</p><p>In view of five columns — operational perfection, security, dependability, execution proficiency, and cost advancement — the Framework gives a reliable way to deal with clients and accomplices to assess structures, and actualize plans that will scale after some time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*6NxhckmM3JRdIKRJuNll8g.png" /></figure><p><strong>Overview of Archiecture:</strong></p><p>The accompanying chart demonstrates the system stream for an Amazon WorkSpaces client interfacing with the administration by means of the open web from outside the corporate firewall.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*6ge9mvSRfSnxP_QBnAx5Wg.png" /><figcaption>WorkSpaces Network Flow: Connecting from Public internet</figcaption></figure><p>Building on the general architecture above, this guide will walk through setting up an environment similar to the following:</p><p><strong>Best Practise of VPC:</strong></p><p>You can without much of a stretch redo the system arrangement for your Amazon VPC. For model, you can make an open subnet for your web servers that approaches the web, and spot your backend frameworks, for example, WorkSpaces, databases, or application servers, in a private-confronting subnet without web get to. You can use different layers of security, including security gatherings and system access control records, to help control access to Amazon EC2 occurrences and WorkSpaces in each subnet.</p><p>The VPC for this POC walkthrough has the accompanying plan components:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*VIIQ-zBxuPA0epGHDWl5IQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*t2FcIKbZy6l1rLkor2fG9w.png" /></figure><p><strong>SETUP VPC:</strong></p><p><strong>Configure VPC</strong></p><p><strong>Step 1- Allocate Elastic IP address</strong></p><p>Allocate an Elastic IP address for your NAT gateway as follows.</p><p>1. Open the Amazon VPC console.</p><p>2. In the navigation pane, choose Elastic IPs.</p><p>3. Choose Allocate new address.</p><p>4. On the Allocate new address page, choose Allocate and make note of the Elastic IP address, then choose Close.</p><p><strong>Step 2- Create VPC</strong></p><p>Create a VPC with two public subnets and two private subnets as follows.</p><p>We want Public Subnet_1 and Private Subnet_1 to share the same Availability Zone and we want Public subnet_2 and Private Subnet_2 to share a different Availability Zone. Both Availability Zones selected must support the Amazon WorkSpaces service.</p><p>1. In the route sheet, pick VPC Dashboard.</p><p>2. Pick Launch VPC Wizard.</p><p>3. Pick VPC with Public and Private Subnets and afterward pick Select.</p><p>4. Arrange the VPC as pursues: a. For IPv4 CIDR square, type the CIDR obstruct for the VPC. b. For VPC name, type a name for the VPC.</p><p>5. Design the open subnet as pursues: Amazon Web Services Amazon WorkSpaces Well-Architected Proof-of-Concept</p><p>a. For IPv4 CIDR square, type the CIDR hinder for the subnet.</p><p>b. For Availability Zone, select an AZ upheld by the Amazon WorkSpaces administration</p><p>c. For Public subnet name, type a name for the subnet (for instance, WorkSpaces Public Subnet_1)</p><p>6. Arrange the principal private subnet as pursues: a. For Private subnet’s IPv4 CIDR, type the CIDR obstruct for the subnet. b. For Availability Zone, select a similar AZ picked in step 5b above. c. For Private subnet name, type a name for the subnet (for instance, WorkSpaces Private Subnet_1).</p><p>7. For Elastic IP Allocation ID, pick the Elastic IP address that you made. On the off chance that you are utilizing an elective technique for giving web get to, you can skirt this progression.</p><p>8. Pick Create VPC. (The move can make a few minutes to finish.) After the VPC is made, pick OK</p><p><strong>Step 3: </strong>Add a Second Public Subnet In the previous step, you created a VPC with one public subnet and one private subnet. Use the following procedure to add a second public subnet. To Add a Subnet</p><p>1. In the route sheet, pick Subnets</p><p>2. Pick Create Subnet.</p><p>3. For Name tag, type a name for the second open subnet (for instance, WorkSpaces Public Subnet_2). 4. For VPC, select the VPC that you made.</p><p>5. For Availability Zone, select an AZ from the rundown of WorkSpaces bolstered AZ’s given by your AWS Solutions Architect, yet not quite the same as that of the primary open subnet.</p><p>6. For IPv4 CIDR square, type the CIDR hinder for the subnet.</p><p>7. Pick Yes, Create.</p><p>8. Snap Close to come back to the VPC comfort see. Amazon Web Services Amazon WorkSpaces Well-Architected Proof-of-Concept Page 10 Now we should adjust the course table of the subnet to make it an open subnet.</p><p>9. Pick Route Tables on the route sheet. Two course tables ought to be unmistakable for this VPC. (You can Filter by VPC in the upper left-hand corner of the VPC reassure to limit the rundown of assets appeared one VPC).</p><p>10. Note which course table for the VPC isn’t the principle course table. Confirm on the Routes tab that there is a course for 0.0.0.0/0 with a goal to the Internet Gateway (igw). Whenever affirmed, alter the Name field as “Course to IGW”.</p><p>11.Verify that the other course table (Main = Yes) has a course for 0.0.0.0/0 to the NAT passage recently made. Whenever affirmed, set the name to “Course to NAT1”.</p><p>12.Select Subnets on the left menu.</p><p>13.Select the as of late made second Public Subnet.</p><p>14.Select the Route Table tab and pick Edit Route Table Associations.</p><p>15.In the drop-down, select the course table that focuses to the Internet Gateway and snap Save. Snap Close to come back to the VPC comfort see. The subnet is currently a Public subnet as it has a course to web by means of the IGW.</p><p><strong>Stage 4</strong>: <strong>Add a NAT Gateway to the Second Public Subnet</strong></p><p>1. Select NAT Gateways from the left menu</p><p>2. Pick Create NAT Gateway.</p><p>3. For subnet, pick the second open subnet made already.</p><p>4. Select Create New EIP. At that point pick the recently made EIP from the dropdown what’s more, click Create NAT Gateway.</p><p>5. Note the ID of the second NAT entryway and select Close to come back to the VPC support .</p><p>Make another Route Table directing web traffic toward this second NAT Gateway.</p><p>6. Select NAT Gateways from the route sheet.</p><p>7. Two NAT Gateways ought to be noticeable if sifting by the VPC we are working with in this activity. Observing either the NAT Gateway ID, the private IP address or the Creation time, Edit the names of the two NAT Gateways as NAT1 what’s more, NAT2. Amazon Web Services Amazon WorkSpaces Well-Architected Proof-of-Concept</p><p>8. Select Route Tables from the route sheet.</p><p>9. Select Create Route Table.</p><p>10.Name the course table Route to NAT2 and pick Create. Select Close to return to the VPC reassure View.</p><p>11.Select the new course table. Select the Routes tab and select Edit Routes.</p><p>12.For Destination enter 0.0.0.0/0 and Target the as of late made second NAT Portal, NAT2. Snap Save.</p><p><strong>Stage 5:</strong> <strong>Add a Second Private Subnet</strong></p><p>In the past advances, you made a second open subnet and a NAT Gateway. Utilize the</p><p>following strategy to include a second private subnet and course web traffic through the</p><p>second NAT Gateway.</p><p>To Add a Subnet</p><p>1. In the route sheet, pick Subnets.</p><p>2. Pick Create Subnet.</p><p>3. For Name tag, type a name for the private subnet (for instance, WorkSpaces Private Subnet_2).</p><p>4. For VPC, select the VPC that you made.</p><p>5. For Availability Zone, select an AZ from the rundown of WorkSpaces upheld AZs</p><p>given by your AWS Solutions Architect, yet not quite the same as the primary private</p><p>subnet.</p><p>6. For IPv4 CIDR square, type the CIDR hinder for the subnet.</p><p>7. Pick Yes, Create. Snap Close to come back to the VPC Console see. Presently we should relate this private subnet with the course table coordinating web traffic during that time NAT example (NAT2).</p><p>8. Select the second private subnet. Select Route Table tab and Edit course table affiliation.</p><p>9. In the drop-down, pick the course table indicating the second NAT Gateway (NAT2) and snap Save.</p><p><strong>Stage 6: Verify the Route Tables</strong></p><p>You can check the course tables that you made. To check the course tables</p><p>1. In the route sheet, pick Subnets, and select the principal open subnet that you made.</p><p>2. On the Route Table tab, pick the ID of the course table (for instance, Route to IGW).</p><p>3. On the Routes tab, confirm that there is one course for neighborhood traffic and another course that sends all other traffic to the web portal for the VPC.</p><p>4. In the route sheet, pick Subnets, and select the main private subnet that you made (for instance, WorkSpaces Private Subnet 1).</p><p>5. On the Route Table tab, pick the ID of the course table.</p><p>6. On the Routes tab, check that there is one course for nearby traffic and another course</p><p>that sends all other traffic to the first NAT passage (NAT1).</p><p>7. In the route sheet, pick Subnets, and select the second private subnet that you made (for instance, WorkSpaces Private Subnet 2).</p><p>8. On the Routes tab, confirm that the course table is the course table coordinating web traffic during that time NAT Gateway (for instance, Route to NAT2). In the event that the course table is extraordinary, pick Edit and select this course table.</p><h3>If you are getting any Error while connecting to Workspace Spaces that This OS/platform is not authorized to access your Workspace. Please follow below steps :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*KUhGPxlJktoDybnJOpm-Zw.png" /></figure><p><strong>Solution:</strong></p><p>Web Access should be expressly empowered. As these were moderately new workspaces .The workspaces likewise didn’t need to be revamped to permit web availability as opposed to the AWS documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*-Kc1yhz6BtAoc54icdtCIQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*uERk4R409RLTKWOuCHvoGA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*ikDfAl764lpRD4KL_6PCRQ.png" /></figure><p>Conclusion:</p><p>In this way we can get connected to workspaces. With scalable, high-performing, and cost-optimized solution. This guide reviews the Framework and leads the architect through the process of deploying a Amazon WorkSpaces</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67999d8c5ae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/amazon-workspace-for-business-poc-67999d8c5ae">Amazon Workspace for Business (Poc)</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating On-Premises Apps to Cloud]]></title>
            <link>https://medium.com/petabytz/migrating-on-premises-apps-to-cloud-42cddd1f521?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/42cddd1f521</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[app-migration]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Sat, 29 Jun 2019 10:04:55 GMT</pubDate>
            <atom:updated>2019-06-29T10:04:55.352Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*_ccqUDZNsYoHmje9NfqjPA.png" /></figure><p><strong>Migration</strong></p><p>Aws Migration is a service that monitors the progress of application migrations to the Amazon Web Services public cloud. The service enables the user to collect and view data from on-premises resources, including servers, and group them into applications.</p><p><strong>Need Of Migration</strong></p><p>Your customers need quick application usage and organization</p><p>It’s getting to be costly to deal with the developing database needs</p><p>You are wary about the disaster of server farm going down</p><p>On the off chance that you Migrate to Cloud, at that point the issues referenced above will get dealt with consequently.</p><p><strong>Phases of AWS Migration</strong></p><p>Data Migration is an easy process because in layman’s term, it means moving your data from one location to the other. However, it is more complex as the process involves different phases. Let us now know about the various phases of Migration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*VISVDVk8lEm9PLXfE-ZYJg.png" /></figure><p><strong>1- Discovery</strong></p><p>There are times you need not require to move your whole business to the cloud.This is the place isolation is significant. You have to distinguish the applications which can be Migrated and which can’t. This is the thing that the principal stage is about.</p><p><strong>2- Assessment</strong></p><p>Contingent upon the information, AWS gives various approaches to Migrate your application for example AWS Snowball, AWS Snowmobile, AWS Direct Connect, and so forth. When you have picked a fitting method to move your information, additionally search for the assets you’ll requirement for it.</p><p><strong>3- POC(Proof of Concepts)</strong></p><p>When you know how and what you are relocating, next, you need to make sense of how and where you will store it. The whole thought process of moving to AWS is to limit costs. In this stage, you’ll test your remaining task at hand and comprehend about AWS Storage Service, their advantages, impediments, and the vital security controls.</p><p><strong>4- Move Application</strong></p><p>Since you have all the pre-imperatives like the outline, Migration devices, rundown of assignments, reinforcements and its synchronization with your on-premises information archives. You can at long last relocate your task to AWS Cloud. When you have Migrated your venture to cloud, unwavering quality, and solidness are the additional advantages you get.</p><p><strong>5- Cloudify and Optimize</strong></p><p>Now, you’ve just moved to AWS, and AWS will bring refreshes that you’ll have to fuse in your current engineering. Thus, you should guarantee that you have a 24×7 help group monitoring framework support and updates after the Migration.</p><p><strong>Application Migration Strategies ‘The 6 R’s’</strong></p><p>The complexity of migrating existing applications varies, depending on the architecture, Amazon came up with different strategies which they commonly termed as 6 R’s. Let’s discuss each of them:</p><ol><li><strong>Rehost:-</strong> You have your application ready and working then you can simply Rehost it on AWS. Also referred to “Lift and Shift”. You lift your services and applications from your hosting environment and shift them to cloud using a third party exporting tool.</li><li><strong>Replatform:-</strong> You have an outdated version of your application running on your hosting environment so you have to modify your application and then Rehost it. Replatform is a modification of “Lift and Shift”. It involves optimizing the cloud architecture to achieve the benefits without changing the core architecture of the application.</li><li><strong>Repurchase:-</strong> There would be certain applications that won’t be compatible with the new architecture. In that case, you need to purchase a new application for the new architecture. AWS Marketplace provides a wide range of services that too with a “Pay as you Use” model. <em>Repurchase</em> is also referred to as <em>“drop and shop”</em> where you upgrade, ease the implementation and accept the new architecture and make changes to the existing model.</li><li><strong>Refactor:- </strong>You want to add up new features, scale up the limits of the existing business model and performance that are difficult with the existing environment. You reconsider your needs, though the solution is a bit expensive. Improving business by moving to a service-oriented architecture (SOA) will benefit your business in the longer run.</li><li><strong>Retire:- </strong>After <em>AWS Migration</em> you can differentiate between useful and useless resources. Hence, you cut off all the resources that are no longer useful to the business and build a strategy around the new resources. This will cut down the extra cost. With lesser things to worry about, now you can focus on maintaining the resources used by the new business model.</li><li><strong>Retain:-</strong> As you know, the sections of your project you need to migrate. You can simply use any of the above-mentioned strategies. Then, build a strategy to retain those applications, which, according to your business model are yet not ready to be migrated to the cloud or the applications that were upgraded recently.</li></ol><p><strong>Advantages of Migration</strong></p><p>AWS Migration gives your organization limitless benefits. Let’s look into the major ones in brief.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*ITQM5kqr3KNs5VqYCabPFA.png" /></figure><p><strong>a)</strong> <strong>Open and Flexible</strong></p><p>You choose the development platform or programming model that makes the most sense for your business. You can choose which services you use, one or several, and choose how you use them. This flexibility allows you to focus on innovation, not infrastructure.</p><p><strong>b) Scalable</strong></p><p>AWS Auto Scaling lets you set target utilization levels for multiple resources in a interface. You can quickly see the average utilization of all of your scalable resources without having to navigate to other consoles. For example, if your application uses Amazon EC2 and Amazon DynamoDB, you can use AWS Auto Scaling to manage resource provisioning for all of the EC2 Auto Scaling groups and database tables in your application.</p><p><strong>c) Reliable</strong></p><p>The Reliability pillar includes the ability of a system to recover from infrastructure or service disruptions, dynamically acquire computing resources to meet demand, and mitigate disruptions such as misconfigurations or transient network issues.</p><p><strong>d) Cost Effective</strong></p><p>You pay only for the compute power, storage, and other resources you use, with no long-term contracts or up-front commitments.On comparing the costs of other hosting alternatives with AWS.</p><p><strong>e) Easy to use</strong></p><p>AWS is designed to allow application providers, ISVs, and vendors to quickly and securely host your applications — whether an existing application or a new SaaS-based application. You can use the AWS Management Console or well-documented web services APIs to access AWS’s application hosting platform.</p><p><strong>f) Secure</strong></p><p>AWS provides several security capabilities and services to increase privacy and control network access. These include:</p><p>a) Network firewalls built into Amazon VPC, and web application firewall capabilities in AWS WAF let you create private networks, and control access to your instances and applications</p><p>b) Customer-controlled encryption in transit with TLS across all services</p><p>c) Connectivity options that enable private, or dedicated, connections from your office or on-premises environment</p><p>d) Automatic encryption of all traffic on the AWS global and regional networks between AWS secured facilities</p><p><strong>g) Flexible</strong></p><p>AWS enables you to select the operating system, programming language, web application platform, database, and other services you need. With AWS, you receive a virtual environment that lets you load the software and services your application requires. This eases the migration process for existing applications while preserving options for building new solutions.</p><p><strong>Services for Migration</strong></p><h4>Amazon S3 Transfer Acceleration</h4><p>Amazon S3 Transfer Acceleration enables fast, easy, and secure transfers of files over long distances between your client and an S3 bucket. Transfer Acceleration takes advantage of Amazon CloudFront’s globally distributed edge locations. As the data arrives at an edge location, data is routed to Amazon S3 over an optimized network path.</p><p><strong>AWS Snowball</strong></p><p>Snowball is a petabyte-scale data transport solution that uses devices designed to be secure to transfer large amounts of data into and out of the AWS Cloud. … Transferring data with Snowball is simple, fast, more secure, and can be as little as one-fifth the cost of transferring data via high-speed Internet.</p><p><a href="https://aws.amazon.com/snowmobile/"><strong>AWS Snowmobile</strong></a></p><p>It is an large scale data transfer solution to move an extremely large amount of data to AWS. Snowmobile makes the transfer of massive volumes of data easier.</p><p><strong>Direct Connect</strong></p><p>AWS Direct Connect lets you establish 1 Gbps or 10 Gbps dedicated network connections (or multiple connections) between AWS networks and one of the AWS Direct Connect locations. It uses industry-standard VLANs to access Amazon Elastic Compute Cloud (Amazon EC2) instances running within an Amazon VPC using private IP addresses. You can choose from an ecosystem of WAN service providers for integrating your AWS Direct Connect endpoint in an AWS Direct Connect location with your remote networks.</p><p>Demo: Migration utilizing Import/Export strategy</p><p>Migrating an on-premise Virtual OS running on VMWare to AWS using Import/Export (AWS Direct Connect) method.</p><ol><li>Create a <strong>.vmdk</strong> export file for Ubuntu 14.04.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*UQmRSmez49-ya-0U25VOAA.png" /></figure><p>2. Download &amp; configure AWS CLI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*VMC9D14_XN9jynNAIOAUlA.png" /></figure><p>3. Create an IAM User.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*2WoRRnOXVhGH4h74wIaE2g.png" /></figure><p>Now click on “Add User”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*EONJcwqrgs8VQssVGGyFug.png" /></figure><p>Next, select a unique User name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*sXVd3UApg64naFAoDxJTjg.png" /></figure><p>Now give Administrator access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*KkU3-ogkWlAoYjdBH4ih4A.png" /></figure><p>Click on Create User.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*hL0rz5DXA2bo0xLSBmeMtw.png" /></figure><p>4. Create an S3 bucket and add file(image file of the OS).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*GAPPBt-syKvjKLJFKuE18A.png" /></figure><p>Select a unique Username.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*lLuqZvJr7PIHFgY9Efoa2A.png" /></figure><p>Review and Create Bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*_9Xreo_mKzoTRRhzSYAuZA.png" /></figure><p>Add the exported .vmdk file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*rO9NU7ux8b21l0IA7Rzi6Q.png" /></figure><p>Click on Upload</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*6QyRHOPmgIOnbYpyCZWeXA.png" /></figure><p>Wait till the image reflect on the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*CsaC9BLcWWnYU5DjLV6fbQ.png" /></figure><p>5. You can upload the file using AWS CLI also.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*ZwwnIgsf7ETzMvoCW4PcVA.png" /></figure><p>6. Once the file is uploaded, create an AMI for the imported image file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*0mtfXlir4jstn3Or3JHQNw.png" /></figure><p>Your image is now available as an AMI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*x2zt4EoaYHNIfCM-7_tZZQ.png" /></figure><p>7 UsingPutty :<br> Configure the .pem file to your Putty and provide the username and the connection string. It will show initializing and few minutes later you will land on to Ubuntu 14.04.</p><p>In this way, we have successfully migrated a virtual OS on AWS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42cddd1f521" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/migrating-on-premises-apps-to-cloud-42cddd1f521">Migrating On-Premises Apps to Cloud</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database Migration Process from Migrating an Oracle database to Amazon RDS PostgreSQL or Amazon…]]></title>
            <link>https://medium.com/petabytz/database-migration-process-from-migrating-an-oracle-database-to-amazon-rds-postgresql-or-amazon-419db56a00d2?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/419db56a00d2</guid>
            <category><![CDATA[aws-rds]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[migration]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Fri, 28 Jun 2019 12:16:01 GMT</pubDate>
            <atom:updated>2019-06-28T12:16:01.132Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Database Migration Process from Migrating an Oracle database to Amazon RDS PostgreSQL or Amazon Aurora (PostgreSQL)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*W7lbJ8NnNu54rm3M3iqF0w.png" /></figure><p>An Oracle to PostgreSQL relocation in the AWS Cloud can be an intricate multistage process with various advances and abilities included, beginning from the appraisal stage to the cutover organize. This blog arrangement covers the earth and design arrangements for your source Oracle database, the AWS Database Migration (AWS DMS) administration, and the objective PostgreSQL database. The arrangement centers around the source and target database foundation, arrangement, instruments and designs utilized for moving the creation, improvement, testing, and organizing database conditions. We begin with the information movement process from Oracle to a database dependent on Amazon RDS for PostgreSQL or Amazon Aurora with PostgreSQL similarity.</p><p>This arrangement contains three blog entries, covering the three phases of the movement:</p><p>Stage 1: Migration procedure and framework contemplations. This post talks about the source server framework arrangement. It likewise covers understanding the movement procedure at an abnormal state, expecting access to the Oracle database and customer equipment and working framework as fitting.</p><p>Stage 2: Source database contemplations for the Oracle and AWS DMS CDC condition. The subsequent blog entry spreads setting up the Oracle source database condition with a DMS administration for both one-time movements and furthermore proceeding with change information catch (CDC) replication.</p><p>Stage 3: Target database contemplations for the PostgreSQL condition. The blog arrangement finishes up with setting up the PostgreSQL target database condition for AWS DMS.</p><p>The blog arrangement tends to the accompanying perspectives:</p><p>Arrangement instruments for each unique phase of the relocation procedure</p><p>Suitable occurrence types and database forms for the source condition, movement apparatuses, and target condition.</p><p>Building and testing nature for Oracle, AWS DMS, and PostgreSQL.</p><p>The arranging choices that you make in regards to which databases to relocate and how help characterize the situations required to build up the best possible arrangements. This arrangement covers just the Oracle to PostgreSQL movement process. It doesn’t talk about the manual parts of database relocation, for example, application conditions. For more data about how to physically move explicit Oracle database articles and highlights to Aurora PostgreSQL, see the Oracle Database 11g/12c to Amazon Aurora with PostgreSQL Compatibility Migration Playbook.</p><p><strong>Migration process</strong></p><p>Database migration is a crucial operation within any enterprise and failure can cause a lot of pain. With failure, the organization’s ability to move forward with new technology is stopped dead in its tracks. By this time, significant expenditures have been made with little or no value gained. The migration process has many moving parts, which require streamlining the process with care. Therefore, when planning to move the data from Oracle to PostgreSQL, you must consider the various available options. These include your networks, CPU, memory, and operating system or systems. These also include your migration tools and process. Examples include whether to use ETL tools like <a href="https://aws.amazon.com/glue/">AWS Glue</a>, exporting the data as files, or use DMS to extract the data with CDC into PostgreSQL.</p><p>The database relocation procedure takes a lot of getting ready for each stage. This arranging guarantees that all inconsistency and setup issues between situations are tended to viably forthcoming. For instance, on the off chance that you are moving 100 GB of information on a neighborhood organize and can take a blackout for a couple of hours, things can be generally straightforward. In any case, assume that your database is 5 TB and you are relocating from on-premises equipment to a cloud domain with a two-hour support window. For this situation, an Oracle to PostgreSQL relocation can demonstrate testing.</p><p>You can find the four main stages in the database migration process listed below:</p><h3>Migration Steps</h3><p>Stage 1: Infrastructure</p><p>In this stage, you do the accompanying:</p><p>Arrange the system that interfaces your source and target databases to an AWS DMS replication occasion (RI). Doing this can be as straightforward as interfacing two AWS assets in the equivalent VPC as the replication occasion. It can incorporate progressively complex arrangements, for example, associating an on-premises database to an Amazon RDS DB occurrence over VPN. The system rates can run from run of the mill web access to utilizing AWS Direct Connect for quicker speeds.</p><p>Do the scope quantification of the objective and RI.</p><p>Stage 2: Oracle condition arrangement for catching source information utilizing AWS Schema Conversion Tool (AWS SCT)</p><p>In this stage, you do this:</p><p>•Set up the Oracle database condition appropriately for better execution and incorporation with AWS apparatuses and administrations.</p><p>•Set up AWS SCT to change over your current Oracle database patterns and information to the PostgreSQL database. You can change over both social OLTP composition and information distribution center diagram. SCT relocates your optional files, arrangements, default esteems, put away strategies, triggers, equivalent words, sees, and other construction objects not explicitly identified with information movement. It produces information definition language (DDL) articulations to make the new PostgreSQL database, in light of the changed over model items. Running the DDL articulations results in the production of the items in the PostgreSQL database.</p><p>•Review the relocation appraisal in SCT to comprehend the contradiction issues and specialized difficulties before you leave on the task.</p><p>•Some source information types should be changed over into the equal information types for the objective database. To discover more data on bolstered information types.</p><p>Stage 3: DMS arrangement to move the information</p><p>In this stage, you set up AWS DMS to relocate information.</p><p>AWS DMS relocates information from your Oracle source into your PostgreSQL target. AWS DMS additionally catches information control language (DML) and upheld DDL changes that occur on your source database and applies these progressions to your objective database. Along these lines, AWS DMS keeps your objective databases in a state of harmony with the source database.</p><p>Stage 4: PostgreSQL database condition arrangement</p><p>In this stage, you set up the PostgreSQL database condition for the most ideal movement execution and joining with AWS apparatuses. This stage finishes the movement procedure. This stage is talked about in the last arrangement post, Target database contemplations for the PostgreSQL environment.Typically, the database relocation process likewise incorporates a rollback procedure and techniques, on the off chance that the creation cutover encounters issues. We don’t talk about rollback system in this blog arrangement.</p><p><strong>Database Migration process</strong></p><p>Database migration from Oracle DB to RDS PostgreSQL or Aurora PostgreSQL alludes to the total relocation of the majority of the table structure, information, related files, triggers, and put away techniques. After these are moved, the new RDS or Aurora PostgreSQL database is kept in a state of harmony by utilizing information replication with the source until cutover.</p><p>You can utilize numerous approaches to relocate information between every one of these heterogeneous databases. These incorporate the committed information relocation instruments given by database sellers. You can likewise consolidate AWS database movement devices with the methods that have been produced for the plan and usage of cross-stage information relocations.</p><p>Specifically, AWS offers two devices that empower a straightforward and simple heterogeneous relocation from databases, for example, Oracle to PostgreSQL: AWS SCT and AWS DMS.</p><p>AWS SCT encourages you convert Oracle word references and auxiliary items to any upheld database focus with insignificant work included. AWS SCT makes a movement evaluation report that perceives articles and code that requires a manual change or revise.</p><p>AWS DMS uses change information catch (CDC) to work with an Oracle source endpoint when the capacity framework is Oracle ASM or non-ASM, to relocate the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*_xk8tLnezCDz2eIs_opiFw.png" /></figure><p>The migration of Oracle to PostgreSQL using DMS and SCT services is a multistage process, and you must take several dependency factors must be taken into consideration. Here, you need to address both technical and nontechnical aspects, such as project planning, resources, training, testing processes, and so on.</p><p>To build a sound migration strategy, include the following technical aspects when using DMS and SCT:</p><ul><li>Server capacity planning for source, replication instance, and target</li><li>Tuning the source operating system (for example, Linux) and network</li><li>Schema and data migration process</li><li>Source Oracle database parameters, including these:</li><li>Archive logging</li><li>Supplemental logging</li><li>Storage</li><li>Target PostgreSQL database parameters.</li></ul><p>Database server scope organization necessitates that we think about information stage engineering, execution counters, outside conditions, DB variants and releases, relocation ways, equipment, virtualization, non-utilitarian prerequisites, authorizing, etc. One of the key focuses in evaluating the limit requirements for the new information stage condition is to comprehend the pattern for every exhibition counter. Counters incorporate, for instance, Oracle example RAM and CPU utilization designs, database IOPS, and log and information document sizes. You likewise ought to have the option to extrapolate time arrangement against the best fitting pattern and after that look at them in an occasional way. This extrapolation applies whether for both target databases or Amazon EC2 examples.</p><p>For execution counters, for example, CPU use, you should comprehend what occurs in the event that you intend to change the basic equipment by relocating from on premises into the AWS Cloud. For instance, there can be extraordinary contrasts between the source and target equipment stage execution. Along these lines, you should probably figure things like CPU execution proportion between the present source server arrangement and the speculative target server arrangement. By doing this, you can extrapolate the counter time arrangement for example or database level execution to another standard.</p><p>In addition, for CPU and memory, you must understand the storage requirements in a heterogeneous migration. The points to evaluate or assess in the source system to optimize on the storage target include the following:</p><ul><li>Audit your source Oracle database. Evaluate every schema and all objects within each schema to determine if any of the objects are no longer used. Deprecate these unused objects in the source Oracle database, because you don’t need to migrate unused objects.</li><li>If load capacity permits, then get the maximum size in kilobytes for each LOB type on the source database. Later in the process, we need this information.</li><li>Move columns with LOBs (BLOB, CLOB, NCLOB), LONG, LONG RAW, and XMLTYPE to Amazon S3, Amazon DynamoDB, or any other external data store.</li></ul><p>External LOB information items are put away as working framework records, outside the database table spaces. This being the situation, just the LOB locator (pointer) is put away in the Oracle database. For the real estimation of the LOBs, LONG, or LONG RAW, the whole information is put away remotely. This methodology diminishes the Oracle database’s stockpiling necessities and improves question execution.</p><h3>Operating system and network</h3><p>When considering a DB stage movement, we find that clients ordinarily check the source’s CPU use, memory size, and IO designs. Be that as it may, clients regularly disregard the significance of system execution, particularly when moving to AWS. In this way, we delve somewhat more profound into system approval subjects in this blog entry, however we additionally prescribe that you connect with system and framework engineers.</p><p>Systems involve overhead that can include a specific measure of postponement to preparing. To enhance execution, guarantee that your system throughput is quick. Furthermore, attempt to lessen the quantity of messages that are sent over the system. Ultimately, know that it very well may be hard to gauge the postpone that the system includes. On the off chance that conceivable, counsel a system or frameworks engineer from the get-go in the approval procedure. System issues that start at the source framework or server farm can cause execution issues and hinder the relocation.</p><p>When you address organize execution, get a system sniffer follow to examine for execution debasements. To do as such, load information into a system analyzer (for instance, Wireshark or a business comparable) where you can look at the individual bundles for intimations.</p><p>Also, use system observing instruments to guarantee that you have the source prepared for relocation:</p><p>A system data transmission screen can recognize issues with transfer speed execution cutoff points being surpassed on the system, the customer, or the server. The screen can decide whether issues are identified with both of the accompanying:</p><p>Throttling — Requests are throttled dependent on the class of the solicitation and number of calls the client has made in that classification.</p><p>Data transfer capacity usage designs that show physical constraints.</p><p>Check for Ethernet impacts, dropped bundles or mistakes, etc.</p><p>Check for steadiness of WAN connections. WAN enhancement tends to idleness, bundle misfortune, and data transmission challenges that reason basic applications to be lethargic or questionable over the WAN.</p><p>Check for Quality of Service (QoS) or parcel organizing that may go on.</p><p>Check for a firewall in the traversal way, on the off chance that it squares explicit ports or conventions.</p><p>The source database servers can have a working framework like Windows, SunOS, IBM AIX, HP UX, Linux, or some other significant merchant. We don’t mean here to introduce each accessible order for each OS. We expect all through the blog arrangement that the DB relocation is from a well known open-source Linux framework.</p><p>Given this, you need a bunch of Linux directions to successfully deal with a framework, and we list a couple of significant ones after. We firmly suggest that you test them before utilizing.</p><p><strong>Network commands</strong></p><p>There are many utilities like netstat, traceroute, and ipconfig and port scanners available for troubleshooting or checking on the connection to look up anomalies. Some important commands include these:</p><ul><li>The ifconfig command shows the details of the network interface or interfaces defined in the system.</li><li>The most common option is -a (ifconfig –a), which shows all the interfaces and looks for packet drops or errors, MTU sizes, and so on.</li><li>The usual name of the primary Ethernet network interface is eth0. To find out the details of a specific interface, for example eth0, you can use: # ifconfig eth0</li><li>/proc/net/dev, netstat, mii-tool all deal with port speeds.</li><li>Use netstat –s or netstat –su and look for either udpInOverflows, packet receive errors, or fragments dropped. If you observe a consistent increase in these metrics, that indicates an issue.</li><li>NIC Version : ethtool –driver eth0 deal with port and packet speed setup.</li></ul><p><strong>System Indicators</strong></p><p>Some useful commands for system performance indicators are the following:</p><ul><li>Check the disk I/O and memory utilization, use sar, vmstat, and iostat.</li><li>For the CPU, review for utilization /proc/cpuinfo, mpstat, and top.</li><li>For memory, review for utilization /proc/meminfo, /proc/slabinfo, and free.</li><li>For the kernel version and release, use cat /proc/version.</li><li>For types of I/O cards, review the versions and drivers by using lspci -vv.</li><li>To list all hardware PCI devices, use lspci –v.</li><li>Kernel messages — Review them for obvious issues or problems by using /var/log/messages and /var/log/dmesg.</li></ul><p>In this blog entry, we address system issues inside and out by structure. Regularly we find that clients address the CPU, memory, and I/O themes and disregard organize execution. System execution now and again can be a key factor in manifesting the deciding moment the DB relocation procedure, and by and large CPU, memory, and I/O for any creation framework are well-checked and surely knew.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=419db56a00d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/database-migration-process-from-migrating-an-oracle-database-to-amazon-rds-postgresql-or-amazon-419db56a00d2">Database Migration Process from Migrating an Oracle database to Amazon RDS PostgreSQL or Amazon…</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DEVOPS PRACTISE FOR SOFTWARE DEVELOPMENT]]></title>
            <link>https://medium.com/petabytz/devops-practise-for-software-development-b099b9b8f185?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b099b9b8f185</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Thu, 27 Jun 2019 11:10:03 GMT</pubDate>
            <atom:updated>2019-06-27T11:10:03.109Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*U0BScd2eUVg8C11CebWwHw.png" /></figure><p>We as of late talked about how moving to microservices is one piece of a generally speaking nimble philosophy, grasping DevOps pipelines and mechanization over your business. Making a stride back, imagine a scenario where you haven’t began executing DevOps rehearses yet, however you’d like to. Microservices are only one component that go connected at the hip with a DevOps model. The advantages of making a bigger social and mental move for your business can have the effect between flopping quick or remaining on top of things.</p><p><strong>The Key Elements of a DevOps Model</strong></p><p>While customarily Development and Operations groups were isolated substances, DevOps energizes the Development group architects to work over the entire application. These groups would then be able to include robotization into regions that generally have been wasteful, tedious or manual. Architects can likewise send code or foundation at any phase of the application procedure, from advancement and testing, through to new territories, for example, arrangement, security or activities. A DevOps model as a rule incorporates more regular updates than customary advancement models, however with progressively gradual changes. This implies groups can fix issues quicker, and any organization without anyone else’s input will convey far less hazard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/199/1*qmzsgbalC4HhUk0e1bAumg.png" /></figure><p><strong>The absolute accepted procedures include:</strong></p><p>Microservices: This assists with successive littler updates, as applications are separated into administrations that work for a solitary capacity. One component can be changed without influencing the entirety. This procedure will require a coordinated business mentality and a DevOps culture with the end goal for it to run easily.</p><p>Continuous Integration (CI): Providing an approach to restrain human cooperation when tending to issues and quality issues with code. Change sets are consequently sent to assemble/test and afterward criticism is sent to designer for close down at the basic phases of the procedure.</p><p>Continuous Delivery (CD): Taking CI above and beyond, CD permits the proliferation of the assembled ancient rarity to be tried ahead of time of discharge. This is generally done in a test or creation condition.</p><p>Framework as Code: Engineers who grasp the DevOps procedure exploit the API-driven model of the cloud. They can utilize code-based devices to convey, update or copy foundation, expelling the requirement for physically including or designing assets, putting the meaning of framework in form control as code.</p><p><strong>What are the Benefits of the DevOps Mindset and Methodology?</strong></p><p>The main enormous change that you should see when you begin to work with DevOps pipelines and technique is speed. Advancement is a lot simpler to accomplish when you can send oftentimes and with less hazard, and when groups can assume responsibility for their own administrations without agonizing over it influencing different zones of the application. As designers and item proprietors cooperate, coordinated effort and correspondence are underscored, colleagues adapt new abilities, and storehouses are separated inside the organization. The quick conveyance of updates and new highlights causes you to improve your administration or item quicker, and please clients with convenient solutions to issues or positive activity to roll out the improvements they need to see.</p><p>CI/CD is a colossal piece of this speed. Without this innovation, organizations couldn’t create and convey at such a quick pace without opening themselves up to bugs, vulnerable sides and unwavering quality issues. Despite what might be expected, with these devices, your architects will dependably have a tried and cutting-edge variant of the application to convey. Regardless of this speed, security can move left and be a piece of the procedure in a ceaseless manner, mechanizing arrangement control for zones like consistence with DevOps. This guarantees you stay both agreeable and in charge.</p><p>For some, organizations, scale is the main motivation to make the transition to the DevOps model. Computerization evacuates the tedious and extensive manual errands that point of confinement an organization’s capacity to develop. The consistency of computerization and CI likewise implies that an unpredictable framework with a lot of information can be overseen without the danger of human blunder or deferral. Numerous specialists depend on framework as code crosswise over improvement, testing and creation situations with the goal that they can deal with them all in a replicable and streamlined way.</p><p><strong>What’s Standing in Your Way?</strong></p><p>Robotizing however much as could be expected with the help of DevOps is a reasonable win for any future-centered organization, giving adaptability, speed and dependability with regards to testing and conveying programming refreshes. What’s more, in all actuality, in case you’re now on your cloud venture, you’re most likely searching for precisely the advantages we’ve recorded previously. Things being what they are, what’s the robbery?</p><p>As far as we can tell, in case you’re not seeing the advantages of DevOps pipelines, your system for programming discharge and your guide for business technique could be the issue, deserting you against the challenge.</p><p>Here at AllCloud, we have a solid reputation of helping organizations to take advantage of their cloud arrangement, changing their way of life and ethos to DevOps. This is one reason we were as of late named an AWS DevOps Competency Partner. Utilizing industry-best innovation like Jenkins for CI/CD, Terraform for IaC and AWS local instruments, for example, CloudFormation, Elastic Beanstalk and CodePipeline, we become a genuine accomplice in your cloud venture, supporting a move in mentality that goes a lot more remote than the change to your groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*DXb0FwlYIgLzl78_LmBy0g.png" /></figure><p>Keen on expanding your business nimbleness through DevOps rehearses? Reach one of our cloud specialists today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b099b9b8f185" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/devops-practise-for-software-development-b099b9b8f185">DEVOPS PRACTISE FOR SOFTWARE DEVELOPMENT</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SERVERLESS ARCHIECTURE ON AWS CLOUD]]></title>
            <link>https://medium.com/petabytz/serverless-archiecture-on-aws-cloud-dc349f2b0e18?source=rss-54c60ad8ef5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc349f2b0e18</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Tejas Joshi]]></dc:creator>
            <pubDate>Wed, 26 Jun 2019 08:00:08 GMT</pubDate>
            <atom:updated>2019-06-26T08:00:08.102Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*hZ8Mu2cCPZwCdcIhNWbcdQ.png" /></figure><p><strong>WHAT DO YOU MEAN BY SERVERLESS?</strong></p><p><strong>Serverless</strong> computing is a cloud-computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity.</p><p><strong>WHAT IS AWS LAMBDA ?</strong></p><p>AWS Lambda is a compute provider that helps you to run code without provisioning or coping with servers. AWS Lambda executes your code simplest when wished and scales robotically, from some requests in keeping with day to heaps per second. You pay handiest for the compute time you consume — there’s no charge while your code isn’t always running. With AWS Lambda, you may run code for surely any kind of utility or backend service — all with zero management. AWS Lambda runs your code on a excessive-availability compute infrastructure and plays all of the administration of the compute assets, along with server and running machine preservation, capacity provisioning and automated scaling, code monitoring and logging.</p><p>You may use AWS Lambda to run your code in response to events, which include modifications to statistics in an Amazon S3 bucket or an Amazon DynamoDB table; to run your code in reaction to HTTP requests using Amazon API Gateway; or invoke your code using API calls made the usage of AWS SDKs. With those talents, you can use Lambda to effortlessly construct facts processing triggers for AWS services like Amazon S3 and Amazon DynamoDB, system streaming data stored in Kinesis, or create your personal returned end that operates at AWS scale, performance, and safety.</p><p><strong>How To Create a Lambda function with Python:</strong></p><p>Considering Python is a scripting language, you can create the script at once within the AWS console. Log in in your AWS Account, and navigate to the Lambda console. click on Create feature. We’ll be creating a Lambda from scratch, so pick out the writer from scratch choice.Input the proper name in your Lambda function, select a Python runtime and outline a function on your Lambda to use. since we received’t be the use of any outside resources, we don’t need unique permissions, however this is in which you would add a position with those permissions.</p><p>Once everything is set, click on the <strong>Create function</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*KUWISZA3q_OI1lzgsRA5EA.png" /></figure><p>Let’s take a TDD approach to this. We’ll start by setting up a new test event. Click on the <strong>Select a test event</strong> drop-down and choose <strong>Configure test events</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*YyX6gpZ-WcCTJYQz9486og.png" /></figure><p>Amazon provides a significant collection of test templates. We’ll modify the Hello World template with data of our own. We’ll add a new event name and then click on <strong>Create</strong> to create the new test event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*QxC3tzI6e9mjpBi8nH6C9Q.png" /></figure><p>Once the take a look at is created, we will cause it with the test button. The end result is a a hit execution, but we’re searching out a response aside from “howdy from Lambda.” allow’s upload some code to the Lambda to accomplish what we need. you could use the code below or use your python-foo to create some thing greater elegant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*1dN7HKpW2lrLdHIrBsoeiA.png" /></figure><p>Once you’ve entered the code, click on <strong>Save</strong>, and then click on the <strong>Test</strong> button to try it out. You should see a successful result like the one shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*cTRBHmcCHelyTGqYsIRlSg.png" /></figure><p><strong>Serverless App:</strong></p><p>A Serverless solution consists of a web server, Lambda functions (FaaS), security token service (STS), user authentication and database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*DvtKwmiZ_RfioetNZ8Quaw.png" /></figure><p>Client application — The UI of your application is rendered purchaser facet in modern-day Frontend Javascript App which allows us to use a simple, static web server.</p><p>net Server — Amazon S3 presents a strong and easy web server. all of the static HTML, CSS and JS documents for our software can be served from S3.</p><p>Lambda capabilities (FaaS) — they are the key enablers in Serverless architecture. some popular examples of FaaS are AWS Lambda, Google Cloud features and Microsoft Azure capabilities. AWS Lambda is used in this framework. The software services for logging in and accessing data could be built as Lambda functions. those features will study and write from your database and provide JSON responses.</p><p>protection Token carrier (STS) — generates transient AWS credentials (API key and secret key) for users of the software. those temporary credentials are used by the customer utility to invoke the AWS API (and for that reason invoke Lambda).</p><p>person Authentication — AWS Cognito is an identity provider that’s integrated with AWS Lambda. With Amazon Cognito, you can without problems upload consumer sign-up and sign-in on your cellular and web apps. It also has the options to authenticate users thru social identification carriers including fb, Twitter or Amazon, with SAML identification solutions, or the usage of your personal identification system.</p><p>Database — AWS DynamoDB offers a fully managed NoSQL database. DynamoDB isn’t critical for a serverless utility however is used as an instance here.</p><p><strong>Advantages of Serverless architecture</strong></p><p><strong>From Business angle</strong></p><p>The value incurred by using a serverless software is based at the quantity of function executions, measured in milliseconds in preference to hours.</p><p>procedure agility: Smaller deployable units bring about quicker delivery of capabilities to the marketplace, increasing the capacity to conform to change.</p><p>price of hiring backend infrastructure engineers goes down.</p><p>reduced operational charges</p><p><strong>From developer angle</strong></p><p>decreased legal responsibility, no backend infrastructure to be liable for.</p><p>zero machine administration.</p><p>less difficult operational management.</p><p>Fosters adoption of Nanoservices, Microservices, SOA principles.</p><p>faster installation.</p><p>Scalable, no want to fear approximately the quantity of concurrent requests.</p><p>monitoring out of the box.</p><p>Fosters innovation.</p><p><strong>From User perspective</strong></p><p>If companies are the usage of that aggressive area to ship functions faster, then clients are receiving new functions quicker than before.</p><p>it’s far viable that users can greater easily provide their own storage backend(i.e Dropbox, Google power).</p><p>It’s more likely that those varieties of apps can also provide purchaser-aspect caching, which presents a better offline experience.</p><p><strong>Conclusion:</strong></p><p>With the proper architectural considerations and due diligence, serverless might also present industry incumbents with an exit strategy to move from legacy infrastructure to undertake public cloud fashions — this become not determined earlier. however, enterprise incumbents will need pass far from the fame-quo and embody the alternate. A dependent technique with a described roadmap is required to transport away from the cutting-edge software program architecture paradigms that is primarily based on the legacy monolithic version with the serverless paradigm where the attention isn’t on infrastructure however on handing over the specified business functionalities which in flip changes the economic version for IT service delivery. There are concerns although with regard to seller lock-in and adherence to enterprise unique compliance requirements in a serverless model. Like all rising generation, Serverless will undergo its cycle earlier than mainstream adoption happens. Serverless has the capability to trade the monetary version of IT consumption of businesses leading to great cost discounts related generally with IT help and maintenance(which can be a tremendous 50–60%of the overall IT price range of firms),reduce time-to-market and foster innovation to aid converting commercial enterprise necessities and offer an edge over competition.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc349f2b0e18" width="1" height="1" alt=""><hr><p><a href="https://medium.com/petabytz/serverless-archiecture-on-aws-cloud-dc349f2b0e18">SERVERLESS ARCHIECTURE ON AWS CLOUD</a> was originally published in <a href="https://medium.com/petabytz">Petabytz</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>