<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NareshKumaran Sathiaseelan</title>
    <description>The latest articles on DEV Community by NareshKumaran Sathiaseelan (@sknaresh2000).</description>
    <link>https://dev.to/sknaresh2000</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F451017%2Fdbd61264-2889-4140-8928-93fd839a7dcb.png</url>
      <title>DEV Community: NareshKumaran Sathiaseelan</title>
      <link>https://dev.to/sknaresh2000</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sknaresh2000"/>
    <language>en</language>
    <item>
      <title>Event-Driven Python on AWS</title>
      <dc:creator>NareshKumaran Sathiaseelan</dc:creator>
      <pubDate>Mon, 12 Oct 2020 20:41:10 +0000</pubDate>
      <link>https://dev.to/sknaresh2000/event-driven-python-on-aws-3ajc</link>
      <guid>https://dev.to/sknaresh2000/event-driven-python-on-aws-3ajc</guid>
      <description>&lt;p&gt;Do you like challenges? Of course, everyone does. Ever since I completed the Cloud Resume Challenge, I was looking forward to the next challenge. Forrest Brazel announced on twitter last month that A Cloud Guru has started a successor to the Cloud Resume Challenge with monthly projects called the #cloudguruchallenge. September month's challenge is "Event-Driven Python on AWS" that runs until 15th of October 2020.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://acloudguru.com/blog/engineering/cloudguruchallenge-python-aws-etl"&gt;Check this link for more information about the challenge&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>python</category>
      <category>cloudguruchallenge</category>
    </item>
    <item>
      <title>My experience with Cloud Resume Challenge !!</title>
      <dc:creator>NareshKumaran Sathiaseelan</dc:creator>
      <pubDate>Mon, 17 Aug 2020 21:05:01 +0000</pubDate>
      <link>https://dev.to/sknaresh2000/my-experience-with-cloud-resume-challenge-cc</link>
      <guid>https://dev.to/sknaresh2000/my-experience-with-cloud-resume-challenge-cc</guid>
      <description>&lt;p&gt;Hello everyone. This is my first post and I would like to share my experience with cloud resume challenge, not just because it is one of the conditions, but it has been quite a lot of learning for the last few weeks and I am really excited about it.&lt;/p&gt;

&lt;p&gt;After attaining a couple of AWS certs during the COVID-19 pandemic, I was thinking to advance further into the professional certs. Meanwhile, the cloud resume challenge popped up in my LinkedIn feed. It was almost at the end of the challenge but I still wanted to give a try as the challenge was exhilarating.&lt;/p&gt;

&lt;p&gt;I always liked to visualize the design, so I created a simple architecture diagram on how the end product will be.&lt;/p&gt;

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

&lt;p&gt;Below is the challenge, conditions, steps, and my learning along the way.&lt;/p&gt;

&lt;h3&gt;
  
  
  CHALLENGE:
&lt;/h3&gt;

&lt;p&gt;Build a website to host your resume along with visitor(s) count. &lt;a href="https://cloudresumechallenge.dev/instructions/"&gt;Visit the official Cloud Resume Challenge homepage for more information.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Certification
&lt;/h3&gt;

&lt;p&gt;I completed my SAA in 2018 and recently completed my SysOps and Security Specialty. I am good to start with the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Front-End
&lt;/h3&gt;

&lt;p&gt;I saw many web templates around, but I wanted to make a fresh start. I took some time and started writing in HTML and styled using CSS. I also used javascript to call the API and for a little bit of responsive design. I have to work more on the responsive design but it seemed fine for now to get started. &lt;a href="https://www.w3schools.com"&gt;w3schools is the best.&lt;/a&gt; I designed the entire site by referring it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Website Hosting
&lt;/h3&gt;

&lt;p&gt;I used S3 to host the website and CloudFront for secure access (https) and static asset caching. I had to use a custom domain name for the CloudFront distribution and Amazon Route 53 to use my own domain. I was able to generate the SSL certificate for my domain using AWS Certificate Manager. There are various providers and ways to host this but I decided to stick with AWS services. &lt;/p&gt;

&lt;h3&gt;
  
  
  4. Back-End
&lt;/h3&gt;

&lt;p&gt;For the backend, I had to use a few AWS services to retrieve the visitor count.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;API Gateway: Created an API to handle the task sent from the webpage to access the backend service(AWS Lambda in this case). I updated the API URL in the javascript code. I spent a lot of time here and wanted to explore more, but that is for another day of learning. &lt;a href="https://www.alexdebrie.com/posts/api-gateway-elements/"&gt;I used this post which has more information about API gateway.&lt;/a&gt; It's a long one, but really worth it. I also received the CORS(Cross-Origin Resource Sharing) error as I didn't configure it. Once enabled, it worked as expected.&lt;a href="https://www.moesif.com/blog/technical/cors/Authoritative-Guide-to-CORS-Cross-Origin-Resource-Sharing-for-REST-APIs/"&gt;Here is a wonderful article on CORS that I used while setting up API Gateway.&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Lambda: Lambda is a FaaS offering from AWS. It allows you to run a function without provisioning any servers. I decided to use Python to query the database(DynamoDB) and retrieve the count of visitors. Instead of just retrieving the count, I wanted to store the unique count as well, so I decided to get the IP information and check against the database before storing the details. I don't have much experience in Python and I am no developer but I do use PowerShell for all of my automation. &lt;a href="//learnpython.org"&gt;Check this site to get started on Python.&lt;/a&gt; I had to perform &lt;a href="https://realpython.com/python-testing/"&gt;Python tests&lt;/a&gt; as well to make sure my code works. I also used moto to mock AWS calls. This would involve no interaction with AWS and the function can be tested at the same time. &lt;a href="https://blog.codecentric.de/en/2020/01/testing-aws-python-code-with-moto/"&gt;This article helped me to test my Python code using moto.&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DynamoDB: Amazon DynamoDB is another serverless product offering from AWS. It's a NoSQL database and I used this to store and update the visitor count and metadata information such as first and last visited date etc., &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. IaC(Infrastructure as Code)
&lt;/h3&gt;

&lt;p&gt;One of the conditions was to configure the backend services using AWS Serverless Application Model(SAM) template. I completed a few AWS certs but haven't looked much into SAM. I have used CloudFormation and was thinking to use the same, but out of curiosity, I decided to look into SAM. It really saved a lot of time and configuration in the template. In a couple of days, my template was ready to provision S3, API Gateway, Lambda, and DynamoDB. &lt;a href="https://blog.heyitschris.com/posts/get-your-foot-in-the-door-with-sam/"&gt;Check out Chris's blog for more details.&lt;/a&gt;&lt;br&gt;
As SAM supports CloudFormation resources, I decided to add CloudFront distribution as well in the SAM template so the entire infrastructure and configuration can be provisioned with a single template. &lt;/p&gt;

&lt;h3&gt;
  
  
  6. Front-End CI/CD
&lt;/h3&gt;

&lt;p&gt;I used GitHub Actions and created a workflow to checkout packages, install AWS CLI, copy files to S3, and invalidate CloudFront cache when I push any changes to the master repository.&lt;/p&gt;

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

&lt;h3&gt;
  
  
  7. Back-End CI/CD
&lt;/h3&gt;

&lt;p&gt;I used another repository and setup GitHub Actions for the back-end infrastructure. The workflow installs required tools, run Python tests, and upon successful testing, SAM provisions/updates the infrastructure in AWS. &lt;/p&gt;

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

&lt;p&gt;And finally, after working on this for a couple of weeks, I was happy to see the serverless website that I have built. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://meetnaresh.com"&gt;https://meetnaresh.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>challenge</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
