<?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 Uddipta Kashyap on Medium]]></title>
        <description><![CDATA[Stories by Uddipta Kashyap on Medium]]></description>
        <link>https://medium.com/@udi.kshp?source=rss-2d9a6a5898ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*P6ZgivT-A24_gSlS</url>
            <title>Stories by Uddipta Kashyap on Medium</title>
            <link>https://medium.com/@udi.kshp?source=rss-2d9a6a5898ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 23:01:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@udi.kshp/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[Centralized Logging on AWS: CloudWatch, S3, Athena & Alarms]]></title>
            <link>https://medium.com/@udi.kshp/centralized-logging-on-aws-cloudwatch-s3-athena-alarms-cf16a2c20e73?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf16a2c20e73</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-cloudwatch]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 06:06:58 GMT</pubDate>
            <atom:updated>2026-11-28T06:06:58.394Z</atom:updated>
            <content:encoded><![CDATA[<p>Build a centralized logging and monitoring platform on AWS for EC2, RDS and ALB using CloudWatch, S3, Athena, SNS and Slack.</p><h3>Why centralized logging on AWS matters</h3><p>When you run a handful of EC2 instances and an RDS database, logs live everywhere: nginx files on each server, database logs in the RDS console, load balancer logs nowhere at all because nobody switched them on. During an incident you end up SSH-ing into machines, and by the time you find the right file, the Auto Scaling Group has already replaced the instance that held the evidence.</p><p>This guide shows how to build <strong>centralized logging and monitoring on AWS</strong> that fixes this. By the end you will have:</p><ul><li>Application and system logs from EC2 flowing into CloudWatch Logs, with memory and disk metrics the default EC2 metrics do not provide</li><li>ALB access logs and RDS logs archived in a single S3 bucket</li><li>Amazon Athena queries to investigate 5xx errors, slow requests and slow database queries</li><li>CloudWatch alarms that notify Slack or PagerDuty through SNS</li><li>S3 lifecycle rules that keep long-term log storage cheap</li></ul><p>The design works in one account for learning and scales to many accounts later, which I cover near the end.</p><h3>Architecture overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JLlNoRhMt7IDqRIZW5MGpw.png" /></figure><p>The CloudWatch Agent cannot write to S3 directly, and RDS cannot export its engine logs to S3 directly either. Both go to CloudWatch Logs first, and you then forward them to S3. ALB is the exception: it writes access logs straight to S3.</p><h3>Prerequisites</h3><ul><li>An AWS account (use a test account) and a region. The examples assume us-east-1.</li><li>An existing ALB, EC2 instances in an Auto Scaling Group running nginx or similar, and an RDS instance (MySQL or PostgreSQL). If you do not have these, build the 3-tier stack first.</li><li>AWS CLI v2 configured, plus permissions for S3, CloudWatch, Logs, IAM, Firehose, SNS and Athena.</li><li>SSM Agent running on the instances (default on Amazon Linux 2023), so you can install and configure the CloudWatch Agent without SSH.</li></ul><h3>Step 1: Create the central S3 log bucket</h3><p>Use one bucket with a prefix per source so lifecycle rules and Athena tables stay simple.</p><ol><li>Create the bucket, for example org-central-logs-&lt;acct-id&gt;-us-east-1.</li><li>Turn on <strong>Block all public access</strong>.</li><li>Enable default encryption with <strong>SSE-S3</strong>. ALB access logs support SSE-S3 only, not SSE-KMS, so do not choose KMS for this bucket.</li><li>Create these prefixes by convention: alb/, ec2/, rds/, athena-results/.</li><li>Add a bucket policy that lets the load balancer write logs. In older regions such as Mumbai, the principal is a regional ELB account. Newer regions use a service principal instead, so confirm the right principal for your region in the AWS ALB access logs documentation.</li></ol><h3>Step 2: Enable ALB access logs</h3><pre>aws elbv2 modify-load-balancer-attributes \<br>  --load-balancer-arn &lt;alb-arn&gt; \<br>  --attributes Key=access_logs.s3.enabled,Value=true \<br>               Key=access_logs.s3.bucket,Value=CENTRAL_LOG_BUCKET \<br>               Key=access_logs.s3.prefix,Value=alb</pre><p>ALB delivers compressed log files roughly every five minutes to alb/AWSLogs/&lt;account&gt;/elasticloadbalancing/&lt;region&gt;/yyyy/mm/dd/. Open the ALB in the console, check the Attributes tab, then hit the site a few times and confirm files appear in S3.</p><h3>Step 3: Install and configure the CloudWatch Agent on EC2</h3><h3>3.1 Give the instances permission</h3><p>Attach the AWS managed policy CloudWatchAgentServerPolicy and AmazonSSMManagedInstanceCore to the instance profile used by your Auto Scaling Group launch template.</p><h3>3.2 Log in JSON format so Athena can read it</h3><p>Structured logs are the single best investment you can make. In nginx:</p><pre>log_format json_combined escape=json &#39;{&quot;time&quot;:&quot;$time_iso8601&quot;,&quot;remote_addr&quot;:&quot;$remote_addr&quot;,&quot;request&quot;:&quot;$request&quot;,&quot;status&quot;:$status,&quot;bytes&quot;:$body_bytes_sent,&quot;request_time&quot;:$request_time,&quot;upstream_time&quot;:&quot;$upstream_response_time&quot;,&quot;user_agent&quot;:&quot;$http_user_agent&quot;}&#39;;<br>access_log /var/log/nginx/access.log json_combined;</pre><h3>3.3 Agent configuration</h3><p>Store this in SSM Parameter Store as AmazonCloudWatch-linux-prod so every instance in the ASG uses the same configuration.</p><pre>{&quot;agent&quot;:{&quot;metrics_collection_interval&quot;:60,&quot;run_as_user&quot;:&quot;cwagent&quot;},&quot;metrics&quot;:{&quot;namespace&quot;:&quot;CWAgent&quot;,&quot;append_dimensions&quot;:{&quot;AutoScalingGroupName&quot;:&quot;${aws:AutoScalingGroupName}&quot;,&quot;InstanceId&quot;:&quot;${aws:InstanceId}&quot;},&quot;metrics_collected&quot;:{&quot;mem&quot;:{&quot;measurement&quot;:[&quot;mem_used_percent&quot;]},&quot;disk&quot;:{&quot;measurement&quot;:[&quot;used_percent&quot;],&quot;resources&quot;:[&quot;/&quot;]}}},&quot;logs&quot;:{&quot;logs_collected&quot;:{&quot;files&quot;:{&quot;collect_list&quot;:[{&quot;file_path&quot;:&quot;/var/log/nginx/access.log&quot;,&quot;log_group_name&quot;:&quot;/platform/prod/ec2/nginx-access&quot;,&quot;log_stream_name&quot;:&quot;{instance_id}&quot;,&quot;retention_in_days&quot;:30},{&quot;file_path&quot;:&quot;/var/log/nginx/error.log&quot;,&quot;log_group_name&quot;:&quot;/platform/prod/ec2/nginx-error&quot;,&quot;log_stream_name&quot;:&quot;{instance_id}&quot;,&quot;retention_in_days&quot;:30}]}}}}</pre><h3>3.4 Install and start the agent with SSM</h3><ol><li>In Systems Manager, open <strong>Run Command</strong>.</li><li>Run AWS-ConfigureAWSPackage with the package name AmazonCloudWatchAgent to install it.</li><li>Run AmazonCloudWatch-ManageAgent with action configure, source ssm, and your parameter name.</li><li>Put both steps in your launch template user data or an SSM State Manager association, so new instances join the platform automatically.</li></ol><p><strong>Verify:</strong> in CloudWatch → Log groups you should see the two nginx groups with one stream per instance, and under Metrics → CWAgent you should see mem_used_percent and used_percent.</p><h3>Step 4: Publish RDS logs to CloudWatch Logs</h3><ol><li>In the RDS console choose your instance → <strong>Modify</strong> → <strong>Log exports</strong> and enable the engine logs: PostgreSQL gives you postgresql and upgrade, and MySQL gives you error, slowquery and optionally audit.</li><li>Enable useful logging in the parameter group. For PostgreSQL, set log_min_duration_statement (for example 1000 ms), log_connections and log_disconnections. For MySQL, set slow_query_log=1 and long_query_time=2.</li><li>Avoid the MySQL general log in production. It records every statement and gets expensive quickly.</li><li>Turn on <strong>Enhanced Monitoring</strong> (60-second granularity) for OS-level metrics. It writes to the RDSOSMetrics log group.</li><li>Check which performance insights feature is current for your engine. AWS has been moving customers from Performance Insights to CloudWatch Database Insights, so confirm in the current RDS docs.</li><li>Set retention on the resulting log groups (/aws/rds/instance/&lt;db-id&gt;/&lt;log-type&gt;) to 14 or 30 days. The default is to keep logs forever, which quietly costs money.</li></ol><h3>Step 5: Archive CloudWatch Logs to S3 with Amazon Data Firehose</h3><p>You could use CloudWatch’s export task, but it is a manual batch job. A subscription filter with Firehose streams logs to S3 continuously.</p><ol><li><strong>Create a Firehose stream</strong> with source <em>Direct PUT</em> and destination <em>Amazon S3</em>.</li><li>Point it at your central bucket with prefix ec2/nginx-access/year=!{timestamp:yyyy}/month=!{timestamp:MM}/day=!{timestamp:dd}/ and an error prefix such as errors/!{firehose:error-output-type}/!{timestamp:yyyy}/. Create a second stream for rds/ with its own prefix.</li><li>In the processing settings, enable <strong>decompression of CloudWatch Logs records</strong> and <strong>message extraction</strong>, so objects contain the raw log lines rather than CloudWatch’s gzip JSON envelope. Athena can then read them directly.</li><li>Set the buffer to a large size and a long interval (for example 128 MB or 300 seconds). Bigger files mean fewer S3 requests and faster, cheaper Athena queries. Choose GZIP compression.</li><li><strong>Create an IAM role</strong> that CloudWatch Logs can assume (trust logs.amazonaws.com) with firehose:PutRecord and firehose:PutRecordBatch on your stream.</li><li><strong>Attach a subscription filter</strong> to each log group:</li></ol><pre>aws logs put-subscription-filter \<br>  --log-group-name /platform/prod/ec2/nginx-access \<br>  --filter-name to-s3-archive \<br>  --filter-pattern &quot;&quot; \<br>  --destination-arn &lt;firehose-stream-arn&gt; \<br>  --role-arn &lt;cwlogs-to-firehose-role-arn&gt;</pre><p>Repeat for the nginx error group and the RDS log groups, each pointing at its matching stream.</p><p><strong>Verify:</strong> after a few minutes, objects appear under ec2/nginx-access/year=2026/... in S3.</p><h3>Step 6: Query everything with Athena</h3><h3>6.1 Set up Athena safely</h3><ol><li>Create a workgroup named observability with query results going to s3://CENTRAL_LOG_BUCKET/athena-results/.</li><li>Set a <strong>per-query data scanned limit</strong> on the workgroup. It protects you from an accidental full-bucket scan.</li><li>Create a Glue database: CREATE DATABASE observability;</li></ol><h3>6.2 Create the ALB table and run a query</h3><p>Create the ALB table with the official DDL from the AWS documentation page <em>Query Application Load Balancer logs</em>, and choose the partition projection variant. Point its LOCATION and storage.location.template at s3://CENTRAL_LOG_BUCKET/alb/AWSLogs/ACCOUNT_ID/elasticloadbalancing/ap-south-1/. To keep this guide simple, we query only the ALB logs here. The EC2 and RDS archives under ec2/ and rds/ can be queried the same way later.</p><p>Partition projection means no crawlers and no MSCK REPAIR TABLE. Athena works out the partitions from the path.</p><p><strong>Which URLs produced 5xx errors today (ALB):</strong></p><pre>SELECT request_url, elb_status_code, count(*) AS hits<br>FROM observability.alb_access_logs<br>WHERE day = date_format(current_date, &#39;%Y/%m/%d&#39;)<br>  AND elb_status_code &gt;= 500<br>GROUP BY 1, 2<br>ORDER BY hits DESC<br>LIMIT 20;</pre><p>Always filter on the partition columns. Without them, Athena scans every file in the prefix and you pay for it, since Athena bills by data scanned.</p><h3>Step 7: Build dashboards</h3><h3>7.1 Operational view: CloudWatch dashboard</h3><p>Create one dashboard per environment with widgets for: ALB request count, target 5xx count,ASG instance count, EC2 CPU, mem_used_percent and used_percent,RDS CPU, FreeStorageSpace, DatabaseConnections and read/write latency. Add a Logs Insights widget that shows the latest errors from the nginx error log group.</p><h3>7.2 Analytical view: QuickSight or Grafana</h3><ul><li><strong>Amazon QuickSight:</strong> add Athena as a data source using the observability workgroup, create datasets from saved queries (5xx by URL, top client IPs) and build visuals. Use SPICE for dashboards that many people open, and direct query for fresh data.</li><li><strong>Amazon Managed Grafana:</strong> add CloudWatch and Athena data sources and reuse the same queries as panels. It suits teams already using Grafana for Kubernetes or on-prem systems.</li></ul><h3>Step 8: Alarms to SNS to Microsoft Teams</h3><h3>8.1 Create the SNS topic for the SRE team</h3><p>Create one standard SNS topic named sre-alerts and use it as the alarm action for every alarm in this guide. Subscribe an email address to it as a fallback, so there is always a second path to a human.</p><p>If you later need severity tiers, add a second topic (for example sre-alerts-warning) and a second Teams channel.</p><h3>8.2 Alarms to start with</h3><ul><li><strong>ALB:</strong> HTTPCode_Target_5XX_Count, TargetResponseTime (p95) and UnHealthyHostCount</li><li><strong>EC2:</strong> StatusCheckFailed, CPU utilization, mem_used_percent and disk used_percent from the agent</li><li><strong>RDS:</strong> CPUUtilization, FreeStorageSpace, DatabaseConnections, FreeableMemory, and ReplicaLag if you use replicas</li><li><strong>Logs:</strong> a metric filter on the nginx error group counting lines that contain [error], with an alarm on the count</li></ul><p>Example ALB alarm:</p><pre>aws cloudwatch put-metric-alarm \<br>  --alarm-name prod-alb-target-5xx-high \<br>  --namespace AWS/ApplicationELB --metric-name HTTPCode_Target_5XX_Count \<br>  --dimensions Name=LoadBalancer,Value=&lt;alb-dimension-value&gt; \<br>  --statistic Sum --period 60 --evaluation-periods 5 --datapoints-to-alarm 3 \<br>  --threshold 10 --comparison-operator GreaterThanOrEqualToThreshold \<br>  --treat-missing-data notBreaching \<br>  --alarm-actions &lt;sre-alerts-topic-arn&gt;</pre><h3>8.3 Send alarms to the SRE Teams channel</h3><ol><li>Open AWS Chatbot in the console (now branded Amazon Q Developer in chat applications) and choose <strong>Microsoft Teams</strong> as the chat client.</li><li>Paste the URL of the SRE team’s Teams channel and authorize the connection. A Teams admin may need to approve the AWS app for your organization first.</li><li>Create the channel configuration: name it sre-alerts-teams, choose a read-only IAM role, and select the sre-alerts SNS topic.</li><li>Publish a test message to the topic from the SNS console and confirm it appears in the channel.</li></ol><h3>Step 9: Control cost with S3 lifecycle rules</h3><p>Log volume grows every day, so it is worth planning for cost early. S3 lifecycle rules can automatically move older logs to cheaper storage classes, such as Standard-IA and the Glacier tiers, and delete them when your retention period ends. A common approach is to keep recent logs in S3 Standard for quick investigation, tier them down as they age, and set the expiry to match your compliance policy.</p><h3>Step 10: Test the platform end to end</h3><p>A monitoring platform you have not tested is a guess. Run these drills and screenshot each result for the article:</p><ol><li><strong>Generate traffic and errors.</strong> Use hey or ab against the ALB, and add a route that returns 500. Confirm the 5xx alarm fires.</li><li><strong>Kill an instance.</strong> Stop one instance and watch UnHealthyHostCount, the ASG replacement and the new instance appearing in the log group.</li><li><strong>Fill a disk.</strong> Create a large file with fallocate and confirm the disk alarm triggers, then delete the file.</li><li><strong>Slow query.</strong> Run SELECT pg_sleep(2); on PostgreSQL and find it in the log group and later in Athena.</li><li><strong>Investigate with Athena.</strong> Run the saved queries and confirm the same incident is visible in the ALB, nginx and RDS data.</li></ol><h3>Scaling to many accounts</h3><p>When the platform grows beyond one account:</p><ul><li>Place the central bucket in a dedicated <strong>Log Archive account</strong>. Allow other accounts to write using a bucket policy condition on aws:PrincipalOrgID.</li><li>Use <strong>CloudWatch cross-account observability</strong> (Observability Access Manager) so a central monitoring account can view metrics, logs and traces from source accounts without copying them.</li><li>Send CloudWatch Logs across accounts with a CloudWatch Logs destination in the central account and the same Firehose-to-S3 pattern.</li><li>Deploy the agent configuration, log groups, subscription filters and alarms with Terraform or CloudFormation StackSets, so every new account is observable from day one.</li></ul><h3>Conclusion</h3><p>Centralized logging on AWS is not one service. It is a set of small decisions: structured logs, CloudWatch for the hot path, S3 for the archive, Athena for questions, SNS for routing alerts and lifecycle rules for cost. Build it once, test it with deliberate failures, and every workload you add later inherits the same visibility.</p><p>If this guide helped, follow for the next article in this series, where I place this platform inside a multi-account landing zone. Share the problems you hit while building it, because those are usually the most useful lessons for the next engineer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf16a2c20e73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Highly Available Serverless API on AWS with Route 53, ALB, and Lambda]]></title>
            <link>https://medium.com/@udi.kshp/building-a-highly-available-serverless-api-on-aws-with-route-53-alb-and-lambda-0d4ea5d580c7?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d4ea5d580c7</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-solutions-architect]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[content-writing]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 05:54:14 GMT</pubDate>
            <atom:updated>2026-11-09T05:54:14.581Z</atom:updated>
            <content:encoded><![CDATA[<p>A practical walkthrough of HTTPS enforcement, multi-AZ resiliency, path-based routing, and centralized logging</p><h3>Introduction</h3><p>Not every API needs API Gateway. If you already use an Application Load Balancer (ALB) and want to keep your compute serverless, <strong>ALB with AWS Lambda as the target</strong> is a clean and cost-effective pattern. It gives you TLS termination, HTTP-to-HTTPS enforcement, multi-AZ availability, and content-based routing without managing servers.</p><p>In this article we build a development API on dev-api.connect.com, deployed in <strong>us-east-1</strong>, with:</p><ul><li>A friendly domain name mapped through Route 53</li><li>A permanent HTTP → HTTPS redirect</li><li>An ALB spanning two subnets for high availability</li><li>An ACM certificate on the HTTPS listener</li><li>Path-based routing to two independent Lambda functions</li><li>CloudWatch logging via a least-privilege IAM role</li></ul><h3>1. The Big Picture</h3><p>Here is the end-to-end architecture before we break it down:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WT0Rp74PK86KacGgfLRjGQ.png" /></figure><p>Let’s walk through each layer in the order a request travels.</p><h3>2. DNS: Mapping the Domain to the Load Balancer</h3><p>The entry point is the domain <strong>dev-api.connect.com</strong>. In Route 53, we create an <strong>Alias A record</strong> that points to the ALB.</p><p><strong>Why an alias record instead of a CNAME?</strong></p><ul><li>Alias records work at the zone apex as well as subdomains, while a CNAME cannot be used at the apex.</li><li>Route 53 does not charge for alias queries to AWS resources.</li><li>Alias records track the ALB’s changing IP addresses automatically, so you never hard-code an IP.</li><li>They can optionally evaluate the target’s health.</li></ul><h3>3. The Application Load Balancer and High Availability</h3><p>The ALB is deployed across <strong>two subnets in two different Availability Zones</strong>. This is the foundation of the design’s resiliency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AvjTvkCF8YY-elN5NdYibA.png" /></figure><p><strong>Configuration notes:</strong></p><ul><li>The ALB must be in at least two subnets in different AZs.</li><li>For an internet-facing ALB, use public subnets with a route to an Internet Gateway.</li><li>Attach a security group allowing inbound TCP 80 and 443 from the internet (0.0.0.0/0). Lambda targets are not VPC-bound, so no outbound rule to targets is needed for connectivity.</li></ul><h3>4. Listeners: Enforcing HTTPS</h3><p>The ALB exposes two listeners. Together they make sure every request ends up encrypted.</p><h4>Listener on Port 80: Permanent Redirect</h4><p>Port 80 does not serve any content. Its only job is to redirect clients to HTTPS:</p><h4>Listener on Port 443: Secure Traffic with TLS</h4><p>Port 443 handles the real traffic and holds the <strong>ACM certificate</strong> for dev-api.connect.com.</p><blockquote><strong><em>Important:</em></strong><em> the ACM certificate must be issued or imported in the </em><strong><em>same region as the ALB</em></strong><em> (us-east-1 here). Use DNS validation through Route 53 for easy automatic renewal.</em></blockquote><h3>5. Lambda as the ALB Target</h3><p>Instead of EC2 instances or containers, our target group’s target type is <strong>Lambda function.</strong></p><p><strong>What happens under the hood:</strong></p><ol><li>The ALB receives the HTTPS request and terminates TLS.</li><li>It converts the HTTP request into a <strong>JSON event</strong> and invokes the Lambda function synchronously.</li><li>The function returns a JSON response containing statusCode, headers, and body.</li><li>The ALB converts it back into an HTTP response for the client.</li></ol><p>A minimal Python handler returning an ALB-compatible response:</p><pre>import json<br><br>def lambda_handler(event, context):<br>    return {<br>        &quot;statusCode&quot;: 200,<br>        &quot;statusDescription&quot;: &quot;200 OK&quot;,<br>        &quot;isBase64Encoded&quot;: False,<br>        &quot;headers&quot;: {&quot;Content-Type&quot;: &quot;application/json&quot;},<br>        &quot;body&quot;: json.dumps({<br>            &quot;service&quot;: &quot;orders-service&quot;,<br>            &quot;path&quot;: event.get(&quot;path&quot;),<br>            &quot;method&quot;: event.get(&quot;httpMethod&quot;)<br>        })<br>    }</pre><h3>6. Path-Based Routing: One Domain, Multiple Services</h3><p>Now the most interesting part. Instead of giving every microservice its own domain and load balancer, we use <strong>listener rules</strong> on the HTTPS listener to route by URL path.</p><p>We use two domain-oriented route names:</p><p><strong>/orders</strong>Order management service<br><strong>/payments</strong>Payment processing service</p><h4>Listener rule configuration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*WYArPHIW5KfVdbCdds2wkg.png" /></figure><p>What the client experiences</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*P_M8ZWKcMaHd47EJyBD21w.png" /></figure><h4>Why this pattern works well</h4><ul><li><strong>A single DNS name, certificate, and load balancer</strong> for the entire API, which means lower cost and less operational overhead.</li><li><strong>Independent deployments:</strong> each Lambda is versioned and released on its own.</li><li><strong>Isolation:</strong> a bug or throttling in payments-service does not affect orders-service.</li><li><strong>Easy growth:</strong> adding /inventory means a new function, a new target group, and one new rule.</li></ul><h3>7. Observability: Lambda Logs in CloudWatch</h3><p>Every Lambda function sends logs to <strong>Amazon CloudWatch Logs</strong>. This works through the function’s <strong>execution role</strong>, an IAM role the Lambda service assumes when running your code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8pBm1U-N3T3-ZmbVFA_5A.png" /></figure><p>Trust policy</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;: { &quot;Service&quot;: &quot;lambda.amazonaws.com&quot; },<br>      &quot;Action&quot;: &quot;sts:AssumeRole&quot;<br>    }<br>  ]<br>}</pre><p>Permissions policy</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;Action&quot;: &quot;logs:CreateLogGroup&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:logs:us-east-1:&lt;ACCOUNT_ID&gt;:*&quot;<br>    },<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: [<br>        &quot;logs:CreateLogStream&quot;,<br>        &quot;logs:PutLogEvents&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;arn:aws:logs:us-east-1:&lt;ACCOUNT_ID&gt;:log-group:/aws/lambda/orders-service:*&quot;<br>    }<br>  ]<br>}</pre><p>This follows the <strong>principle of least privilege</strong>. The function may create its own log group, create streams in it, and write events, and nothing else. AWS also provides the managed policy AWSLambdaBasicExecutionRole, which grants these same actions if you prefer not to maintain a custom policy.</p><h3>8. Implementation Checklist</h3><ol><li><strong>Request an ACM certificate</strong> for dev-api.connect.com in us-east-1 and validate it via DNS.</li><li><strong>Create two Lambda functions</strong> (orders-service, payments-service) with execution roles that can write to CloudWatch.</li><li><strong>Create two target groups</strong> of type <em>Lambda function</em> and register one function in each.</li><li><strong>Create the ALB</strong> (internet-facing) in two public subnets across different AZs, with a security group allowing 80 and 443.</li><li><strong>Create the HTTP:80 listener</strong> with a redirect action to HTTPS:443, status code 301.</li><li><strong>Create the HTTPS:443 listener</strong> with the ACM certificate and a default fixed 404 response.</li><li><strong>Add path-based rules</strong> for /orders* and /payments* forwarding to their respective target groups.</li><li><strong>Create the Route 53 alias A record</strong> for dev-api.connect.com pointing to the ALB.</li><li><strong>Test:</strong> call http://dev-api.connect.com/orders and confirm the 301, then verify routing and CloudWatch log entries.</li></ol><h3>Conclusion</h3><p>By combining Route 53, an Application Load Balancer, and Lambda, we get a secure, resilient, and low-maintenance API platform. A permanent HTTP-to-HTTPS redirect and an ACM certificate keep every request encrypted. An ALB across two Availability Zones removes single points of failure. Path-based routing lets one domain front multiple independently deployed services. Least-privilege IAM and CloudWatch Logs keep the whole thing observable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d4ea5d580c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Passed the AWS Solutions Architect Professional Exam with 796: Here’s Exactly How]]></title>
            <link>https://medium.com/@udi.kshp/i-passed-the-aws-solutions-architect-professional-exam-with-796-heres-exactly-how-99bda5a263fe?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/99bda5a263fe</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws-solutions-architect]]></category>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Thu, 29 Oct 2026 14:29:13 GMT</pubDate>
            <atom:updated>2026-10-29T14:29:13.604Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Nearly 10 years of AWS experience, two months of focused preparation, and a reminder that there is always more to learn.</em></p><p>After working with AWS for almost 10 years, I decided to pursue the <strong>AWS Certified Solutions Architect — Professional</strong> certification.</p><p>I had practical experience and was familiar with many AWS services. But preparing for this certification pushed me to look beyond the services I used regularly and think more carefully about architectural decisions.</p><p>Over approximately two months, I combined a self-paced online course, revision of foundational concepts, hands-on practice, and plenty of mock tests.</p><h4><strong>Step 1: Build the foundation first</strong></h4><p>Before starting the Professional course, I went back and studied everything in the <strong>Associate level</strong> syllabus. Even with years of hands-on work, I wanted every basic concept fresh, because the Professional exam assumes you know the fundamentals very well.</p><p>Once I finished, I took Associate-level mock tests and only moved on when I felt confident. If you are newer to AWS, don’t skip this step.</p><h4>Step 2: The Professional-level course</h4><p>I studied for two months<strong> </strong>on a self-paced online platform. Since I already knew AWS well, recorded lectures worked for me. If you are newer to the cloud, a classroom or instructor-led course may suit you better, because it’s much easier to clear doubts and troubleshoot issues with a live trainer.</p><p>The course covered a lot of ground. These were the main areas:</p><p><strong>Well-Architected Framework</strong><br> The thinking behind the exam. Many answers come down to which option best fits the pillars.</p><p><strong>Data engineering services</strong><br> Glue, ETL pipelines, MSK, Managed Service for Apache Flink, Kinesis Data Firehose, Redshift, and more.</p><p><strong>Identity and access management</strong><br> This goes deep: IAM Access Analyzer, IAM Identity Center, Directory Services and how they fit together.</p><p><strong>Multi-account governance</strong><br> AWS Organizations and Control Tower featured heavily.</p><p><strong>Security services</strong><br> Secrets Manager, encryption, access points, WAF, Firewall Manager, CloudTrail, GuardDuty, and a lot more.</p><p><strong>Migration</strong><br> The migration strategies and the services that support them.</p><p><strong>Networking and hybrid connectivity</strong><br> VPC design, VPN, Direct Connect, and connecting to on-premises networks.</p><p><strong>Machine learning and AI services</strong><br> Bedrock, Rekognition, Transcribe, Polly, Translate, and SageMaker.</p><h4>Step 3: Understand what the exam really tests</h4><p>This was my biggest realization: the exam doesn’t test whether you know what a service does. It tests whether you can pick the <em>right</em> service for a specific scenario.</p><ul><li><strong>Questions are long and scenario-based.</strong> Several services may technically work. Only one fits all the stated constraints, whether that’s cost, security, operational overhead, or migration effort.</li><li><strong>Reading carefully is half the battle.</strong> The correct answer must satisfy <em>every</em> requirement in the question, not just most of them.</li><li><strong>Multiple-answer questions are the trickiest.</strong> Often most of the options look correct, and you have to find the combination that fits best.</li></ul><p>So I stopped trying to memorize features and started asking “which service is most suitable in <em>this</em> situation, and why?”</p><p>I also practiced in the AWS console<strong>.</strong> Hands-on work cements the concepts far better than lectures alone.</p><h4>Step 4: Mock tests were my turning point</h4><p>My first mock test scores were around 50%, which was humbling after a decade of AWS work.</p><p>Instead of getting discouraged, I did this:</p><ol><li>Took a mock test</li><li>Reviewed every answer, including the ones I got right</li><li>Worked out <em>why</em> I was wrong, whether I had a concept gap or had misread the question</li><li>Went back to revise those topics</li><li>Repeated</li></ol><p>Within a few weeks my scores climbed from <strong>50% to 80%</strong>. The review step made the difference. Reviewing answers taught me more than the tests themselves.</p><h4>Step 5: Knowing when you are ready</h4><p>I decided to book the exam when I was consistently hitting 80% on mock tests. At that point I knew I was ready, and I was.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gAdyzTPOsi3ZwEpPswZyfw.png" /></figure><p>I passed with a score of <strong>796</strong>.</p><h4>My key takeaways</h4><ul><li>Strong fundamentals matter, so don’t skip Associate-level concepts.</li><li>Experience helps, but it’s no substitute for exam-specific preparation.</li><li>Learn <em>when</em> to use each service, not just <em>what</em> it does.</li><li>Read every question slowly and make sure your answer meets all the requirements.</li><li>Treat mock tests as a learning tool, not just a score check.</li><li>Practice in the console whenever you can.</li></ul><h4>Need help with your preparation?</h4><p>If you are preparing for the AWS Solutions Architect Professional exam and want some guidance, feel free to drop a message or leave a comment. I would be happy to help you on your journey.</p><p>Good luck, and happy learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99bda5a263fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We Moved an Entire Data Centre to AWS in 5 months. Here’s the Honest Story.]]></title>
            <link>https://medium.com/@udi.kshp/we-moved-an-entire-data-centre-to-aws-in-5-months-heres-the-honest-story-403e3760a645?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/403e3760a645</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[content-marketing]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[cloud-migration]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 04:12:21 GMT</pubDate>
            <atom:updated>2026-06-10T04:12:21.719Z</atom:updated>
            <content:encoded><![CDATA[<p>A first-hand account of planning, chaos, late nights, and the moment it all worked.</p><h3>It Started With a Spreadsheet</h3><p>Nobody tells you that one of the most important tools in a cloud migration isn’t Terraform or AWS Console. It’s Excel.</p><p>When the project kicked off, our DevOps and SRE team sat down with one task: figure out exactly what was running in the data center. Not what the documentation said was running. What was <em>actually</em> running.</p><p>We spent the first few weeks doing nothing but discovery. Server by server. We logged every Windows server — its hostname, CPU, RAM, disk, the IIS sites bound to it, the service accounts running on it, the NTFS permissions on shared folders, the SQL instances sitting on it. Every detail went into a spreadsheet that quickly grew to hundreds of rows.</p><p>This wasn’t glamorous work. But it was the foundation everything else was built on. Skipping this step or rushing through it would have cost us weeks later. We knew that.</p><h3>Drawing the Picture Nobody Had Drawn Before</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*2eFeCw7LcFVRq96GvyxVxw.png" /><figcaption>Figure 1 — The entire planning phase</figcaption></figure><p>Once the inventory was done, we opened Miro.</p><p>The as-is architecture diagram was built piece by piece, translating every row in that spreadsheet into a visual. Windows servers, their dependencies, which databases they talked to, which file shares they mounted, which service accounts they ran under. For the first time, the entire system was visible on one canvas.</p><p>We presented it to stakeholders. Then the questions started.</p><p><em>“Why does this service connect to that database?”</em> <em>“Who owns this server? The team was dissolved two years ago.”</em> <em>“This application talks to a file share that three other applications also depend on — did you know that?”</em></p><p>We didn’t always know. That was the point. The diagram went through round after round of revisions. Each review session pulled in software architects and development leads to fill in the gaps that no single team had visibility into. What started as a rough sketch became a precise map of something that had organically grown over years with very little central documentation.</p><p>It was one of the most valuable things we did in the entire project.</p><h3>The Decision: Lift, Shift, and Modernise Just Enough</h3><p>With the inventory solid and the architecture understood, we had to decide how to migrate.</p><p>We weren’t doing a full re-architecture. That would have taken years and cost far more than the business could absorb. But we also weren’t doing a pure lift-and-shift where everything landed in AWS looking exactly as it did on-premises. The migration was an opportunity to make targeted improvements — and we took it where it made sense.</p><p>The workloads split into three clear categories:</p><p><strong>Servers</strong> — Windows EC2 instances with the same capacity as on-premises. Two instances per application behind an Application Load Balancer, spread across two private subnets for high availability. The modernisation here was adding host-header-based routing on the ALB, replacing the old approach of one IP per application with a single load balancer fronting multiple services.</p><p><strong>Databases</strong> — MS SQL Server migrated to SQL Server installed on Windows EC2 instances. RDS was evaluated and ruled out — the licensing model and cost structure didn’t work for this organisation’s setup, and some SQL Server features in use weren’t supported on RDS. Moving to EC2 gave the team full control and kept the licensing approach they already had.</p><p><strong>File shares</strong> — Terabytes of Windows file shares with complex NTFS permission structures moved to Amazon FSx for Windows File Server with ONTAP. FSx speaks SMB natively, honours NTFS permissions, and is fully managed. The applications that mounted those shares didn’t need to change a line of configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*VR13MkOItPax93YqKC0ATw.png" /><figcaption>Figure 2 — Mapping the resources from onprem to AWS</figcaption></figure><h3>UAT First.</h3><p>We made a firm decision early: production migration only happens after UAT has been running in AWS long enough that we trust it completely.</p><p>The UAT environment went first. Infrastructure was built with Terraform from day one — not because someone mandated it, but because we knew production would follow UAT, and we needed every environment to be consistent. A manual setup in UAT followed by a manual setup in production is two chances for human error. Terraform meant: write it once, apply it twice.</p><p>The UAT migration also gave us something invaluable — a rehearsal. Every problem we hit in UAT was a problem we didn’t hit in production. And we hit plenty.</p><p>Application deployment pipelines were modified to deploy to AWS in parallel. A new stage was added to each pipeline pointing at the AWS environment. The on-premises stage stayed active and untouched. This meant that if something went wrong on the AWS side at any point before cutover, development teams could revert to on-premises in minutes. No one was blocked. No one had their work held hostage by the migration.</p><h3>The Parts Nobody Puts in the Blog Post</h3><p>The technical work was hard. The human work was harder.</p><p>Getting buy-in from development teams was a negotiation, not a directive. Every developer we spoke to had the same concern: <em>“This is going to interrupt our sprint. We have a release coming.”</em> They weren’t wrong. Migration work needs their input — environment variables, connection strings, deployment scripts, application-specific configuration. That takes time from people who are already busy.</p><p>We were honest with them. We explained exactly what we needed and when, gave them as much lead time as possible, and made the ask as small as we could. We didn’t always get immediate enthusiasm. But we got cooperation.</p><p>The testing team had the same bandwidth problem. They were already committed to testing an upcoming release. We needed them to validate the UAT environment in AWS. We worked with project management to carve out specific windows — not open-ended “test when you can” requests, but defined timeslots where we would have their focus.</p><p>The four-month deadline was always in the room. Stakeholders referenced it in every meeting. It created pressure that was sometimes useful — it stopped us from over-engineering things — and sometimes difficult, when a genuine problem needed more time than the schedule allowed. Managing that tension honestly, without overpromising, was one of the more difficult parts of the project.</p><h3>The Runbook: Every Step, Every Owner</h3><p>By the time the production cutover date arrived, nothing about it was improvised.</p><p>We had built a runbook over the preceding weeks — a document that listed every single step of the cutover process, in order, with a named owner for each step and an estimated time. Who disables writes to the on-premises database. Who triggers the final data sync. Who validates the file share is accessible from AWS. Who updates the DNS record. Who confirms the ALB is serving traffic. Who calls the all-clear.</p><p>The DNS update was the most visible moment. The API endpoints hadn’t changed — same domain names, same paths. On cutover night, we updated the DNS records to point from the on-premises IP addresses to the new ALB DNS names. Because our TTL had been lowered in the days before, the change propagated quickly. Within minutes, traffic was flowing to AWS.</p><p>The teams tested. The applications responded. The databases were reachable. The file shares mounted. Everything that had worked in UAT worked in production.</p><h3>Done Early</h3><p>We finished ahead of the deadline.</p><p>When we told stakeholders, the reaction was surprise — and then genuine appreciation. Not just for the outcome, but for how it happened. No emergency weekend of work. No midnight rollback. No panicked calls from the business that the application was down.</p><p>The groundwork paid off. The Miro diagrams that went through a dozen revisions paid off. The Terraform that made UAT and production consistent paid off. The runbook that meant nobody had to think under pressure paid off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*tmWcd3vfwd7pUQNo_cF7zw.png" /><figcaption>Figure 3— Full migration phase diagram</figcaption></figure><p>The flow splits into three sections:</p><ul><li><strong>Planning phase</strong> (shared) — Discovery → As-is architecture → Proposed architecture with revisions → Terraform IaC → Pipeline update with a parallel AWS stage</li><li><strong>UAT lane</strong> (left) — The three migration categories in sequence: databases → file shares → applications → testing → sign-off. UAT sign-off gates the production lane.</li><li><strong>Production lane</strong> (right) — Mirrors UAT but adds a DNS cutover step and a runbook-driven final testing phase before the migration is called complete.</li></ul><p>The dashed centre line separates the two environments. The arrow from UAT sign-off crossing into the production lane shows the dependency — production only begins after UAT is validated.</p><p>If I had to re-write the whole thing into advice for anyone about to do the same:</p><p><strong>Do the inventory properly.</strong> You will find things that surprise you.</p><p><strong>Draw the architecture before you build anything.</strong> The conversations it generates are worth more than the diagram itself.</p><p><strong>Migrate UAT first and leave yourself time to learn from it.</strong> Your first migration will have problems. Make sure it’s not the production one.</p><p><strong>Write a runbook.</strong> Every step. Every owner. Cutover night is not the time for improvisation.</p><p><strong>Bring the teams with you.</strong> Development, testing, architects — they’re not obstacles. They’re the people who make it work.</p><p>A data centre doesn’t move to the cloud. The people who understand it move it. Everything else is just infrastructure.</p><p><strong>About the Author</strong><br><a href="https://www.linkedin.com/in/uddipta-kashyap/">Uddipta Kashyap on LinkedIn</a><br>Technical Content Writer | AWS Blogger | Cloud Architect | AWS Certified Professional</p><p>Passionate about simplifying AWS Cloud, Networking, DevOps, and Architecture concepts through practical and beginner-friendly technical content. Reach out to Uddipta for more insights on AWS and other emerging technology topics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=403e3760a645" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DynamoDB, DAX, and Streams: The Complete Guide to Building a Fast, Event-Driven Data Layer on AWS]]></title>
            <link>https://medium.com/@udi.kshp/dynamodb-dax-and-streams-the-complete-guide-to-building-a-fast-event-driven-data-layer-on-aws-cc193feccbd3?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc193feccbd3</guid>
            <category><![CDATA[technical-writing]]></category>
            <category><![CDATA[dynamodb]]></category>
            <category><![CDATA[freelancing]]></category>
            <category><![CDATA[content-writing]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 16:13:40 GMT</pubDate>
            <atom:updated>2026-06-07T16:13:40.970Z</atom:updated>
            <content:encoded><![CDATA[<p>How three interconnected AWS services used together solve the performance, latency, and event-driven problems that take down architectures at scale</p><h3>Introduction</h3><p>Most AWS applications outgrow a plain DynamoDB setup the moment two things happen: read traffic spikes and other services need to react to data changes. DynamoDB alone handles writes and durability well. But it does not solve millisecond-level read latency at high volume, and it does not push changes to other systems automatically.</p><p>That is where DAX and DynamoDB Streams come in. The three services are designed to work together. This article explains each one clearly and then shows you exactly how to connect them into a working solution — with implementation steps you can follow directly.</p><h3>Part 1: The Three Components</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7sn2MeoGtJbyocKqG7_T5Q.png" /><figcaption><strong>Figure 1</strong> — The three services working as one system</figcaption></figure><h4>DynamoDB — The Database</h4><p>DynamoDB is a fully managed NoSQL database. You store items as key-value or document records. Every item is identified by a partition key (and optionally a sort key). DynamoDB scales automatically, replicates across three Availability Zones, and delivers single-digit millisecond read and write latency.</p><p>You do not manage servers, storage, or replication. You define a table, choose a key schema, and start reading and writing.</p><p><strong>When to use it:</strong> Any application that needs predictable performance at any scale — user profiles, product catalogues, session data, IoT device state, order records.</p><h4>DAX — The Cache</h4><p>DAX (DynamoDB Accelerator) is an in-memory cache that sits directly in front of DynamoDB. It uses the same API as DynamoDB, so your application only needs to change the endpoint it connects to; nothing else in your code changes.</p><p>DAX maintains two caches internally:</p><ul><li>An <strong>item cache</strong> for GetItem and BatchGetItem calls</li><li>A <strong>query cache</strong> for Query and Scan calls</li></ul><p>For writes, DAX is write-through — it writes to DynamoDB first, then updates its cache. For reads, it checks its cache first. A cache hit returns in under a millisecond. A cache miss fetches from DynamoDB, stores the result in cache, and returns it.</p><p><strong>When to use it:</strong> When the same DynamoDB items are read repeatedly and you need sub-millisecond response times, or when your read volume is generating high RCU costs.</p><p><strong>When not to use it:</strong> DAX does not help strongly consistent reads (ConsistentRead: true) — those bypass the cache entirely. It also does not reduce write costs.</p><h4>DynamoDB Streams — The Event Log</h4><p>DynamoDB Streams is a time-ordered log of every change made to items in a table. Every PUT, UPDATE, and DELETE produces a stream record. That record can contain the item&#39;s state before the change, after the change, or both — you configure this when enabling Streams on a table.</p><p>Streams retains records for 24 hours. A Lambda function can be attached to the stream as a trigger. Lambda polls the stream automatically and invokes your function with batches of change records.</p><p><strong>When to use it:</strong> When other systems need to react to data changes such as updating a search index, sending notifications, writing to an analytics pipeline, replicating data to another service.</p><p><strong>Key guarantee:</strong> Records for the same partition key are delivered in the exact order the changes occurred. An UPDATE that fires twice on the same item will always arrive in the correct sequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hCqbxNUfEBICkdt9BP_SQA.png" /><figcaption><strong>Figure 2</strong> — DAX read path. A cache hit returns the item in microseconds without touching DynamoDB. On a miss, DAX fetches from DynamoDB, stores the result, and returns it</figcaption></figure><h3>Part 2: The Problem They Solve Together</h3><p>Imagine you are building a product catalogue for an e-commerce store. Three requirements:</p><ol><li>Product pages load fast — even under heavy traffic</li><li>A search bar lets users find products by name or description</li><li>When a product’s price or availability changes, the search index updates automatically</li></ol><p>Without DAX, every product page view hits DynamoDB directly. During a flash sale with 50,000 concurrent users viewing the same 200 popular products, you are paying for 50,000 read capacity units per second against a tiny hot dataset.</p><p>Without Streams, keeping the search index in sync requires your application to write to both DynamoDB and OpenSearch on every update. If one write succeeds and the other fails, they go out of sync permanently.</p><p>With all three services working together, the solution becomes clean:</p><ul><li>The application writes product data once, to DynamoDB through DAX</li><li>Read traffic is absorbed by DAX — the hot products are cached, DynamoDB barely sees the read load</li><li>Every write that lands in DynamoDB automatically appears in Streams</li><li>A Lambda function consumes the stream and updates the OpenSearch index</li><li>The application code does not know OpenSearch exists</li></ul><h3>Part 3: Implementation</h3><h4>Step 1 — Create the DynamoDB table with Streams enabled</h4><pre>aws dynamodb create-table \<br>  --table-name Products \<br>  --attribute-definitions \<br>      AttributeName=productId,AttributeType=S \<br>  --key-schema \<br>      AttributeName=productId,KeyType=HASH \<br>  --billing-mode PAY_PER_REQUEST \<br>  --stream-specification \<br>      StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES</pre><p>NEW_AND_OLD_IMAGES gives your Lambda function both the before and after state of every item. This is useful if you need to compute what changed, not just what the item looks like now.</p><h4>Step 2 — Create the DAX cluster</h4><p>DAX runs inside your VPC. Create a subnet group first, then the cluster:</p><pre>aws dax create-subnet-group \<br>  --subnet-group-name dax-subnet-group \<br>  --subnet-ids subnet-abc123 subnet-def456<br><br>aws dax create-cluster \<br>  --cluster-name products-dax \<br>  --node-type dax.r5.large \<br>  --replication-factor 2 \<br>  --iam-role-arn arn:aws:iam::ACCOUNT_ID:role/DAXRole \<br>  --subnet-group products-dax-subnet-group</pre><p>replication-factor 2 gives you two nodes — one primary, one replica. For production, use 3 for Multi-AZ resilience.</p><p>The IAM role attached to DAX needs dynamodb:GetItem, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:DeleteItem, dynamodb:Query, and dynamodb:Scan on your table.</p><h4>Step 3 — Connect your application to DAX instead of DynamoDB</h4><p>The only code change is the client endpoint. With the Python SDK:</p><pre>import amazon_dax_client<br># Before: plain DynamoDB<br># client = boto3.client(&#39;dynamodb&#39;, region_name=&#39;us-east-1&#39;)<br># After: point at DAX<br>client = amazon_dax_client.AmazonDaxClient(<br>    endpoints=[&#39;products-dax.abc123.dax-clusters.us-east-1.amazonaws.com:8111&#39;],<br>    region_name=&#39;us-east-1&#39;<br>)<br># All DynamoDB API calls work identically<br>response = client.get_item(<br>    TableName=&#39;Products&#39;,<br>    Key={&#39;productId&#39;: {&#39;S&#39;: &#39;prod-001&#39;}}<br>)</pre><h4>Step 4 — Write the Lambda function to consume the stream</h4><pre>import json<br>import boto3<br>from boto3.dynamodb.types import TypeDeserializer<br>deserializer = TypeDeserializer()<br>es_client = boto3.client(&#39;opensearchserverless&#39;)<br>def handler(event, context):<br>    for record in event[&#39;Records&#39;]:<br>        event_type = record[&#39;eventName&#39;]  # INSERT, MODIFY, REMOVE<br>        <br>        if event_type in (&#39;INSERT&#39;, &#39;MODIFY&#39;):<br>            new_image = record[&#39;dynamodb&#39;][&#39;NewImage&#39;]<br>            product = {k: deserializer.deserialize(v) <br>                       for k, v in new_image.items()}<br>            index_product(product)<br>            <br>        elif event_type == &#39;REMOVE&#39;:<br>            product_id = record[&#39;dynamodb&#39;][&#39;Keys&#39;][&#39;productId&#39;][&#39;S&#39;]<br>            delete_from_index(product_id)<br>def index_product(product):<br>    # Write to OpenSearch<br>    print(f&quot;Indexing product: {product[&#39;productId&#39;]}&quot;)<br>def delete_from_index(product_id):<br>    print(f&quot;Removing product: {product_id}&quot;)</pre><h4>Step 5 — Attach the Lambda trigger to the stream</h4><p>First, get the stream ARN from your table:</p><pre>aws dynamodb describe-table --table-name Products \<br>  --query &#39;Table.LatestStreamArn&#39; --output text</pre><p>Then create the event source mapping:</p><pre>aws lambda create-event-source-mapping \<br>  --function-name products-stream-processor \<br>  --event-source-arn arn:aws:dynamodb:us-east-1:ACCOUNT:table/Products/stream/2026-01-01T00:00:00.000 \<br>  --batch-size 100 \<br>  --starting-position LATEST \<br>  --destination-config &#39;{&quot;OnFailure&quot;:{&quot;Destination&quot;:&quot;arn:aws:sqs:us-east-1:ACCOUNT:stream-dlq&quot;}}&#39;</pre><p>Always configure a dead-letter queue destination. If your Lambda function fails repeatedly on a batch, the records will be sent to the DLQ rather than blocking all subsequent stream processing.</p><h4>Step 6 — Test the end-to-end flow</h4><p>Write a product to the table:</p><pre>aws dynamodb put-item \<br>  --table-name Products \<br>  --item &#39;{<br>    &quot;productId&quot;:   {&quot;S&quot;: &quot;prod-001&quot;},<br>    &quot;name&quot;:        {&quot;S&quot;: &quot;Wireless Headphones&quot;},<br>    &quot;price&quot;:       {&quot;N&quot;: &quot;79.99&quot;},<br>    &quot;inStock&quot;:     {&quot;BOOL&quot;: true}<br>  }&#39;</pre><p>What happens next, automatically:</p><ol><li>DAX intercepts the write, forwards it to DynamoDB, updates its own item cache</li><li>DynamoDB commits the write and appends a record to the Streams shard</li><li>Lambda’s event source mapping detects the new record within seconds</li><li>Your Lambda function fires with the stream record containing the new item image</li><li>The function indexes the product into OpenSearch</li></ol><p>Update the price and the same chain fires again — the Lambda receives both the old price and the new price in OldImage and NewImage, and updates the search index accordingly.</p><h3>Configuration Decisions That Matter</h3><p><strong>Streams image type</strong> — NEW_IMAGE is sufficient if your consumer only needs the current state. Use NEW_AND_OLD_IMAGES if you need to know what changed (for audit logs, diff-based sync, or fraud detection that compares before and after values).</p><p><strong>DAX TTL</strong> — the default item cache TTL is 5 minutes and query cache TTL is 1 minute. For data that changes frequently (inventory counts, live prices), lower the item TTL to 30–60 seconds. For stable data (product descriptions, user settings), the default is fine.</p><p><strong>Lambda batch size</strong> — start at 100. If your downstream processing is slow or you need lower latency between a write and the downstream effect, reduce it to 10 or 25. Smaller batches mean more Lambda invocations but faster propagation.</p><p><strong>DAX node type</strong> — your working set (the data that gets read repeatedly) needs to fit in the DAX node’s memory. A dax.r5.large has approximately 13 GB usable. If your hot dataset exceeds that, use a larger node type rather than adding more nodes — DAX does not shard data across nodes.</p><h3>What You Get</h3><p>Once this is running, the application has a single write target (DynamoDB via DAX), a fast read path (DAX cache, falling back to DynamoDB), and an automatic propagation mechanism (Streams → Lambda → downstream). Adding a new consumer — say, a notification service that emails users when a watched product comes back in stock — means adding one more action in the Lambda function. No changes to the application that writes the data.</p><p>The three services are independent but compose cleanly. That is the design intent.</p><p><strong>About the Author</strong><br><a href="https://www.linkedin.com/in/uddipta-kashyap/">Uddipta Kashyap on LinkedIn</a><br>Technical Content Writer | AWS Blogger | Cloud Architect | AWS Certified Professional</p><p>Passionate about simplifying AWS Cloud, Networking, DevOps, and Architecture concepts through practical and beginner-friendly technical content. Reach out to Uddipta for more insights on AWS and other emerging technology topics.</p><p></p><p></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc193feccbd3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your S3 Bucket Went Public.
It Fixed Itself.]]></title>
            <link>https://medium.com/@udi.kshp/your-s3-bucket-went-public-it-fixed-itself-3575445c4dbb?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/3575445c4dbb</guid>
            <category><![CDATA[freelancers]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[freelance]]></category>
            <category><![CDATA[content-writing]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Mon, 01 Jun 2026 04:26:29 GMT</pubDate>
            <atom:updated>2026-06-01T04:26:29.318Z</atom:updated>
            <content:encoded><![CDATA[<p>A real-world walkthrough of building an automated remediation pipeline using AWS Config rules, EventBridge, and SSM Automation so a misconfigured bucket never stays exposed.</p><h4>The Problem Worth Solving</h4><p>It takes under 30 seconds for a misconfigured S3 bucket to be discovered by automated scanners on the internet. A developer pushes a Terraform change, forgets to check the ACL, and your company’s data is exposed. The misconfiguration itself isn’t the disaster, the undetected hours are.</p><p>Traditional approaches rely on human reaction: a CloudTrail alert fires, a Slack message lands, someone logs in and fixes it. That window — sometimes hours — is the threat surface. This article builds a system where AWS Config detects the violation and SSM Automation closes it automatically, with no human in the loop.</p><p>I will wire together four AWS services into a automated remediation pipeline. Every code block here is real and deployable. By the end, you will have a working example you can drop into any AWS account.</p><h4>How the Pipeline Works</h4><p>Five components — A bucket goes public, Config catches it, EventBridge reacts, SSM fixes it, SNS notifies the team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*wCqjvpJqo7uCz9FFDNMJJA.png" /><figcaption>Figure 1 — End-to-end remediation pipeline.</figcaption></figure><h4>The Four Moving Parts</h4><ol><li><strong>AWS Config — Continuous Evaluation </strong><br>The managed rule <strong><em>s3-bucket-public-read-prohibited</em></strong> evaluates every S3 bucket whenever its configuration changes. A bucket with a public ACL or a disabled Block Public Access setting gets flagged NON_COMPLIANT and a compliance change event is emitted.</li><li><strong>EventBridge — Event Routing</strong><br>An EventBridge rule listens for Config Rules Compliance Change events where <strong>newEvaluationResult.complianceType = NON_COMPLIANT</strong> and the rule name matches. This fires immediately when Config publishes the event.</li><li><strong>SSM Automation — The Fix</strong><br>An SSM Automation document receives the bucket name from the EventBridge event, calls <strong><em>aws s3api put-public-access-block</em></strong> with all four flags set to true, then publishes a summary to SNS. No Lambda, no custom code — SSM handles the execution.</li><li><strong>SNS — Human Notification</strong><br>After remediation, the SSM document sends a message to an SNS topic with the bucket name, account ID, timestamp, and action taken. Subscribe your email, Slack webhook, or PagerDuty to this topic.</li></ol><h4>Setting Up the Config Rule</h4><p>I have used AWS Config’s managed rule <em>s3-bucket-public-read-prohibited</em>. It is change-triggered — meaning Config re-evaluates a bucket the moment its configuration changes, not on a schedule. This is critical for fast detection.</p><p>Enable AWS Config in your account first if you haven’t already, ensuring the S3 resource type is recorded. Then create the rule:</p><p><strong>AWS CLI — Create Config Rule</strong></p><pre>aws configservice put-config-rule \<br>  --config-rule &#39;{<br>    &quot;ConfigRuleName&quot;: &quot;s3-public-read-prohibited&quot;,<br>    &quot;Source&quot;: {<br>      &quot;Owner&quot;: &quot;AWS&quot;,<br>      &quot;SourceIdentifier&quot;: &quot;S3_BUCKET_PUBLIC_READ_PROHIBITED&quot;<br>    },<br>    &quot;Scope&quot;: {<br>      &quot;ComplianceResourceTypes&quot;: [&quot;AWS::S3::Bucket&quot;]<br>    },<br>    &quot;ConfigRuleState&quot;: &quot;ACTIVE&quot;<br>  }&#39;</pre><p>Once the rule is active, you can verify it by deliberately toggling a test bucket’s Block Public Access setting off. Within seconds, the rule evaluation fires and the bucket appears as NON_COMPLIANT in the Config console.</p><h4>The SSM Automation Document</h4><p>The SSM document takes a bucket name as input, enables all four Block Public Access settings, then sends a notification. It’s a YAML document with two steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5yWi3IpobaoThuXEirpy0Q.png" /><figcaption>Figure 2 — SSM Automation two steps: block the bucket, then notify the team.</figcaption></figure><p><strong>SSM Automation Document — YAML</strong></p><pre>description: &quot;Auto-remediate S3 public access violation&quot;<br>schemaVersion: &quot;0.3&quot;<br>assumeRole: &quot;{{ AutomationAssumeRole }}&quot;<br><br>parameters:<br>  BucketName:<br>    type: String<br>    description: &quot;S3 bucket name to remediate&quot;<br>  AutomationAssumeRole:<br>    type: String<br>    description: &quot;IAM role ARN for SSM Automation&quot;<br>  SNSTopicArn:<br>    type: String<br>    description: &quot;SNS topic for notifications&quot;<br><br>mainSteps:<br>  # Step 1: Enable all Block Public Access settings<br>  - name: BlockPublicAccess<br>    action: aws:executeAwsApi<br>    inputs:<br>      Service: s3<br>      Api: PutPublicAccessBlock<br>      Bucket: &quot;{{ BucketName }}&quot;<br>      PublicAccessBlockConfiguration:<br>        BlockPublicAcls:       true<br>        IgnorePublicAcls:      true<br>        BlockPublicPolicy:     true<br>        RestrictPublicBuckets: true<br><br>  # Step 2: Notify via SNS<br>  - name: NotifyTeam<br>    action: aws:executeAwsApi<br>    inputs:<br>      Service: sns<br>      Api: Publish<br>      TopicArn: &quot;{{ SNSTopicArn }}&quot;<br>      Subject:  &quot;[AUTO-REMEDIATED] S3 Public Access Blocked&quot;<br>      Message:  &quot;Bucket {{ BucketName }} had public access enabled.<br>SSM Automation has applied BlockPublicAccess.<br>Verify: aws s3api get-public-access-block --bucket {{ BucketName }}&quot;</pre><p>Register this document in SSM via the console or CLI. Note the document ARN — you will need it when configuring the EventBridge target.</p><p><strong>AWS CLI — Register SSM Document</strong></p><pre>aws ssm create-document \<br>  --name  &quot;RemediateS3PublicAccess&quot; \<br>  --type  &quot;Automation&quot; \<br>  --document-format &quot;YAML&quot; \<br>  --content file://remediate-s3.yaml</pre><h4>The EventBridge Rule — The Trigger</h4><p>EventBridge is the glue. It listens for the specific Config compliance change event and extracts the bucket name from the event payload to pass as an input to SSM.</p><p>The event pattern below matches <em>only</em> NON_COMPLIANT evaluations from our specific Config rule. This is intentional as you don’t want SSM firing on COMPLIANT events or on unrelated rules.</p><p><strong>EventBridge — Event Pattern</strong></p><pre>{<br>  &quot;source&quot;: [&quot;aws.config&quot;],<br>  &quot;detail-type&quot;: [&quot;Config Rules Compliance Change&quot;],<br>  &quot;detail&quot;: {<br>    &quot;configRuleName&quot;: [&quot;s3-public-read-prohibited&quot;],<br>    &quot;newEvaluationResult&quot;: {<br>      &quot;complianceType&quot;: [&quot;NON_COMPLIANT&quot;]<br>    }<br>  }<br>}</pre><p>The target is the SSM Automation document. EventBridge uses an input transformer to pluck the bucket name out of the event and map it to the document’s BucketName parameter:</p><p><strong>EventBridge — Input Transformer (maps event → SSM params)</strong></p><pre># Input Path — extract bucket name from the event payload<br>InputPathsMap:<br>  bucket: &quot;$.detail.resourceId&quot;<br><br># Input Template — shape the SSM document input<br>InputTemplate: |<br>  {<br>    &quot;BucketName&quot;:            [&quot;&lt;bucket&gt;&quot;],<br>    &quot;AutomationAssumeRole&quot;:  [&quot;arn:aws:iam::ACCOUNT_ID:role/SSMRemediationRole&quot;],<br>    &quot;SNSTopicArn&quot;:           [&quot;arn:aws:sns:REGION:ACCOUNT_ID:s3-remediation-alerts&quot;]<br>  }</pre><h4>IAM — Two Roles, Least Privilege</h4><p>This pipeline needs two IAM roles: one that lets EventBridge invoke SSM, and one that lets SSM act on S3 and SNS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4dbQx8LI6WORoNK6ln6YpA.png" /><figcaption>Figure 3 — Two least-privilege IAM roles.</figcaption></figure><p><strong>SSM Remediation Role — Inline Policy</strong></p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Sid&quot;: &quot;RemediateS3&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: [<br>        &quot;s3:PutPublicAccessBlock&quot;,<br>        &quot;s3:GetPublicAccessBlock&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;  // scope to specific buckets in production<br>    },<br>    {<br>      &quot;Sid&quot;: &quot;PublishNotification&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: &quot;sns:Publish&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:sns:REGION:ACCOUNT_ID:s3-remediation-alerts&quot;<br>    }<br>  ]<br>}</pre><h4>Testing It End-to-End</h4><p>Create a test bucket, deliberately break it, and watch the pipeline fix it. Use a bucket with no sensitive data for this.</p><ol><li><strong>Create a test bucket</strong></li></ol><pre>aws s3 mb s3://my-config-test-bucket-12345</pre><ol><li><strong>Disable Block Public Access</strong> (triggers the violation)</li></ol><pre>aws s3api delete-public-access-block — bucket my-config-test-bucket-12345</pre><ol><li><strong>Watch Config mark it NON_COMPLIANT</strong><br>Open the AWS Config console → Rules → s3-public-read-prohibited. The bucket should appear under Noncompliant resources within ~30 seconds of the configuration change.</li><li><strong>Verify SSM executed</strong><br>Go to SSM → Automation → Executions. You should see a successful execution of RemediateS3PublicAccess. Both steps should show green.</li><li><strong>Confirm the bucket is locked down</strong></li></ol><pre>aws s3api get-public-access-block — bucket my-config-test-bucket-12345</pre><p>All four values should return true.</p><h4>Extending This Pattern</h4><p>The same pipeline structure — Config rule → EventBridge → SSM — applies to a wide range of compliance violations. With minor modifications, you can auto-remediate unencrypted EBS volumes, security groups with 0.0.0.0/0 on port 22, RDS instances with public accessibility enabled, or IAM users without MFA. One pattern, many applications.</p><p><strong>About the Author</strong><br><a href="https://www.linkedin.com/in/uddipta-kashyap/">Uddipta Kashyap on LinkedIn</a><br>Technical Content Writer | AWS Blogger | Cloud Architect | AWS Certified Professional</p><p>Passionate about simplifying AWS Cloud, Networking, DevOps, and Architecture concepts through practical and beginner-friendly technical content. Reach out to Uddipta for more insights on AWS and other emerging technology topics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3575445c4dbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How AWS Application Load Balancer Powers Scalable Web Applications]]></title>
            <link>https://medium.com/@udi.kshp/how-aws-application-load-balancer-powers-scalable-web-applications-d14b770d5261?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/d14b770d5261</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-architecture]]></category>
            <category><![CDATA[content-writing]]></category>
            <category><![CDATA[aws-load-balancer]]></category>
            <category><![CDATA[content-marketing]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Mon, 25 May 2026 04:10:48 GMT</pubDate>
            <atom:updated>2026-05-25T04:10:48.535Z</atom:updated>
            <content:encoded><![CDATA[<p>Everything you need to know — from listeners and target groups to sticky sessions and content-based routing.</p><h4>Introduction - What is an Application Load Balancer?</h4><p>The AWS Application Load Balancer (ALB) is a Layer 7 (application-layer) load balancer that distributes incoming HTTP/HTTPS traffic across multiple targets — EC2 instances, containers, Lambda functions, or IP addresses — within one or more Availability Zones.</p><p>Unlike the Classic Load Balancer, ALB understands the content of requests, enabling sophisticated routing decisions based on URLs, headers, hostnames, and query parameters. It sits at the core of almost every modern AWS application architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*gxFMfd_TTgZNZSYt2WtCqg.png" /><figcaption><em>Figure 1 — ALB sits between the internet and your targets, distributing traffic across EC2, ECS, and Lambda across multiple Availability Zones.</em></figcaption></figure><h4>Listeners</h4><p>A <strong>listener</strong> is a process that checks for incoming connection requests using a configured protocol and port. You must add at least one listener before the ALB can route traffic. Each listener has a default action and optionally a set of ordered rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*hW6RPZefohKqPlvxFG6DhQ.png" /><figcaption><em>Figure 2 — Each listener has ordered rules. The first matching rule wins; the default action applies when no rule matches.</em></figcaption></figure><h4>Listener Actions</h4><p>-&gt; Forward to Target Group<br>-&gt; Weighted Forward<br>-&gt; Redirect (301/302)<br>-&gt; Fixed Response<br>-&gt; Authenticate (Cognito / OIDC)</p><h4>Target Groups</h4><p>Target groups are logical collections of targets — EC2 instances, ECS tasks, Lambda functions, or IP addresses. Each target group has its own health check configuration and routing algorithm. The ALB routes requests to healthy registered targets using the group’s algorithm.</p><p>🖥️ EC2 Instances: Register individual instances by instance ID. ALB routes traffic to the instance’s primary private IP on the configured port.</p><p>📦IP Addresses: Register any IP — within a VPC, on-premises (via Direct Connect/VPN), or from peered VPCs. Great for containerised workloads.</p><p>⚡Lambda Functions: ALB invokes a Lambda function for each HTTP request. The Lambda must respond with a specific JSON structure. No VPC needed.</p><p>🐳ECS / Fargate: ECS service registers tasks dynamically. Multiple tasks from the same service on one instance are supported via dynamic port mapping.</p><p><strong>Important:</strong> A target can be registered in multiple target groups. Each target group can only use one target type — you cannot mix EC2 instances and IP targets in the same group.</p><h4>Health Checks</h4><p>ALB continuously polls each registered target to determine if it can receive traffic. Unhealthy targets are automatically removed from the rotation until they recover.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*0sJ_MGEGzZjsyKKr8WG21A.png" /><figcaption><em>Figure 3 — ALB polls each target at the configured interval. Only healthy targets receive traffic; draining targets complete in-flight requests.</em></figcaption></figure><h4>Content-Based Routing</h4><p>This is ALB’s killer feature. By inspecting the HTTP/HTTPS request content, ALB can route different requests to entirely different backend services — enabling microservice architectures behind a single load balancer endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*mRW0QKJ0iP9_nBkzJdkLTw.png" /><figcaption>Figure 4 — Content-based routing lets a single ALB front multiple backend services using paths, hosts, headers, and query parameters.</figcaption></figure><h4>Weighted Target Group Routing</h4><p>Forward actions support weights, letting you split traffic between target groups. This is perfect for blue/green deployments and canary testing — shift 5% of traffic to a new version while serving 95% from the stable one, then gradually increase.</p><h4>Routing Algorithms</h4><p>Each target group independently selects which healthy target receives each request using one of three algorithms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*98yokkx2pFum_XO4yJ1MBw.png" /></figure><h4>Sticky Sessions</h4><p>Sticky sessions ensure that requests from the same client always go to the same target during a session. ALB achieves this by injecting a special cookie into the response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*_qIBrGgCxx3vf_uOGsaLKw.png" /><figcaption><em>Figure 5 — ALB inserts a cookie (AWSALB) and pins subsequent requests from that client to the same backend target.</em></figcaption></figure><h4>ACM &amp; TLS/SSL Termination</h4><p>ALB integrates natively with AWS Certificate Manager (ACM) to provide managed TLS termination. ACM handles certificate provisioning, renewal, and deployment automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*8sI7TlcosZa7ERiuG0VVVA.png" /><figcaption><em>Figure 6 — ACM provides free, auto-renewing certificates. ALB terminates TLS and forwards traffic internally over HTTP or HTTPS.</em></figcaption></figure><h4>Key ACM + ALB Capabilities</h4><p>-&gt; SNI — multiple certs per listener<br>-&gt; TLS 1.2 &amp; 1.3 only<br>-&gt; Security policies (ELBSecurityPolicy-2016–08…)<br>-&gt; Wildcard certs (*.example.com)<br>-&gt; End-to-end HTTPS to targets<br>-&gt; Auto-renewal, no downtime</p><h4>Ports &amp; Protocols</h4><p>ALB supports HTTP and HTTPS on the listener side, and HTTP, HTTPS, or gRPC on the target side.</p><h4>Dynamic Port Mapping (ECS)</h4><p>When running multiple ECS tasks on the same EC2 host, each task gets a dynamically assigned host port. ALB and ECS coordinate this automatically — each task registers its unique host-ip:dynamic-port with the target group. No manual port management needed.</p><h4>Advanced Features &amp; Capabilities</h4><p>🛡️WAF Integration — Attach AWS WAF to ALB to inspect and filter requests. Block SQL injection, XSS, bad bots, or custom rules at the edge before requests hit your backend.</p><p>🔐Authenticate Users — Native OIDC and Cognito authentication. ALB can enforce login before forwarding requests to protected targets.</p><p>🔁HTTP Redirects — Redirect HTTP → HTTPS, or any URL to another at the listener level. Supports 301 (permanent) and 302 (temporary) with full path/query passthrough.</p><p>📊Access Logs — Detailed logs to S3: client IP, request time, backend response time, status codes, processed bytes. Essential for compliance and debugging.</p><p>📈CloudWatch Metrics — Built-in metrics: RequestCount, TargetResponseTime, HTTPCode_Target_5XX, UnHealthyHostCount. Set alarms, create dashboards, trigger Auto Scaling.</p><p>⚡Connection Draining — ALB stops sending new requests to a deregistering target but lets in-flight requests complete (up to 3600 seconds).</p><p>🌐Cross-Zone LB — Enabled by default on ALB. Distributes traffic evenly across all healthy targets in all enabled AZs, regardless of which AZ a request entered.</p><p>🔗HTTP/2 &amp; gRPC — ALB natively supports HTTP/2 from clients and gRPC targets. Multiplexing, header compression, and streaming all supported out of the box.</p><p>🏷️Fixed Response — Return a static HTTP response (status code + body) directly from the ALB without hitting any target. Useful for maintenance pages or health probes.</p><h4>Request Tracing</h4><p>ALB adds an X-Amzn-Trace-Id header to every request. Use this with AWS X-Ray to trace requests end-to-end from the load balancer through your microservices.</p><h4>Deletion Protection</h4><p>Enable deletion protection on ALBs serving production traffic to prevent accidental deletion via the console, CLI, or IaC tools.</p><p><strong>About the Author</strong><br><a href="https://www.linkedin.com/in/uddipta-kashyap/">Uddipta Kashyap on LinkedIn</a><br>Technical Content Writer | AWS Blogger | Cloud Architect | AWS Certified Professional</p><p>Passionate about simplifying AWS Cloud, Networking, DevOps, and Architecture concepts through practical and beginner-friendly technical content. Reach out to Uddipta for more insights on AWS and other emerging technology topics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d14b770d5261" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Companies Really
Secure Their AWS Networks]]></title>
            <link>https://medium.com/@udi.kshp/how-companies-really-secure-their-aws-networks-640dca89b8e6?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/640dca89b8e6</guid>
            <category><![CDATA[technical-writing]]></category>
            <category><![CDATA[aws-vpc]]></category>
            <category><![CDATA[content-writer]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[content-creation]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Sat, 16 May 2026 09:45:42 GMT</pubDate>
            <atom:updated>2026-05-16T09:45:42.831Z</atom:updated>
            <content:encoded><![CDATA[<p>NAT Gateways, VPC Peering, VPC Endpoints, and Private Subnet Architecture — the patterns behind every production-grade AWS deployment.</p><p>In <a href="https://medium.com/@udi.kshp/aws-vpc-explained-simply-8071169ed8b7">Part 1</a>, we covered the VPC fundamentals — subnets, route tables, internet gateways, NACLs, and security groups.</p><p>If you haven’t read that yet, start there first.</p><p>In this post, we go deeper into how real production systems at companies are actually designed. The pattern is almost universal- keep everything private, expose only the minimum surface to the internet, and route all internal traffic through secure, controlled paths.</p><h4>Why Resources are provisioned in Private Subnets</h4><p>If you look at how serious companies architect on AWS, you will notice a consistent pattern: EC2 instances, databases, microservices, and application servers never have public IPs. They live entirely in private subnets invisible to the internet.</p><p>Only two things are public-facing:</p><ul><li><strong>An Application Load Balancer (ALB) </strong>— receives user traffic on port 80/443 and forwards it to private instances</li><li><strong>Route 53 </strong>— DNS layer that maps your domain to the ALB</li></ul><p>Everything else — your app servers, your databases, your internal APIs — is completely isolated in private subnets. This dramatically reduces your attack surface. If someone compromises your public-facing layer, they still can’t reach your application servers directly</p><p><strong><em>Real-World Pattern — </em></strong><em>Every compliance-driven company — whether they’re PCI-DSS, HIPAA, or SOC 2 certified — requires this pattern. Regulators expect that sensitive workloads are not directly internet-accessible.</em></p><h4>NAT Gateway — Outbound Internet for Private Resources</h4><p>Your private EC2 instances are isolated from the internet. But here is the problem — they still need to <em>reach out</em> to the internet for things like downloading packages, calling external APIs, pulling Docker images, or sending notifications. How do they do that without a public IP?</p><p>The answer is a <strong>NAT Gateway (Network Address Translation Gateway)</strong>.</p><p>A NAT Gateway sits in a <strong>public subnet</strong> and acts as a proxy. Private instances route their outbound internet traffic through the NAT Gateway, which then forwards it to the internet using its own Elastic IP. Return traffic comes back to the NAT Gateway, which routes it back to the private instance. The private instance is never directly exposed.</p><ul><li><strong>Outbound only</strong> — NAT Gateway allows private resources to initiate connections to the internet. The internet cannot initiate connections <em>into</em> your private subnet through a NAT Gateway.</li><li><strong>Sits in a public subnet </strong>— the NAT Gateway itself needs internet access, so it lives in a public subnet with a route to the IGW</li><li><strong>Private subnet route table</strong> — you add a route: 0.0.0.0/0 → nat-xxxxxxxx in the private subnet&#39;s route table</li><li><strong>One per AZ </strong>— for high availability, deploy a NAT Gateway in each Availability Zone</li><li><strong>Managed by AWS</strong> — no patching, no management, just provision and use</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*MmdbD463_qCwwo3OlRPb-g.png" /><figcaption>Figure 1 — NAT Gateway — Outbound traffic from Private Subnet</figcaption></figure><h4>ALB as the Public Entry Point</h4><p>The Application Load Balancer (ALB) is your company’s front door. It lives in public subnets (typically across multiple AZs for HA), listens on port 443 (HTTPS), and forwards traffic to your private EC2 instances based on listener rules.</p><p>From a security standpoint, the ALB is the only resource with a public IP in your architecture. Your EC2 instances, your RDS databases, your internal microservices — none of them are directly reachable. All traffic has to go through the ALB, which gives you a single point of control for TLS termination, WAF rules, access logging, and routing logic.</p><ul><li><strong>Multi-AZ deployment </strong>— place the ALB in public subnets across at least 2 AZs. AWS automatically distributes traffic across healthy targets</li><li><strong>Target groups</strong> — the ALB forwards to a target group of private EC2 instances (or ECS tasks, Lambda, etc.)</li><li><strong>Health checks</strong> — the ALB pings each instance on a defined path/port. Unhealthy instances are automatically removed from rotation</li><li><strong>TLS termination</strong> — the ALB handles SSL/TLS so your EC2 instances receive plain HTTP internally — simplifying certificate management</li><li><strong>Security group pairing</strong> — the ALB’s security group allows port 443 from the internet; the EC2 security group allows only from the ALB’s security group. The EC2 is unreachable from anywhere else</li></ul><p><strong><em>Route 53 Integration — </em></strong>In production, you never give users the ALB’s DNS name directly. Instead, you create a Route 53 Alias record that maps app.yourcompany.com to the ALB. This also allows you to add Route 53 health checks, failover routing, and latency-based routing on top of your ALB.</p><h4>VPC Peering — Connecting Two VPCs Privately</h4><p>As companies grow, they often end up with multiple VPCs — one for production, one for staging, one for a shared services VPC (logging, monitoring, CI/CD), or VPCs across different AWS accounts (multi-account strategy).</p><p>How do these VPCs talk to each other without traffic going over the public internet?</p><p>The answer is <strong>VPC Peering</strong>. A VPC peering connection creates a direct private network link between two VPCs, allowing instances to communicate using private IP addresses as if they were in the same network.</p><ul><li><strong>Private routing only</strong> — traffic stays on AWS’s internal network. It never touches the public internet</li><li><strong>Cross-account and cross-region</strong> — you can peer VPCs in different AWS accounts and different regions</li><li><strong>No transitive peering —</strong> if VPC A peers with VPC B, and VPC B peers with VPC C, VPC A cannot talk to VPC C through VPC B. Each connection must be explicitly created</li><li><strong>Non-overlapping CIDRs</strong> — the two VPCs cannot have overlapping IP ranges. This is the most common planning mistake</li><li><strong>Route tables must be updated</strong> — after creating the peering connection, you must add routes on both sides pointing to the other VPC’s CIDR via the peering connection</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*3evH55s-jlxlI9rMUI3gag.png" /><figcaption>Figure 2 — VPC Peering: Private Cross VPC Communication</figcaption></figure><h4>VPC Endpoints — AWS Services Without the Internet</h4><p>Here’s a scenario that catches many people off guard: your private EC2 instance needs to upload files to S3, or query DynamoDB. Without a VPC Endpoint, that traffic would go through the NAT Gateway, out to the internet, hit the public S3 endpoint, and come back — adding latency and cost.</p><p>A VPC Endpoint is a private connection between your VPC and AWS services that keeps traffic entirely within the AWS network. No IGW, no NAT Gateway, no internet.</p><p>There are two types:</p><p><strong>Gateway Endpoint</strong></p><ul><li>Supports S3 and DynamoDB only</li><li>Free to use — no hourly charge</li><li>Attached to route tables, not ENIs</li><li>Add a route: pl-xxxxxxxx → vpce-xxx</li><li>Best choice for S3/DynamoDB access from private subnets</li></ul><p><strong>Interface Endpoint</strong></p><ul><li>Supports most AWS services (SSM, Secrets Manager, ECR, SQS, SNS, etc.)</li><li>Costs ~$0.01/hr per AZ + data transfer</li><li>Uses an ENI with a private IP in your subnet</li><li>Traffic routed via AWS PrivateLink</li><li>Required for fully air-gapped private deployments</li></ul><h4>The Full Production Architecture</h4><p>Now let’s put it all together. This is what a real, production-grade AWS architecture looks like for a company running a web application — with all resources in private subnets, multi-AZ deployment, VPC peering to a shared services VPC, and VPC endpoints for AWS service access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*VP6ddjSW-Z8OSj3NBXi2fA.png" /><figcaption>Figure 3 — Full Production Architecture: Multi-AZ, Private Subnets, ALB, NAT, Peering &amp; Endpoints</figcaption></figure><h4>Traffic Flow Walkthroughs</h4><p>Let’s trace exactly how traffic moves through this architecture for three different scenarios.</p><h4>Scenario A — Inbound user request</h4><ol><li>User hits app.company.com</li></ol><p>Route 53 resolves the Alias record to the ALB’s DNS name. No EC2 IP is ever exposed to DNS.</p><p>2. Traffic hits the Internet Gateway</p><p>IGW routes the request to the ALB’s public listener (port 443). TLS is terminated at the ALB using an ACM certificate.</p><p>3. ALB forwards to a healthy target</p><p>The ALB checks its target group, picks a healthy EC2 instance (across AZs), and forwards the request on port 80 via the private subnet. The EC2 instance has no public IP — only the ALB can reach it, because the EC2 security group only allows traffic from the ALB’s security group.</p><p>4. App queries RDS / ElastiCache</p><p>The EC2 instance connects to RDS on port 3306 and ElastiCache on port 6379 — all within the private network. The DB security group only allows traffic from the app’s security group.</p><p>5. Response returns to user</p><p>The response travels back through ALB → IGW → user. The entire app infrastructure remains invisible to the public internet throughout.</p><h4>Scenario B — EC2 instance downloads a software package</h4><ol><li>EC2 initiates outbound request</li></ol><p>The private EC2 instance runs yum update or calls an external API. It has no public IP, so it consults its route table: 0.0.0.0/0 → nat-gw.</p><p>2. Traffic reaches NAT Gateway</p><p>The NAT Gateway in the same AZ receives the traffic. It replaces the source IP (private 10.0.x.x) with its own Elastic IP and forwards the request through the IGW to the internet.</p><p>3. Return traffic comes back</p><p>The external server responds to the NAT Gateway’s Elastic IP. The NAT Gateway translates the destination back to the private EC2 IP and delivers the response. The EC2 instance gets its package — the internet never initiated the connection.</p><h4>Scenario C — EC2 fetches a secret from Secrets Manager</h4><ol><li>EC2 calls the Secrets Manager API</li></ol><p>The application calls secretsmanager.ap-south-1.amazonaws.com to fetch a DB password at startup.</p><p>2. Route resolves to VPC Endpoint ENI</p><p>Because a Secrets Manager Interface Endpoint exists in the VPC, the DNS resolves to the endpoint’s private IP. Traffic routes directly to AWS — no NAT Gateway, no internet.</p><p>3. Secret returned privately</p><p>Secrets Manager responds through the PrivateLink connection. The secret never traverses the public internet. No NAT Gateway cost incurred. No internet exposure.</p><h4>Key Takeaways</h4><p>Here’s the mental model to carry forward when designing any production AWS architecture:</p><ol><li>Private subnets for everything</li><li>ALB = only public entry point</li><li>NAT GW = outbound only</li><li>VPC Endpoints = zero-cost AWS service access</li><li>VPC Peering = private cross-VPC routing</li><li>Route 53 Alias = production DNS</li><li>NAT GW per AZ = true HA</li><li>Security Groups = least-privilege always</li></ol><p>The pattern is the baseline architecture used by thousands of companies running serious production workloads on AWS. Once you understand how these pieces connect, you can read any architecture diagram and immediately understand the intent behind each design decision.</p><p><strong>About the Author</strong><br><a href="https://www.linkedin.com/in/uddipta-kashyap/">Uddipta Kashyap on LinkedIn</a><br>Technical Content Writer | AWS Blogger | Cloud Architect | AWS Certified Professional</p><p>Passionate about simplifying AWS Cloud, Networking, DevOps, and Architecture concepts through practical and beginner-friendly technical content. Reach out to Uddipta for more insights on AWS and other emerging technology topics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=640dca89b8e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS VPC Explained Simply]]></title>
            <link>https://medium.com/@udi.kshp/aws-vpc-explained-simply-8071169ed8b7?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/8071169ed8b7</guid>
            <category><![CDATA[blogging]]></category>
            <category><![CDATA[content-writing]]></category>
            <category><![CDATA[aws-vpc]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-networking]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Wed, 13 May 2026 04:37:56 GMT</pubDate>
            <atom:updated>2026-05-13T04:37:56.299Z</atom:updated>
            <content:encoded><![CDATA[<p>Subnets, Route Tables, Internet Gateways, NACLs, and Security Groups — without the confusion.</p><p>If you’ve just started learning AWS or you’re preparing for the Solutions Architect Associate exam, <strong>VPC (Virtual Private Cloud)</strong> is probably one of the first concepts that you need to learn.</p><p>VPC comes with a pile of terms that all sound similar: subnets, route tables, internet gateways, NACLs, security groups. In this post, I am going to break each one down with simple analogies, clean diagrams, and enough detail that you’ll finish reading feeling like you actually get it.</p><h4>What is a VPC?</h4><p>Think of AWS as a massive city. Inside that city, you can rent a private plot of land — with your own walls, your own roads, and your own rules. That private plot is your <strong>VPC</strong>.</p><p>A VPC is a logically isolated virtual network inside AWS where you launch your resources — EC2 instances, RDS databases, Lambda functions, and more. You define its IP address range, control who gets in, and decide how traffic flows.</p><h4><strong><em>Key Fact</em></strong></h4><p><em>Every AWS account comes with a </em><strong><em>default VPC </em></strong><em>in each region, pre-configured and ready to use. But in real production architectures, you always create a custom VPC with your own CIDR blocks and subnet layout.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzPtQ0gR1UXisPADRJRZrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W5PlvUOuOrC0em5Pjb5jSw.png" /><figcaption>Figure 1 — VPC High Level Overview</figcaption></figure><h4>Subnets — Public vs Private</h4><p>A <strong>subnet</strong> is a segment of your VPC’s IP address range. When you create a VPC with a CIDR block like 10.0.0.0/16, you carve it into smaller subnets — like 10.0.1.0/24 for the public subnet and 10.0.2.0/24 for the private subnet.</p><p>The difference between public and private comes down to the <strong>route table</strong> associated with the subnet. If a subnet’s route table has a route to an Internet Gateway, it’s public. If it doesn’t, it’s private.</p><ul><li><strong>Public Subnet</strong> — Resources here can communicate directly with the internet. Use it for web servers, load balancers, NAT gateways.</li><li><strong>Private Subnet</strong> — Resources here have no direct internet access. Use it for databases, app servers, internal microservices.</li><li>Subnets are always <strong>tied to a single Availability Zone</strong>. To build HA systems, create subnets in multiple AZs.</li></ul><h4><strong><em>SA Exam Tip</em></strong></h4><p><em>A common exam question: “What makes a subnet public?” The answer is not</em><strong><em> </em></strong><em>just having public IPs — it’s having a route to an Internet Gateway in its route table.</em></p><h4>Internet Gateway (IGW)</h4><p>The <strong>Internet Gateway</strong> is the gateway between your VPC and the public internet. It’s a horizontally scalable, redundant, and highly available AWS-managed component. You don’t manage it — you just create it and attach it to your VPC.</p><ul><li>One IGW per VPC (you can’t attach two)</li><li>Enables both <strong>inbound</strong> (internet → your instance) and <strong>outbound</strong> (your instance → internet) traffic</li><li>Instances in a public subnet also need a <strong>public IP or Elastic IP</strong> to be reachable from the internet</li><li>No IGW = No internet access, regardless of security group rules</li></ul><h4>Route Tables — The Traffic Director</h4><p>Every subnet in a VPC is associated with a <strong>route table</strong>. A route table is a set of rules that tell network traffic where to go, based on its destination IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wOqqc7gzX4TeokxP9T2OOQ.png" /><figcaption>Figure 2 — Route Table: Public vs Private</figcaption></figure><p>Every VPC has a <strong>main route table</strong> automatically associated with all subnets unless you explicitly associate a custom one. The local route (e.g., 10.0.0.0/16 → local) is always present and allows all resources within the VPC to communicate with each other freely.</p><h4>Network ACLs (NACLs) — Subnet-Level Firewall</h4><p>A <strong>Network Access Control List</strong> (NACL) is a stateless firewall that sits at the subnet boundary. It evaluates traffic entering or leaving a subnet against a numbered list of rules.</p><ul><li>Rules are evaluated in order from lowest to highest rule number — the first match wins</li><li>NACLs are stateless: if you allow inbound traffic on port 80, you must also explicitly allow outbound return traffic</li><li>The default NACL per VPC allows all inbound and outbound traffic</li><li>Custom NACLs by default deny everything until you add allow rules</li><li>NACLs support both Allow and Deny rules — unlike Security Groups</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6fLSJXcjc1t0gBCDiBdOw.png" /><figcaption>Figure 3 — NACL: Stateless Subnet Firewall</figcaption></figure><h4>Security Groups — Instance-Level Firewall</h4><p>While NACLs guard the subnet boundary, <strong>Security Groups</strong> are the firewall attached directly to individual resources — EC2 instances, RDS databases, Lambda functions, and more.</p><p>The critical difference from NACLs: Security Groups are <strong>stateful</strong>. If you allow inbound traffic on port 80, the return traffic is automatically allowed — no separate outbound rule needed.</p><ul><li>Security Groups only have Allow rules — there are no explicit Deny rules</li><li>Traffic not matching any allow rule is implicitly denied</li><li>Default: all inbound traffic is denied, all outbound traffic is allowed</li><li>You can reference other security groups in rules — useful for internal service-to-service communication</li><li>One instance can have up to 5 security groups attached simultaneously</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n2bwyCdICoopO83FvvEuCw.png" /><figcaption>Figure 4 — Security Groups: Stateful Instance Firewall</figcaption></figure><h4>Putting It All Together</h4><p>Let’s see how all these components work together in a real-world 2-tier architecture — a web application with a public-facing EC2 web server and a private RDS database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bPoZ-qc1vN1ccWuejcRYBQ.png" /><figcaption>Figure 5 — Full VPC Architecture: Web + Database Tier</figcaption></figure><p>Here’s the exact path a user’s HTTP request takes in this architecture:</p><ol><li>User types your URL → DNS resolves to the EC2’s Elastic IP</li><li>Traffic hits the <strong>Internet Gateway</strong> attached to your VPC</li><li>IGW checks the <strong>Route Table</strong> → routes to the public subnet</li><li><strong>NACL</strong> on the public subnet evaluates the inbound rule — port 80 is allowed</li><li><strong>Security Group</strong> on the EC2 instance checks — port 80 from 0.0.0.0/0 is allowed</li><li>Request reaches the EC2 web server, which queries RDS on port 3306 via the internal network</li><li>RDS Security Group only allows port 3306 from the Web SG — not from the internet</li></ol><h4>Key Takeaways</h4><p>You’ve just walked through the core building blocks of AWS networking. Here’s what to remember:</p><ol><li>VPC = Your private network</li><li>Subnets = Network segments</li><li>IGW = Internet gateway</li><li>Route Table = Traffic director</li><li>NACL = Stateless subnet firewall</li><li>Security Group = Stateful instance firewall</li></ol><p>The pattern to remember:</p><p><strong>Internet → IGW → Route Table → NACL → Security Group → Your Resource.</strong></p><p>Each layer gives you a checkpoint to control and secure your traffic.</p><p>Once you’re comfortable with these fundamentals, the next logical step is understanding <strong>NAT Gateways</strong> (for private subnet outbound internet access), <strong>VPC Peering</strong>, and <strong>VPC Endpoints</strong> — all of which build directly on what you’ve learned here.</p><p><strong>About the Author</strong><br> <a href="https://www.linkedin.com/in/uddipta-kashyap/">Uddipta Kashyap on LinkedIn</a><br> Technical Content Writer | AWS Blogger | Cloud Architect | AWS Certified Professional</p><p>Passionate about simplifying AWS Cloud, Networking, DevOps, and Architecture concepts through practical and beginner-friendly technical content. Reach out to Uddipta for more insights on AWS and other emerging technology topics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8071169ed8b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Host Your Website on AWS: Complete Guide to S3, CloudFront & Route 53]]></title>
            <link>https://medium.com/@udi.kshp/host-your-website-on-aws-complete-guide-to-s3-cloudfront-route-53-02cd80f1c9f6?source=rss-2d9a6a5898ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/02cd80f1c9f6</guid>
            <category><![CDATA[website-hosting]]></category>
            <category><![CDATA[aws-cloudfront]]></category>
            <category><![CDATA[technical-writing]]></category>
            <category><![CDATA[aws-architecture]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Uddipta Kashyap]]></dc:creator>
            <pubDate>Sun, 10 May 2026 15:30:58 GMT</pubDate>
            <atom:updated>2026-05-10T15:30:58.986Z</atom:updated>
            <content:encoded><![CDATA[<p>Step-by-step tutorial to deploy a fast, secure, and globally distributed static website on AWS — no server management required</p><h3>Introduction</h3><p>Most developers still pay ₹300–500/month for shared hosting. Slow servers. Limited bandwidth. Downtime during traffic spikes.</p><p>There is a better way — and it costs less.</p><p>Amazon S3 stores your website files for pennies. CloudFront caches them on 500+ edge locations worldwide. Route 53 routes your custom domain to it all. The result is a website that loads faster than 99% of shared hosted sites, scales to millions of visitors automatically, and costs ₹200–400 per month.</p><p>This is the exact infrastructure powering some of the world’s largest websites. And you can set it up in 30 minutes.</p><h4>What You Will Build</h4><p>By the end of this guide, you will have:</p><ul><li>Your website files hosted on <strong>Amazon S3</strong></li><li>Global CDN caching via <strong>Amazon CloudFront</strong></li><li>Custom domain routing through <strong>Amazon Route 53</strong></li><li>Free HTTPS certificate via <strong>AWS Certificate Manager</strong></li><li>Automatic HTTP → HTTPS redirect</li></ul><p><strong>The complete architecture looks like this:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GRWv3A4noy2U2F7aCiPbPA.png" /><figcaption>Figure 1 — Architecture Diagram</figcaption></figure><p>Before touching the console, we need to understand what each service actually does. This is what most people skip and it’s what makes the difference between someone who blindly follows steps and someone who can debug problems and design for scale.</p><p><strong>Amazon S3</strong> is object storage. You upload files. AWS stores them across multiple data centres. You pay only for what you store and serve.</p><p><strong>Amazon CloudFront</strong> is a Content Delivery Network. It takes your files from S3 and copies them to edge locations around the world. When a user in Tokyo visits your site, CloudFront serves the cached copy from Tokyo — not from your S3 bucket in Mumbai. This is why response times drop from 400ms to 40ms.</p><p><strong>Amazon Route 53</strong> is DNS. It translates your domain name (example.com) into an IP address that browsers can connect to. It also does health checks, failover routing, and latency-based routing — but for this guide, we&#39;re using it simply to point your domain at CloudFront.</p><p><strong>AWS Certificate Manager</strong> issues free SSL/TLS certificates. This is what puts the padlock in your browser and enables HTTPS. On traditional hosting you pay ₹1,000–5,000/year for an SSL certificate. On AWS it is completely free and auto-renews.</p><h4>Prerequisites</h4><p>Before starting, make sure you have:</p><ul><li>An AWS account (free tier is fine)</li><li>A static website ready to deploy (index.html + CSS/JS files)</li><li>A domain name (purchased from Route 53, GoDaddy, Namecheap, or any registrar)</li><li>Basic familiarity with the AWS console</li></ul><p><strong>AWS Free Tier coverage:</strong></p><ul><li>S3: 5GB storage free for 12 months</li><li>CloudFront: 100 GB data transfer free per month</li><li>Route 53: $0.50/month</li></ul><h3>Step 1 — Create and Configure Your S3 Bucket</h3><h4>1.1 Create the bucket</h4><ol><li>Open AWS Console → Search <strong>S3</strong> → Click <strong>Create bucket</strong></li><li><strong>Bucket name:</strong> Use your exact domain name (e.g., example.com)</li><li><strong>AWS Region:</strong> Choose the region closest to your primary audience</li></ol><ul><li>India → ap-south-1 (Mumbai)</li><li>Southeast Asia → ap-southeast-1 (Singapore)</li><li>US → us-east-1 (N. Virginia)</li></ul><p>4. <strong>Block Public Access settings:</strong> Check Block all public access</p><p>5. Leave all other settings as default.</p><p>6. Click <strong>Create bucket</strong></p><h4>1.2 Enable static website hosting</h4><ol><li>Click your bucket name to open it</li><li>Click the <strong>Properties</strong> tab</li><li>Scroll to the bottom — find <strong>Static website hosting</strong></li><li>Click <strong>Edit</strong></li><li>Select <strong>Enable</strong></li><li><strong>Hosting type:</strong> Host a static website</li><li><strong>Index document:</strong> index.html</li><li><strong>Error document:</strong> error.html (create a simple one if you don&#39;t have it)</li><li>Click <strong>Save changes</strong></li></ol><p>Your bucket now has a website endpoint URL:</p><p><a href="http://example.com.s3-website.ap-south-1.amazonaws.com/"><em>http://example.com.s3-website.ap-south-1.amazonaws.com</em></a></p><h4>1.3 Upload your website files</h4><ol><li>Click the <strong>Objects</strong> tab</li><li>Click <strong>Upload</strong></li><li>Drag and drop all your files: index.html, style.css, script.js, /images folder</li><li>Click <strong>Upload</strong></li></ol><p><strong>How S3 looks after this step:</strong></p><pre>S3 Bucket: example.com<br>    ├── index.html          ← Root page<br>    ├── about.html<br>    ├── style.css<br>    ├── script.js<br>    └── images/<br>        ├── logo.png<br>        └── hero.jpg</pre><h3>Step 2: Set Up CloudFront Distribution</h3><p>CloudFront is AWS’s global CDN. It caches your content on 500+ edge locations worldwide so users get blazing-fast responses.</p><h4>2.1 Create a CloudFront distribution</h4><ol><li>Go to <strong>AWS Console</strong> → <strong>CloudFront</strong> → <strong>Create distribution</strong></li><li>For <strong>Origin domain</strong>, select your S3 bucket (it should show as mywebsite.com.s3.ap-south-1.amazonaws.com)</li><li>For <strong>Origin access</strong>, select <strong>Origin access control settings (recommended)</strong></li><li>Click <strong>Create control setting</strong> (name it anything, e.g., S3-OAC)</li><li>Click <strong>Create</strong></li></ol><h4>2.2 Configure caching behaviour</h4><p>Under <strong>Default cache behaviour:</strong></p><ol><li><strong>Viewer protocol policy</strong>: Select Redirect HTTP to HTTPS (always use HTTPS)</li><li><strong>Allowed HTTP methods</strong>: Keep default (GET, HEAD)</li><li><strong>Cache policy</strong>: Select Managed-CachingOptimized</li><li><strong>Compress objects automatically</strong>: <strong>ON</strong> (makes HTML/CSS/JS smaller)</li></ol><h4>2.3 Create the distribution</h4><p>Scroll to bottom → Click <strong>Create distribution</strong></p><p>AWS will deploy your distribution globally. This takes <strong>5–10 minutes</strong>. You’ll see status: “Deploying…” then “Enabled”.</p><p><strong>Note:</strong> CloudFront gives you a domain like d12345abcde.cloudfront.net. Your users <strong>will not</strong> use this directly — Route 53 will alias it to your domain name.</p><h4>2.4 Update S3 bucket policy</h4><p>CloudFront can only access S3 through an Origin Access Identity. AWS automatically creates the policy during distribution creation, but you need to <strong>copy it to your S3 bucket</strong>:</p><ol><li>Go back to <strong>CloudFront</strong> → your distribution → <strong>Origins</strong></li><li>Click your S3 origin → <strong>Copy policy</strong></li><li>Go to <strong>S3</strong> bucket → <strong>Permissions</strong> → <strong>Bucket policy</strong></li><li>Paste the policy and <strong>Save</strong></li></ol><p>The policy looks like this:</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;AllowCloudFrontServicePrincipal&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: {<br>                &quot;Service&quot;: &quot;cloudfront.amazonaws.com&quot;<br>            },<br>            &quot;Action&quot;: &quot;s3:GetObject&quot;,<br>            &quot;Resource&quot;: &quot;arn:aws:s3:::example.com/*&quot;,<br>            &quot;Condition&quot;: {<br>                &quot;StringEquals&quot;: {<br>                    &quot;AWS:SourceArn&quot;: &quot;arn:aws:cloudfront::123456789:distribution/ABCDE12345&quot;<br>                }<br>            }<br>        }<br>    ]<br>}</pre><p><strong>What this policy says:</strong> CloudFront (and ONLY CloudFront) can read files from this bucket. No one else can access S3 directly.</p><h3>Step 3 — Set Up HTTPS with AWS Certificate Manager</h3><h3>You said: from these article and contents, remove any references to cloud pathway academy .</h3><p>from these article and contents, remove any references to cloud pathway academy . Because I dont want to mention that in my contents anymore. rather it should be from an individual person. Remove from the diagrams as well</p><p>6 May</p><h3>Claude responded: Understood — personal brand over company brand for your content going forward.</h3><p>Understood — personal brand over company brand for your content going forward. Let me rebuild all 3 diagrams with your personal identity instead.</p><p>A quick question first:</p><p>2 / 2</p><h3>You said: Uddipta Kashyap | Cloud Architect | Technical Content Writer</h3><p>Uddipta Kashyap | Cloud Architect | Technical Content Writer</p><p>19:37</p><h3>Claude responded: Got it.</h3><p>Got it. Rebuilding all 3 diagrams now with your personal identity.</p><p>Ran 4 commands</p><p>Ran 4 commands</p><p>ude responded: Got it.</p><p>Got it. Rebuilding all 3 diagrams now with your personal identity.</p><p>Ran 4 commands</p><p>Ran 4 commands</p><p>This policy tells S3: “Only CloudFront can access these files. Block direct access.”</p><h3>Step 3: Set Up Route 53 and Connect Your Domain</h3><h3>Step 3: Set Up Route 53 and Connect Your Domain</h3><h4>3.1 Register your domain</h4><ol><li>Go to <strong>Route 53</strong> → <strong>Registered domains</strong> → <strong>Register domain</strong></li><li>Search for domain (e.g., mywebsite.com)</li><li>Click <strong>Check</strong> → <strong>Add to cart</strong> → <strong>Continue</strong></li><li>Fill in contact info</li><li>Click <strong>Complete registration</strong></li><li>Wait 5–10 minutes for activation</li></ol><h4>3.2 Create Route 53 hosted zone</h4><p>If you transferred domain to Route 53, it’s automatic. If you kept your registrar:</p><ol><li>Go to <strong>Route 53</strong> → <strong>Hosted zones</strong> → <strong>Create hosted zone</strong></li><li>Domain name: example.com</li><li>Type: <strong>Public hosted zone</strong></li><li>Click <strong>Create</strong></li></ol><h4>3.3 Create alias record pointing to CloudFront</h4><ol><li>In Route 53 hosted zone, click <strong>Create record</strong></li><li>Leave <strong>Record name</strong> empty (this makes it point to root domain example.com)</li><li>Record type: <strong>A</strong></li><li>Toggle <strong>Alias</strong> → <strong>ON</strong></li><li>Alias target: Select your <strong>CloudFront distribution</strong> (it should auto-populate)</li><li>Routing policy: <strong>Simple routing</strong></li><li>Click <strong>Create records</strong></li></ol><p><strong>That’s it.</strong> Your domain example.com now routes to CloudFront, which routes to S3.</p><h3>Step 4: Set Up HTTPS with SSL Certificate</h3><p>Your website should use HTTPS (secure connection). AWS gives you a <strong>free SSL certificate through AWS Certificate Manager</strong>.</p><h4>4.1 Request a certificate</h4><ol><li>Go to <strong>AWS Certificate Manager</strong> → <strong>Request certificate</strong></li><li>Domain names: Add example.com and *.example.com (wildcard for subdomains)</li><li>Validation method: <strong>DNS validation</strong> (faster)</li><li>Click <strong>Request</strong></li></ol><p>AWS sends you records to add to Route 53 (it might do this automatically).</p><h4>4.2 Validate certificate</h4><ol><li>If Route 53 integration didn’t auto-validate:</li></ol><ul><li>Go to the certificate → click the domain → <strong>Create records in Route 53</strong></li><li>AWS automatically adds validation records to Route 53</li></ul><p>2. Wait <strong>5–10 minutes</strong> for validation (check status in ACM)</p><h4>4.3 Attach certificate to CloudFront</h4><ol><li>Go to <strong>CloudFront</strong> → your distribution → <strong>Edit</strong></li><li>Under <strong>Custom SSL certificate</strong>, select your new ACM certificate</li><li>Scroll down → <strong>Save changes</strong></li></ol><p>CloudFront now serves your site over HTTPS. Any HTTP request automatically redirects to HTTPS.</p><h3>Step 5: Test Your Website</h3><p>Open your browser and test:</p><p>✅ http://example.com → redirects to https://example.com ✓ ✅ Website loads (with all images, CSS, JavaScript) ✅ No security warnings</p><p><strong>Check page speed:</strong></p><ul><li>Use Chrome DevTools → <strong>Network</strong> tab</li><li>First request (cache miss): ~200–400ms</li><li>Reload (cache hit): ~20–50ms</li><li>You just made your site 10x faster for most users globally</li></ul><h3>Final Thought</h3><p>You just replaced a traditional web server with three managed AWS services. No server to patch. No Apache to configure. No downtime during traffic spikes.</p><p>Your website now loads from the edge location closest to every visitor on Earth. It scales automatically. It costs less than shared hosting. And it uses the same infrastructure that powers Netflix, Airbnb, and the AWS console itself.</p><p>That is production-grade cloud architecture — and you built it in 30 minutes.</p><p>Need AWS infrastructure documented for your company? I write technical blog posts, architecture guides, and step-by-step tutorials for cloud companies and startups.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02cd80f1c9f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>