<?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 Mayank Madhukar on Medium]]></title>
        <description><![CDATA[Stories by Mayank Madhukar on Medium]]></description>
        <link>https://medium.com/@mayankmadhukar7191?source=rss-ebcb2f70ad2e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*p4zOHyyGAbvIsC9H</url>
            <title>Stories by Mayank Madhukar on Medium</title>
            <link>https://medium.com/@mayankmadhukar7191?source=rss-ebcb2f70ad2e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 04:48:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mayankmadhukar7191/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[Processing PGP Encrypted Data in AWS Lambda using Python.]]></title>
            <link>https://medium.com/@mayankmadhukar7191/processing-pgp-encrypted-data-in-aws-lambda-using-python-3b3eeb34b393?source=rss-ebcb2f70ad2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b3eeb34b393</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[pgp]]></category>
            <category><![CDATA[gpg]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[gnupg]]></category>
            <dc:creator><![CDATA[Mayank Madhukar]]></dc:creator>
            <pubDate>Sat, 25 Jul 2020 09:13:20 GMT</pubDate>
            <atom:updated>2020-07-25T09:51:00.194Z</atom:updated>
            <content:encoded><![CDATA[<p>Business verticals dealing with highly critical and sensitive data, for compliance reasons, works with end to end encryption. The data is always encrypted before sharing with the business partners and the encrypted data received is processed in an end to end secured environment, ensuring no vulnerability or leakage throughout the pipeline.</p><p>PGP and GPG (pgp open source standard) is probably one of the most used Encryption solutions across industry. One prerequisite here is a basic knowledge of how PGP encryption works. To explain in brief, before requesting a file we generate key pairs (public and private). We share the public key with our business partners, who use the public key to encrypt the file before sharing. Once the file is received, we use the corresponding private key to decrypt it. Each key is associated with a user name and an email id.</p><p>There’s is another level of encryption on top of that where user provides a key (passphrase) to further encrypt the private key.</p><p>Now, let’s take a case where we have to process an encrypted file stored in AWS S3 in a serverless environment like Lambda. Below are the steps you can follow to process it :</p><ul><li><strong>Extract the private key from your machine.</strong><br>In your machine (windows/mac/Linux), identify the private key:<br><strong>gpg --list-secret-keys user@some.com<br></strong>Export the key:<br><strong>gpg --export-secret-keys YOUR_ID_HERE &gt; private.key<br></strong>Move the private.key file to your AWS S3 Bucket<br><strong>aws s3 mv private.key s3://your_s3_bucket/</strong></li><li><strong>python-gnupg in Lambda:</strong> <br>python-gnupg is the python library for working with gnupg, which allows you to encrypt or decrypt your data. AWS Lambda has no internal support for this library, so you’ll have to either create a deployment package (<a href="https://docs.aws.amazon.com/lambda/latest/dg/python-package.html">https://docs.aws.amazon.com/lambda/latest/dg/python-package.html</a>) or a layer (<a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html</a>) in lambda to bring it.</li><li><strong>Download files in your Lambda Function:<br></strong>Go to your Lambda function. /tmp is the only folder in AWS Lambda that is writable. Download your encrypted file and private.key file to /tmp folder.</li></ul><pre><strong>s3Client=boto3.client(‘s3’)<br>s3Client.download_file(bucket,Key,’/tmp/myencryptedfile’)<br>s3Client.download_file(bucket,key,’/tmp/private.key’)</strong></pre><ul><li><strong>Import the private Key: <br></strong>Set gnupg home directory and import the private key.</li></ul><pre><strong>gpg = gnupg.GPG(gnupghome=’/tmp’) <br>key_data = open(‘private.key’).read()<br>priv_key = gpg.import_keys(key_data)</strong></pre><ul><li><strong>Decrypt the file:<br></strong>Passphrase is the user created secret key that encrypts the private key. We need to provide gpg with that secret key in order to decrypt the file.</li></ul><pre><strong>with open(‘/tmp/’+myencryptedfile,‘rb’) as a_file:<br>  gpg.decrypt_file(a_file,passphrase=secret_key,output=someFileName)</strong></pre><ul><li><strong>Process the decrypted file:<br></strong>Once the file is decrypted, you can process it as per your use case; load it to RDS, Redshift, DynamoDB or write to an SNS topic.</li></ul><p>This can be achieved in other AWS Serverless service like GLUE. You can use Glue Pyshell. The only advantage it gives over Lambda is that it has no runtime limit of 15 mins.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b3eeb34b393" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL — An underrated skill set?]]></title>
            <link>https://medium.com/@mayankmadhukar7191/sql-an-underrated-skill-set-140f8b175fe6?source=rss-ebcb2f70ad2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/140f8b175fe6</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Mayank Madhukar]]></dc:creator>
            <pubDate>Mon, 24 Dec 2018 11:24:42 GMT</pubDate>
            <atom:updated>2018-12-24T11:24:42.056Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>SQL — An underrated skill set?</strong></h3><p>Look at the contents of courses available for Data science and Analytics, SQL sits somewhere in the middle, covered within a session or two and is often ignored by the learners because it doesn’t sound or look very fancy in the resume. It’s the basic requirement for a role in the field of data which might hinder your chances of getting into a desired job.</p><p><strong>In the world of Machine Learning and Artificial Intelligence, don’t undermine the power of SQL as a skill in shaping up your career.</strong></p><p>No Doubt, AI and ML is the future and seeking a career in these is a great choice. However, if you clearly understand these two buzzwords, it’s the Data which is captured, modeled, cleaned, fed to the algorithm and used further to drive decisions. In this era of Big Data Storage and Computation, Real Time Analytics and Prediction there’s a lot of other career choices in offering. And SQL being one such common thread, binds them all.</p><p>SQL (Standard Query Language):</p><p>An advanced SQL querying skill can give a huge boost to your initial career stage. Below are some of the roles which focus more on your query building and optimizing skills:</p><ol><li>Data Engineer- SQL is one of the primary skills required for this position, where day to day work may require you to build and monitor data pipelines or ETL jobs, which are nothing but queries that run on Scheduled basis. Hadoop, Spark supports SQL like querying in the form of HiveQL, Spark SQL respectively.</li><li>Data Analyst- SQL is the most important skill for this role, which work more towards business in bringing data into analytical data model, getting the reports ready and addressing ad-hoc business queries, all of which requires fast and efficient data querying skill.</li><li>Business Analyst- Current age Business Analysts work along with Data Analysts and the business to understand the business problems and how that could be solved using data, reports and insights. Business analysts require to keep an eye on the metrics and share insights on day to day metric performance. Everyday work requires them to query data, build reports. Hence, SQL again is one of the key skill sets required for this role as well.</li><li>Data Scientist- Data Scientists are not expected to be a pro in SQL, however, an intermediate level of SQL querying skill is expected from them to avoid dependencies on analysts or engineers.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=140f8b175fe6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>