<?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 Nadun Indunil on Medium]]></title>
        <description><![CDATA[Stories by Nadun Indunil on Medium]]></description>
        <link>https://medium.com/@nadun1indunil?source=rss-a66a40c6b858------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PmJaaVc0k1uILHNweEtmrQ@2x.jpeg</url>
            <title>Stories by Nadun Indunil on Medium</title>
            <link>https://medium.com/@nadun1indunil?source=rss-a66a40c6b858------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 19:52:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nadun1indunil/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[A Fully Serverless approach for Next.js in AWS]]></title>
            <link>https://medium.com/@nadun1indunil/a-fully-serverless-approach-for-next-js-in-aws-6099216b1e20?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/6099216b1e20</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Thu, 01 Jan 2026 02:05:52 GMT</pubDate>
            <atom:updated>2026-01-01T02:05:52.547Z</atom:updated>
            <content:encoded><![CDATA[<p>Next.js is one one the popular JS framework with so many benifits. However, self-hosting not among one of those perks. This literature is going to discuss the deployed architecture of Next.js and how to maintain it on AWS.</p><blockquote><strong>Disclaimer:</strong> This guide focuses on the architectural mechanics and operational best practices of deploying Next.js via SST. It is not intended as a step-by-step “Hello World” setup tutorial. We assume you are familiar with the basics and are looking for deep insights into how SST translates Next.js for production AWS environments.</blockquote><h3>Why</h3><p>The main motive behind the SST for Next.js was full control over the application deployment. Undoubtedly Vercel is faster and easier than this approach. However, having full control over my application and being able to see all the costs related to application was one of the main reasons for the choice. There are other additional benefits like freedom to use additional AWS resources and AWS credits.</p><h3>How SST deploys Next.js application in AWS</h3><p>Before diving into the deployment flow, it is important to understand the technologies powering SST. Under the hood, SST v3 (codenamed “Ion”) has moved away from <strong>AWS CDK</strong> and CloudFormation, instead leveraging a high-performance infrastructure engine built on <strong>Pulumi</strong> and <strong>Terraform</strong>. This shift allows for sub-second updates and greater flexibility. However, the specific magic of running Next.js on AWS comes from <strong>OpenNext</strong>. SST relies on OpenNext as a bridge, an opensource adapter that effectively reverse-engineers the Next.js build output, translating Vercel-specific features into standard AWS primitives like Lambda functions and S3 buckets.</p><p>When the deployment process begins, SST executes the standard next build command. It then automatically transforms the build output into infrastructure-ready assets-splitting static files for S3 and server-side logic into optimized Lambda functions.</p><p>Transformed output as follows,</p><pre>my-next-app/<br>  .open-next/<br>    cache/                         -&gt; ISR cache files to upload - This cannot be directly served<br>    assets/                        -&gt; Static files to upload<br>    server-functions/<br>      default/                     -&gt; Handler code for the default server<br>      other-fn/                    -&gt; Handler code for another backend<br>    revalidation-function/         -&gt; Handler code for revalidation backend<br>    image-optimization-function/   -&gt; Handler code for image optimization backend<br>    warmer-function/               -&gt; Cron job code to keep server function warm - Not mandatory<br>    dynamodb-provider/               -&gt; Code for a custom resource to populate the Tag Cache - Only necessary for app dir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*hwEcYFWDim5nQx0hjmkmXA.png" /><figcaption>fig 1: Opennext default deployment architecture</figcaption></figure><h3>Observability</h3><p><strong>1. CloudWatch Logs Integration:</strong> SST automatically provisions Log Groups for the Server, Image Optimization, and Warmer functions in the region where your app is deployed. This allows you to treat your Next.js logs as standard AWS infrastructure data, enabling powerful filtering and analysis through the <strong>CloudWatch Console</strong> and <strong>Logs Insights</strong>.</p><p><strong>2. AWS X-Ray Tracing:</strong> For deeper visibility into request latency and Lambda performance, AWS X-Ray can be enabled on your function endpoints. Be aware that the implementation differs by version: <strong>SST v2</strong> requires CDK-based construct overrides, while the newer <strong>SST v3</strong> exposes this configuration directly via the component’s transform API.</p><h3>Security</h3><p>While SST handles many best practices out of the box, a production-grade application requires a layered security approach.</p><p><strong>1. Standard Security Baselines</strong> Most developers will already be familiar with these essentials, which serve as the foundation of your architecture:</p><ul><li><strong>Encryption in Transit:</strong> Ensure all application endpoints are TLS-enabled. This is typically handled by <strong>AWS ACM</strong> (Certificate Manager) integrated directly with your CloudFront distribution.</li><li><strong>Data Privacy:</strong> If you are hosting databases on AWS (e.g., RDS or DynamoDB), ensure they are encrypted at rest and deployed within a private subnet or VPC, inaccessible from the public internet.</li><li><strong>Storage Security:</strong> Your S3 buckets should strictly block public access. <em>Note: SST configures your buckets as private by default, reducing the risk of accidental data leaks.</em></li></ul><p><strong>2. Critical Improvement: Securing Lambda Function URLs</strong> One specific area that often catches developers off guard is the configuration of the Next.js server component. By default, SST deploys the <strong>Server</strong> and <strong>Image Optimization</strong> functions with <strong>publicly accessible Lambda Function URLs</strong> (AuthType: NONE).</p><p><strong>Why is this a risk?</strong> While keeping these URLs public avoids the slight latency overhead of signature verification, it introduces significant downsides:</p><ul><li><strong>Bypassing the Edge:</strong> Attackers can bypass your CloudFront WAF and caching layer entirely, hitting your backend directly.</li><li><strong>The “Wallet Attack”:</strong> A direct DDoS attack on the Lambda URL can trigger massive auto-scaling, leading to unexpected costs.</li><li><strong>Information Disclosure:</strong> Direct access might expose raw error stack traces or implementation details that CloudFront would normally sanitize.</li></ul><p><strong>The Fix is to use IAM Authentication </strong>to mitigate this, you should enable authentication on your function URLs. This ensures that only your CloudFront distribution (via Origin Access Control) can invoke the Lambda functions, effectively making your backend invisible to the public internet. More details are <a href="https://sst.dev/docs/component/aws/function#url">here</a>.</p><p>I hope this deep dive helps anyone currently navigating the complexities of hosting Next.js on AWS. The combination of SST and OpenNext is powerful, but getting the security and observability right takes some fine-tuning. <em>I will continue to explore this stack and will update this article as I uncover more details or better ways to optimize the architecture.</em> Thanks for reading!</p><h3>References</h3><ol><li><a href="https://sst.dev/docs/component/aws/nextjs/">https://sst.dev/docs/component/aws/nextjs/</a></li><li><a href="https://v2.sst.dev/start/nextjs">https://v2.sst.dev/start/nextjs</a></li><li><a href="https://opennext.js.org/aws/inner_workings">https://opennext.js.org/aws/inner_workings</a></li></ol><h3>Change Log</h3><ol><li>First version — 01/01/2026</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6099216b1e20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hosting a Fully Serverless Gatsby Site on AWS: A Step-by-Step Guide]]></title>
            <link>https://medium.com/@nadun1indunil/hosting-a-fully-serverless-gatsby-site-on-aws-a-step-by-step-guide-2c0b87ab7923?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c0b87ab7923</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[static-site]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Sat, 25 Jan 2025 14:51:20 GMT</pubDate>
            <atom:updated>2025-01-25T14:51:20.936Z</atom:updated>
            <content:encoded><![CDATA[<p>This article provides a step-by-step guide to hosting a Gatsby site on AWS using a serverless approach, covering the essential tasks to get you up and running with minimal effort.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*lY4B693tfW1VEqo0TtaEqQ.jpeg" /><figcaption>Architecture diagram</figcaption></figure><p>Once all the component deployed, the architecture will be as simple as the above.</p><h4>Prerequisites</h4><ol><li>This article assumes the reader has basic understanding of the AWS console and resource creation.</li><li>A Gatsby project set up.</li><li>The AWS CLI installed.</li></ol><h4>Setting up the infrastructure</h4><ol><li><strong>S3 bucket</strong></li></ol><p>First we need to create a S3 bucket. Create a S3 bucket and turn off all the <strong>block public access</strong> check boxes.</p><p>This because the default method, suggested by the AWS Console, uses the bucket name in the Origin Domain Name field, enabling IAM access. However, this setup prevents server-side redirects (301/302) and limits directory indexing (like serving index.html for directories) to the root directory. While Gatsby’s client-side JavaScript and plugins can mask these issues, they can still negatively impact search engines.</p><p>To ensure all site features work correctly, use the S3 bucket’s Static Website Hosting Endpoint as the CloudFront origin. However, this requires configuring the bucket for public-read access since IAM authentication isn’t supported in this setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zHjfu2hFUu8t9DJYYjvn9A.png" /><figcaption>Turn off block all public access</figcaption></figure><p>Next enable static site web hosting in the s3 bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3FTgyxB5ziLjUf7Efcam8w.png" /><figcaption>Enable static web-hosting</figcaption></figure><p>2. <strong>Route53 and ACM for DNS and certificate setup</strong></p><p>This is relatively an easy thing to do. First create a hosted zone from route53 in the AWS console. Create a SSL certificate in ACM (AWS Certificate Manager) for the same domain that submitted from the hosted-zone. In order to prove the ownership of the domain request the validation by using the DNS validation method. Finally create a record in the DNS hosted zone. You can follow steps in the this <a href="https://www.youtube.com/watch?v=YEIuuVKIy8U">video</a> to see detailed step by step for this.</p><p>3. <strong>Cloudfront setup</strong></p><p>Start creating a cloudfront in the AWS console.</p><p>When the origin selection screen prompted, select the static site endpoint we enabled for the S3 bucket we created.</p><p>It should be similar to screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbmExH794GGxgD5jpzovsg.png" /><figcaption>Origin setup</figcaption></figure><p>As per the domain name put your sites domain name in the settings section’s <strong>Alternate domain name (CNAME) </strong>section<strong>. </strong>Then choose the new SSL certificate created under the <strong>custom SSL certificate</strong> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zYMNV9pZbpEHQEXPD7TRrw.png" /><figcaption>CNAME and certificate selection</figcaption></figure><p>4. <strong>Gatsby project config setup</strong></p><p>Nest Gatsby project setup as follows.</p><p>First, install gastby s3 plugin</p><pre>npm install gatsby-plugin-s3</pre><p>Then add following configurations into the gatsby-config.js file.</p><pre>{<br>    resolve: `gatsby-plugin-s3`,<br>    options: {<br>        bucketName: &quot;my-example-bucket&quot;,<br>        protocol: &quot;https&quot;,<br>        hostname: &quot;www.example.com&quot;,<br>    },<br>}</pre><p>When using CloudFront, protocol and hostname settings are essential for making redirects work properly. Without them, redirects will point to your S3 Static Website Hosting Endpoint instead of staying on the CloudFront URL. This means users visiting your site through CloudFront could be redirected to a non-HTTPS URL with an unprofessional-looking address in their browser.</p><p>finally add this into the package.json file.</p><pre>{<br>  &quot;scripts&quot;: {<br>    &quot;deploy&quot;: &quot;gatsby-plugin-s3 deploy&quot;<br>  }<br>}</pre><p>Then run npm run build &amp;&amp; npm run deploy to get the site deployed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c0b87ab7923" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Huggingface model in AWS SageMaker]]></title>
            <link>https://medium.com/@nadun1indunil/deploying-a-huggingface-model-in-aws-sagemaker-f1eb1718a5da?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1eb1718a5da</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[sagemaker]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Wed, 08 Jan 2025 06:12:11 GMT</pubDate>
            <atom:updated>2025-01-08T06:12:11.650Z</atom:updated>
            <content:encoded><![CDATA[<p>Protobuf version fix for Huggingface models</p><p>While deploying a Hugging Face model to AWS SageMaker, I encountered an issue that required further investigation. The initial deployment code provided by Hugging Face was as follows:</p><pre>import sagemaker<br>import boto3<br>from sagemaker.huggingface import HuggingFaceModel<br><br>try:<br>	role = sagemaker.get_execution_role()<br>except ValueError:<br>	iam = boto3.client(&#39;iam&#39;)<br>	role = iam.get_role(RoleName=&#39;sagemaker_execution_role&#39;)[&#39;Role&#39;][&#39;Arn&#39;]<br><br># Hub Model configuration. https://huggingface.co/models<br>hub = {<br>	&#39;HF_MODEL_ID&#39;:&#39;Model Id&#39;,<br>	&#39;HF_TASK&#39;:&#39;text-classification&#39;<br>}<br><br># create Hugging Face Model Class<br>huggingface_model = HuggingFaceModel(<br>	transformers_version=&#39;4.26.0&#39;,<br>	pytorch_version=&#39;1.13.1&#39;,<br>	py_version=&#39;py39&#39;,<br>	env=hub,<br>	role=role, <br>)<br><br># deploy model to SageMaker Inference<br>predictor = huggingface_model.deploy(<br>	initial_instance_count=1, # number of instances<br>	instance_type=&#39;ml.m5.xlarge&#39; # ec2 instance type<br>)<br><br>predictor.predict({<br>	&quot;inputs&quot;: &quot;I like you&quot;,<br>})</pre><p>However, This code was logging an error in the AWS Cloudwatch describing that the Python Protobuf version was incompatible.</p><blockquote>TLDR; Install the specific version at the begging of the notebook and add ‘PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION’ property to the hub json.</blockquote><p>Step 1: Add the Protobuf version requested from the error</p><pre>!pip install --upgrade protobuf==3.19.0 --quiet<br>!pip install sagemaker-huggingface-inference-toolkit --upgrade --quiet</pre><p>Step 2: Add a new property to the hub property.</p><pre>hub = {<br>        ‘HF_MODEL_ID’:’model id’,<br>        ‘SM_NUM_GPUS’: json.dumps(1),<br>        ‘PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION’: ‘python’<br>};</pre><p>This will fix the issue related to the Protobuf.<br>Happy Coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1eb1718a5da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[File upload in Laravel using AWS S3]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Looking for a better alternative to uploading images to the /public folder in the Laravel framework? You&#x2019;re in the right place! In this&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@nadun1indunil/file-upload-in-laravel-using-aws-s3-eca743432a1f?source=rss-a66a40c6b858------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@nadun1indunil/file-upload-in-laravel-using-aws-s3-eca743432a1f?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/eca743432a1f</guid>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[s3]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Fri, 03 Jan 2025 11:15:21 GMT</pubDate>
            <atom:updated>2025-01-03T11:16:54.724Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Understanding Fixtures in Playwright and why you should use them.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@nadun1indunil/understanding-fixtures-in-playwright-and-why-you-should-use-them-6d476c41496b?source=rss-a66a40c6b858------2"><img src="https://cdn-images-1.medium.com/max/2600/0*f1Evs_clB2zjOo_B" width="4032"></a></p><p class="medium-feed-snippet">A comprehensive guide on What, How and Why to use Fixtures in Playwright.</p><p class="medium-feed-link"><a href="https://medium.com/@nadun1indunil/understanding-fixtures-in-playwright-and-why-you-should-use-them-6d476c41496b?source=rss-a66a40c6b858------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@nadun1indunil/understanding-fixtures-in-playwright-and-why-you-should-use-them-6d476c41496b?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d476c41496b</guid>
            <category><![CDATA[playwrights]]></category>
            <category><![CDATA[software-test-automation]]></category>
            <category><![CDATA[testfixtures]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[fixtures]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Wed, 03 Jan 2024 13:38:41 GMT</pubDate>
            <atom:updated>2024-01-12T05:53:15.172Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Unlocking the Power of Serverless Computing: Exploring its Application and Alignment with…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@nadun1indunil/unlocking-the-power-of-serverless-computing-exploring-its-application-and-alignment-with-de87c34f3eab?source=rss-a66a40c6b858------2"><img src="https://cdn-images-1.medium.com/max/2600/0*ZjAMi7ZbM2LffzSq" width="5472"></a></p><p class="medium-feed-snippet">Discover the Benefits and Best Practices of Leveraging Serverless Architecture in line with Twelve-Factor Methodology.</p><p class="medium-feed-link"><a href="https://medium.com/@nadun1indunil/unlocking-the-power-of-serverless-computing-exploring-its-application-and-alignment-with-de87c34f3eab?source=rss-a66a40c6b858------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@nadun1indunil/unlocking-the-power-of-serverless-computing-exploring-its-application-and-alignment-with-de87c34f3eab?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/de87c34f3eab</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[software]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Thu, 25 May 2023 14:01:43 GMT</pubDate>
            <atom:updated>2023-05-25T14:01:43.325Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Nodenv Cheatsheet]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">This is your ultimate destination if you are looking for a quick walkthrough of how to use the Nodenv CLI tool.</p><p class="medium-feed-link"><a href="https://medium.com/@nadun1indunil/nodenv-cheatsheet-b45fa2f83bbc?source=rss-a66a40c6b858------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@nadun1indunil/nodenv-cheatsheet-b45fa2f83bbc?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/b45fa2f83bbc</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[version]]></category>
            <category><![CDATA[nodenv]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Wed, 24 May 2023 01:08:16 GMT</pubDate>
            <atom:updated>2023-05-24T01:08:16.971Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Deploying Static Websites to AWS S3 and Amazon CloudFront with AWS Code Pipeline]]></title>
            <link>https://medium.com/@nadun1indunil/how-to-use-aws-code-pipeline-to-deploy-a-static-website-into-s3-6adbf484783b?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/6adbf484783b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[cloudformation]]></category>
            <category><![CDATA[static-web-hosting]]></category>
            <category><![CDATA[cicd]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Fri, 19 May 2023 13:29:12 GMT</pubDate>
            <atom:updated>2023-05-20T07:43:05.244Z</atom:updated>
            <content:encoded><![CDATA[<h3>Effortless Deployment: Deploying Static Websites to AWS S3 and Amazon CloudFront with AWS Code Pipeline</h3><p>I recently got a chance to create and set up a deployment system for a Gatsby project. You may have heard of Gatsby.js, a JavaScript framework that helps build super-fast static websites. In this article, I won’t go into detail about Gatsby.js itself because most frontend frameworks work similarly when it comes to deployment. Instead, I’ll explain how I deployed this static website on AWS S3 and Amazon CloudFront using the AWS code pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zzn7UQNJNk2FfKu4.png" /><figcaption>Fig1: Architecture diagram of the static web hosting solution</figcaption></figure><p>The frontend UI code will be stored in a private AWS S3 bucket. Then I am going to use CloudFront to distribute the hosted code in all edge locations around the globe. You can see ACM (Amazon Certificate Manager) and Route 53 which were used to provide SSL certificate and DNS management respectively. The very same architecture is used inside the Prod account as well. As you can see, we all can agree that this is a very simple architecture.</p><h3>1. Pipeline Flow</h3><p>Let&#39;s go through the pipeline flow from the very beginning.</p><ol><li>The pipeline will be triggered by a code change in the Github repository. (In my scenario repository is an in-house repository. Hence, I used this method to trigger the code pipeline: <a href="https://aws.amazon.com/blogs/devops/integrating-git-with-aws-codepipeline/">https://aws.amazon.com/blogs/devops/integrating-git-with-aws-codepipeline/</a>)</li><li>Then the pipeline will automatically start the code build. The code build has the instructions to build the source code and deploy it into the dev S3 bucket.</li><li>After the deployment, the pipeline will be on hold till we confirm to go ahead. This is achieved by using an approval step in the code pipeline.</li><li>The final step is when we approve the manual approval. This will build the code again (This is a limitation with JS. If we have a separate env variable we need to build the code again) and push it to the prod account S3 bucket.</li></ol><h3>2. Cloudformation Template</h3><p>You can deploy this CFT from the AWS console. This cloud formation template is self-explanatory. However, I commented on some points that I thought were worthy to mention.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76ec88f7c3f3b64a92b77431ece61e8c/href">https://medium.com/media/76ec88f7c3f3b64a92b77431ece61e8c/href</a></iframe><h3>3. Build spec files</h3><p>Build spec files provide instructions for the code build (how to build and deploy etc.).</p><h4>3.1. buildspec-dev.yml</h4><pre>version: 0.2<br>phases:<br>  install:<br>    runtime-versions:<br>        nodejs: 12<br>  pre_build:<br>    commands:<br>      - echo Installing source NPM dependencies...<br>      - node -v<br>      - npm -v<br>      - npm install<br>  build:<br>    commands:<br>      - echo Dev Build started on `date`<br>      - npm run build<br>  post_build:<br>    commands:<br>      - aws s3 rm --recursive s3://${DEPLOY_BUCKET_NAME}<br>      - cd public &amp;&amp; aws s3 sync . s3://${DEPLOY_BUCKET_NAME}<br>      - aws cloudfront create-invalidation --distribution-id ${DISTRIBUTION_ID} --paths &quot;/*&quot;<br>artifacts:<br>  files:<br>    - &#39;**/*&#39;<br>  base-directory: public</pre><h4>3.2. buildspec-prod.yml</h4><pre>version: 0.2<br>phases:<br>  install:<br>    runtime-versions:<br>        nodejs: 12<br>  pre_build:<br>    commands:<br>      - echo Installing source NPM dependencies...<br>      - node -v<br>      - npm -v<br>      - npm install<br>  build:<br>    commands:<br>      - echo Prod Build started on `date`<br>      - npm run build<br>      - chmod +x ./scripts/assume-role.sh<br>      - ./scripts/assume-role.sh ${PROD_ROLE_ARN} prod<br>  post_build:<br>    commands:<br>      - aws s3 rm --recursive s3://${DEPLOY_BUCKET_NAME} --profile prod<br>      - cd public<br>      - aws s3 sync . s3://${DEPLOY_BUCKET_NAME} --profile prod<br>      - aws cloudfront create-invalidation --profile prod --distribution-id ${DISTRIBUTION_ID} --paths &quot;/*&quot;<br>artifacts:<br>  files:<br>    - &#39;**/*&#39;<br>  base-directory: public</pre><h4>3.3. Script to deploy in the prod account</h4><p>Insert this script inside a /script folder from your root folder.</p><pre>#!/bin/bash<br>ROLE_ARN=$1<br>OUTPUT_PROFILE=$2<br><br>echo &quot;Assuming role $ROLE_ARN&quot;<br>sts=$(aws sts assume-role \<br>  --role-arn &quot;$ROLE_ARN&quot; \<br>  --role-session-name &quot;$OUTPUT_PROFILE&quot; \<br>  --query &#39;Credentials.[AccessKeyId,SecretAccessKey,SessionToken]&#39; \<br>  --output text)<br>echo &quot;Converting sts to array&quot;<br>sts=($sts)<br>echo &quot;AWS_ACCESS_KEY_ID is ${sts[0]}&quot;<br>aws configure set aws_access_key_id ${sts[0]} --profile $OUTPUT_PROFILE<br>aws configure set aws_secret_access_key ${sts[1]} --profile $OUTPUT_PROFILE<br>aws configure set aws_session_token ${sts[2]} --profile $OUTPUT_PROFILE<br>echo &quot;credentials stored in the profile named $OUTPUT_PROFILE&quot;</pre><p>This script will assume the role from the prod account and deploy changes into the prod account.</p><h3>4. Manually create and Assume a role in the Prod account</h3><p>Next, we should manually create a role. When you create the role add this as an inline policy.</p><pre>&quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Action&quot;: [<br>                &quot;s3:ListAllMyBuckets&quot;,<br>                &quot;s3:ListBucket&quot;,<br>                &quot;s3:HeadBucket&quot;,<br>                &quot;s3:GetObject&quot;,<br>                &quot;s3:GetObjectVersion&quot;,<br>                &quot;s3:GetBucketVersioning&quot;,<br>                &quot;s3:PutObject&quot;,<br>                &quot;s3:PutObjectAcl&quot;,<br>                &quot;s3:ListObjectsV2&quot;,<br>                &quot;s3:DeleteObject&quot;<br>            ],<br>            &quot;Resource&quot;: [<br>                &quot;arn:aws:s3:::&lt;prod-bucket-name&gt;&quot;,<br>                &quot;arn:aws:s3:::&lt;prod-bucket-name&gt;/*&quot;,<br>            ],<br>            &quot;Effect&quot;: &quot;Allow&quot;<br>        },<br>        {<br>            &quot;Action&quot;: [<br>                &quot;logs:CreateLogGroup&quot;,<br>                &quot;logs:CreateLogStream&quot;,<br>                &quot;logs:PutLogEvents&quot;,<br>                &quot;cloudfront:CreateInvalidation&quot;<br>            ],<br>            &quot;Resource&quot;: [<br>                &quot;*&quot;<br>            ],<br>            &quot;Effect&quot;: &quot;Allow&quot;<br>        }<br>    ]</pre><p>Then under trust relationships add this JSON to enable assume your role from the dev account.</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Principal&quot;: {<br>        &quot;AWS&quot;: &quot;arn:aws:iam::&lt;dev account&gt;:root&quot;<br>      },<br>      &quot;Action&quot;: &quot;sts:AssumeRole&quot;,<br>      &quot;Condition&quot;: {}<br>    }<br>  ]<br>}</pre><p>Now everything is set to test. Try to trigger the pipeline by a code merge to see if the magic happens. Your pipeline should be something like this in your AWS console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HDeFO1SV1iR1IovD.png" /></figure><ol><li>I have added separate build steps in both code builds. If you don’t need two separate builds you can use one instead.</li><li>IAM roles can be optimized to provide the least privileges.</li><li>This pipeline is suitable for ideally any kind of JS frontend deployment. (Of course, You need to change the buildspec steps.)</li></ol><p><strong><em>If you enjoyed reading this article, please show your support by giving it a clap 👏 and consider following me for more similar articles in the future.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6adbf484783b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to AWS Cloud​Formation]]></title>
            <link>https://medium.com/@nadun1indunil/introduction-to-aws-cloud-formation-ce6b86a644f4?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce6b86a644f4</guid>
            <category><![CDATA[software-deployment]]></category>
            <category><![CDATA[cloudformation]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[iac]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Fri, 19 May 2023 13:09:36 GMT</pubDate>
            <atom:updated>2023-05-19T13:09:36.629Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will delve into AWS CloudFormation, an Infrastructure as a Code service offered by Amazon Web Services. AWS CloudFormation enables you to define and deploy your entire infrastructure resources within your cloud environment using a standardized language. By utilizing a straightforward text file, you can automate and securely provision all the necessary resources for your applications across multiple regions and accounts. This CloudFormation Template (CFT) file serves as a centralized reference for your cloud environment, ensuring consistency and reliability.</p><blockquote><em>AWS CloudFormation allows you to model your entire infrastructure in a text file (CloudFormation Template).</em></blockquote><p>Another advantage of using CFT for resource creation is CloudFormation takes care of determining the right operations to perform when managing your stack and rolls back changes automatically if errors are detected. Codifying your infrastructure allows you to treat your infrastructure as just code.</p><p>In order to discuss about Cloud Formation I will separate my introduction into 3 sections:</p><h3>What Is CFT?</h3><ul><li>It is a declaration of the AWS resources that make up a stack. ​</li><li>It is stored as a text file.​</li><li>We can create and edit them in any text editor. ​</li><li>It can be managed in your source control system with the rest of your source code.</li></ul><h3>Why CloudFormation?</h3><ul><li>It is just a simple code that can use to spin up your infrastructure.​</li><li>Much easier than using the AWS console.</li></ul><h3>How CloudFormation works?</h3><ul><li>AWS CloudFormation makes underlying service calls to AWS to provision and configures your resources. ​</li><li>Can perform only actions that you have permission to do.</li></ul><p>I hope you got some idea about what CFT is, Let’s look about what are key components of CFT and how to use them.</p><p><em>Note</em>: You can write CFT as JSON(Javascript Object Notation) files as well as YAML files. I highly encourage you to use YML because of its clean code style and ability to comment in YMLs.</p><h3>Cloud Formation Template Components</h3><pre>AWSTemplateFormatVersion: 2010-09-09<br>Description:<br>Parameters:<br>Mappings:<br>Conditions:<br>Resources:<br>Outputs:</pre><h3>Version — AWSTemplateFormatVersion (optional)​</h3><p>identifies the capabilities of the template. The latest template format version is 2010–09–09 and is currently the only valid value. ​(Do not put the current date. It is just the version date. I have seen so many people put the date they run this file)</p><p>example</p><pre>AWSTemplateFormatVersion: 2010-09-09</pre><h3>Description (optional)​</h3><p>enables you to include arbitrary comments about your template. The Description must follow the AWSTemplateFormatVersion section​</p><p>example</p><pre>Description: This is test stack to deploy one EC2</pre><h3>Metadata (optional)​</h3><p>objects that provide details about the template​</p><p>example</p><pre>Metadata:<br>  Instances:<br>    Description: &quot;Information about the instances&quot;<br>  Databases: <br>    Description: &quot;Information about the databases&quot;</pre><h3>Parameters (optional)​</h3><p>Parameters enable you to input custom values to your template each time you create or update a stack. We can input these custom values from the AWS console before we run a template.</p><p>We can find Two main parameter types:</p><ul><li>General Parameter Types</li><li>String : “string”​</li><li>Number : 1​</li><li>List : [1,2,3]​</li><li>CommaDelimitedList : “1,2,3”</li><li>AWS Specific Parameter Types</li><li>AWS::EC2::Image::Id : “ami-b43503a4”​</li><li>AWS::EC2::Instance::Id : “i-47cad982”​</li><li>AWS::EC2::SecurityGroup::Id : “sg-6246b70c”​</li><li>AWS::Route53::HostedZone::Id : “Z2VHZWU704GYI1”</li></ul><p>Apart from data types, we have Intrinsic Functions You can find more details <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html">here</a></p><p>AWS CloudFormation provides several built-in functions that help you manage your stacks. Use intrinsic functions in your templates to assign values to properties that are not available until runtime.</p><ul><li>Fn::Base64</li><li>Fn::Cidr</li><li>Condition Functions</li><li>Fn::FindInMap</li><li>Fn::GetAtt</li><li>Fn::GetAZs</li><li>Fn::ImportValue</li><li>Fn::Join</li><li>Fn::Select</li><li>Fn::Split</li><li>Fn::Sub</li><li>Fn::Transform</li><li>Ref</li></ul><p>example</p><pre>Parameters:<br>  ApplicationName:<br>    Description: Name of application<br>    Type: String<br>    Default: testEC2<br>    MinLength: &#39;1&#39;<br>    MaxLength: &#39;255&#39;<br>    AllowedPattern: &#39;[\x20-\x7E]*&#39;<br>    ConstraintDescription: Must contain only ASCII characters.</pre><ul><li>You can define min or max length of parameter, Type of parameter even a pattern</li><li>ConstraintDescription will be shown when pattern is not satisfied</li><li>We can use ApplicationName inside this YAML file as a variable</li></ul><pre>!Ref ApplicationName</pre><h3>Mapping (optional)​</h3><p>matches a key to a corresponding set of named values. For example, if you want to set values based on a region, you can create a mapping that uses the region name as a key and contains the values you want to specify for each specific region.​ (It is a normal map we see in day to day life)</p><p>example</p><pre>Mappings: <br>  RegionAndInstanceTypeToAMIID: <br>    us-east-1: <br>      test: &quot;ami-b70554c8&quot;<br>      prod: &quot;ami-cfe4b2b0&quot;<br>    us-west-2: <br>      test: &quot;ami-b70554c8&quot;<br>      prod: &quot;ami-cfe4b2b0&quot;</pre><p>You can use this map as</p><pre>!FindInMap [RegionAndInstanceTypeToAMIID, &quot;us-east-1&quot;, !Ref &quot;test&quot;]   # answer is: ami-b70554c8</pre><h3>Conditions (optional)​</h3><p>statements that define when a resource is created or when a property is defined​</p><p>example</p><pre>Conditions:<br>  CreateProdResources: !Equals [ !Ref EnvironmentType, prod ]</pre><p>you can use conditions as</p><pre>!If [CreateProdResources, t2.micro, t2.nano] # If CreateProdResources is true then t2.micro else t2.nano</pre><h3>Resources (Required)​</h3><p>The resources component declares the AWS resources that you want to include in the stack, such as an Amazon EC2 instance or an Amazon S3 bucket.​</p><p>example</p><pre>Resources:<br>  testEC2:<br>    Type: &#39;AWS::EC2::Instance&#39;<br>    Properties:<br>      DisableApiTermination: &#39;true&#39;<br>      AvailabilityZone: us-east-1c<br>      ImageId: !FindInMap [RegionAndInstanceTypeToAMIID, !Ref &quot;AWS::Region&quot;, !Ref EnvironmentType]   # using map<br>      InstanceType: !If [CreateProdResources, t2.micro, t2.nano]   # using conditions<br>      KeyName: !Ref KeyName  # this is the key name you created<br>      SecurityGroupIds:<br>        - !Ref WebSG<br>      BlockDeviceMappings:<br>        - DeviceName: /dev/xvda<br>          Ebs:<br>            VolumeSize: !Ref RootVolumeSize<br>            VolumeType: gp2<br>        - DeviceName: /dev/sdf<br>          Ebs:<br>            VolumeSize: !Ref AppVolumeSize<br>            VolumeType: gp2<br>        - DeviceName: /dev/sds<br>          Ebs:<br>            VolumeSize: !Ref SwapDisk<br>            VolumeType: gp2<br>      Tags:<br>        - Key: Name<br>          Value: testEC2<br>        - Key: Application_Name<br>          Value: !Ref ApplicationName<br>        - Key: Application_Id<br>          Value: !Ref ApplicationId</pre><ul><li>testEC2 will work as a variable name, hereafter you can use it to refer this EC2 instance</li><li>Explore usage of !Ref to usage of parameters</li></ul><h3>Outputs (optional)​</h3><p>Outputs section declares output values that you can import into other stacks (to cross stack references)​</p><p>example</p><pre>Outputs:<br>  MYEC2:<br>    Description: EC2 detail<br>    Value: !Ref testEC2<br>    Export:<br>      Name: !Sub &quot;${AWS::StackName}-EC2&quot;<br>  EC2PUBLICIP:<br>    Description: Public IP Address<br>    Value:<br>      !GetAtt testEC2.PublicIp</pre><p>You can find the whole YAML file here: <a href="https://github.com/nadunindunil/AWS-DEMO/blob/master/ec2.yaml">https://github.com/nadunindunil/AWS-DEMO/blob/master/ec2.yaml</a></p><p>In my next article, I am going to discuss how to deploy CFT in the AWS console.</p><p>This article was initially published on Dailyjsx.com on May 18, 2019.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce6b86a644f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ant Design Webpack override using rescript and antd scss theme plugin]]></title>
            <link>https://medium.com/@nadun1indunil/ant-design-webpack-override-using-rescript-and-antd-scss-theme-plugin-c968baaf4aa3?source=rss-a66a40c6b858------2</link>
            <guid isPermaLink="false">https://medium.com/p/c968baaf4aa3</guid>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[antd]]></category>
            <dc:creator><![CDATA[Nadun Indunil]]></dc:creator>
            <pubDate>Fri, 19 May 2023 12:46:49 GMT</pubDate>
            <atom:updated>2023-05-19T12:46:49.204Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will explore the process of using rescripts to customize the Webpack configuration of create-react-app and make it compatible with the <a href="https://ant.design/docs/react/use-with-create-react-app">antd</a> and <a href="https://github.com/intoli/antd-scss-theme-plugin">antd-scss-theme-plugin</a>. While <a href="https://ant.design/docs/react/use-with-create-react-app">antd</a> and <a href="https://github.com/intoli/antd-scss-theme-plugin">antd-scss-theme-plugin</a> offer documentation on overriding the create-react-app Webpack, it can be challenging to successfully run the application using their provided instructions. We will address this issue and provide a step-by-step guide to help you overcome any obstacles and get your application up and running smoothly.</p><blockquote><em>TL;DR here is the boilerplate url : </em><a href="https://github.com/nadunindunil/antd-rescripts-boilerplate"><em>https://github.com/nadunindunil/antd-rescripts-boilerplate</em></a></blockquote><h3>Let&#39;s start installing dependencies:</h3><p>Install these as dev dependencies:</p><ul><li>@rescripts/cli</li><li>@rescripts/rescript-use-babel-config</li><li>antd-scss-theme-plugin</li><li>babel-plugin-import0</li><li>less</li><li>less-loader</li></ul><p>Install antd as npm dependency.</p><p>change <em>package.json</em> scripts section to this:</p><pre>&quot;scripts&quot;: {<br>    &quot;start-old&quot;: &quot;react-scripts start&quot;,<br>    &quot;build-old&quot;: &quot;react-scripts build&quot;,<br>    &quot;test-old&quot;: &quot;react-scripts test --env=jsdom&quot;,<br>    &quot;start&quot;: &quot;rescripts start&quot;,<br>    &quot;build&quot;: &quot;rescripts build&quot;,<br>    &quot;test&quot;: &quot;rescripts test&quot;,<br>    &quot;eject&quot;: &quot;react-scripts eject&quot;<br>}</pre><h3>Add theme.scss file inside src folder with a styling like this:</h3><pre>$primary-color: #fe8019;</pre><p>finally, add .rescriptsrc.js into the project root:</p><pre>const AntdScssThemePlugin = require(&#39;antd-scss-theme-plugin&#39;);<br><br>const addLessLoader = (loaderOptions = {}) =&gt; config =&gt; {<br>  const mode = process.env.NODE_ENV === &#39;development&#39; ? &#39;dev&#39; : &#39;prod&#39;;<br><br>  // Need these for production mode, which are copied from react-scripts<br>  const publicPath = require(&#39;react-scripts/config/paths&#39;).servedPath;<br>  const shouldUseRelativeAssetPaths = publicPath === &#39;./&#39;;<br>  const shouldUseSourceMap = mode === &#39;prod&#39; &amp;&amp; process.env.GENERATE_SOURCEMAP !== &#39;false&#39;;<br>  const lessRegex = /\.less$/;<br>  const lessModuleRegex = /\.module\.less$/;<br>  const localIdentName = loaderOptions.localIdentName || &#39;[path][name]__[local]--[hash:base64:5]&#39;;<br><br>  const getLessLoader = cssOptions =&gt; {<br>    return [<br>      mode === &#39;dev&#39;<br>        ? require.resolve(&#39;style-loader&#39;)<br>        : {<br>            loader: require(&#39;mini-css-extract-plugin&#39;).loader,<br>            options: Object.assign({}, shouldUseRelativeAssetPaths ? { publicPath: &#39;../../&#39; } : undefined)<br>          },<br>      {<br>        loader: require.resolve(&#39;css-loader&#39;),<br>        options: cssOptions<br>      },<br>      {<br>        loader: require.resolve(&#39;postcss-loader&#39;),<br>        options: {<br>          ident: &#39;postcss&#39;,<br>          plugins: () =&gt; [<br>            require(&#39;postcss-flexbugs-fixes&#39;),<br>            require(&#39;postcss-preset-env&#39;)({<br>              autoprefixer: {<br>                flexbox: &#39;no-2009&#39;<br>              },<br>              stage: 3<br>            })<br>          ],<br>          sourceMap: shouldUseSourceMap<br>        }<br>      },<br>      {<br>        loader: &#39;sass-loader&#39;,<br>        options: {<br>          sourceMap: process.env.NODE_ENV !== &#39;production&#39;<br>        }<br>      },<br>      AntdScssThemePlugin.themify({<br>        loader: &#39;less-loader&#39;,<br>        options: {<br>          javascriptEnabled: true,<br>          sourceMap: process.env.NODE_ENV !== &#39;production&#39;<br>        }<br>      })<br>    ];<br>  };<br><br>  const loaders = config.module.rules.find(rule =&gt; Array.isArray(rule.oneOf)).oneOf;<br><br>  // Insert less-loader as the penultimate item of loaders (before file-loader)<br>  loaders.splice(<br>    loaders.length - 1,<br>    0,<br>    {<br>      test: lessRegex,<br>      exclude: lessModuleRegex,<br>      use: getLessLoader({<br>        importLoaders: 2<br>      }),<br>      sideEffects: mode === &#39;prod&#39;<br>    },<br>    {<br>      test: lessModuleRegex,<br>      use: getLessLoader({<br>        importLoaders: 2,<br>        modules: true,<br>        localIdentName: localIdentName<br>      })<br>    }<br>  );<br><br>  return config;<br>};<br><br>module.exports = [<br>  {<br>    webpack: config =&gt; {<br>      config.resolve.extensions = [...config.resolve.extensions, &#39;.less&#39;];<br>      // change next line location as you want to add custom scss file<br>      config.plugins = [...config.plugins, new AntdScssThemePlugin(&#39;./src/theme.scss&#39;)];<br><br>      config = addLessLoader()(config);<br><br>      return config;<br>    }<br>  },<br>  [<br>    &#39;use-babel-config&#39;,<br>    {<br>      presets: [&#39;react-app&#39;],<br>      plugins: [<br>        [<br>          &#39;import&#39;,<br>          {<br>            libraryName: &#39;antd&#39;,<br>            style: true<br>          }<br>        ]<br>      ]<br>    }<br>  ]<br>];</pre><p>I hope this will help you to configure your next react application using antd.</p><p><strong><em>This article was initially published on Dailyjsx.com on August 6, 2019.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c968baaf4aa3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>