{"id":3418,"date":"2026-05-05T02:07:00","date_gmt":"2026-05-04T18:07:00","guid":{"rendered":"https:\/\/ichwanchandra.com\/blog\/?p=3418"},"modified":"2026-12-02T01:09:03","modified_gmt":"2026-12-01T17:09:03","slug":"aws-solutions-architect-project-cost-optimization-part-1","status":"publish","type":"post","link":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/","title":{"rendered":"AWS Solutions Architect Project (Cost Optimization Pillar) &#8211; Automated Cost Management &#8211; Part 1"},"content":{"rendered":"\n<p>As the good AWS architecture has to be efficient in terms of operational cost, in this project we&#8217;ll simulate on how to build a workflow to detect unused resources, recommend cleanup actions, and remove them safely with proper governance. We&#8217;ll start by deploying a wasteful AWS environment built via CloudFormation template and fix the cost leaking that caused by it.<\/p>\n\n\n\n<p>To ensure this project run properly, we need to allow the created resources to at least running for about 1-2 hours so <strong>AWS CostExplorer<\/strong> and <strong>AWS Budgets<\/strong> has enough time to collect usage and cost metrics and <strong>AWS Trusted Advisor<\/strong> will be able to generate recommendations too<\/p>\n\n\n\n<p>Below is the architecture diagram for this project:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/10\/cost-optimization.drawio.png\" alt=\"\" class=\"wp-image-3424\"\/><\/figure>\n\n\n\n<p>Below is the explanation of above diagram:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>CloudFormation deploys monitoring, cost, and automation setup<\/li>\n\n\n\n<li>CloudWatch gathers usage metrics<\/li>\n\n\n\n<li>Cost Explorer identifies unused resources<\/li>\n\n\n\n<li>Systems Manager receives findings and prepares cleanup actions<\/li>\n\n\n\n<li>SNS sends cleanup notifications<\/li>\n\n\n\n<li>IAM grants System Manager permissions to perform the act<\/li>\n\n\n\n<li>System Manager executes cleanup on EC2, S3, and Elastic IPs<\/li>\n<\/ol>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create The Wasteful Resources via CloudFormation<\/h2>\n\n\n\n<p>In this step, we will intentionally create the resources to simulate the real-world resources created under an AWS account. The purpose is to control the issue ourselves while keep the common real-world scenario on what to look for in such inefficient AS resources.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to CloudFormation console, click <strong>Create Stack<\/strong><\/li>\n\n\n\n<li><strong>Prepare template:<\/strong> Choose an existing template<\/li>\n\n\n\n<li>Download the following CloudFormation template from <a href=\"https:\/\/github.com\/isuchan\/aws-sa-projects\/blob\/master\/project-5\/wasteful-infra-template.yaml\"><strong>here<\/strong><\/a><\/li>\n\n\n\n<li>Choose Upload a template file and select the wasteful-infra-template.yaml file<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1067\" height=\"875\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-4.png\" alt=\"\" class=\"wp-image-3437\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-4.png 1067w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-4-300x246.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-4-1024x840.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-4-768x630.png 768w\" sizes=\"auto, (max-width: 1067px) 100vw, 1067px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click Next, and enter <strong>CostManager-for-Wasteful-Infra<\/strong> to adhere with best practice by indicating the project and purpose<\/li>\n<\/ul>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Configure Stack Parameters<\/h2>\n\n\n\n<p>We need to tell CloudFormation where to deploy this resource by selecting the subnet<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>VPC ID:<\/strong> The location where resources will be created. Let&#8217;s use the default VPC one here<\/li>\n\n\n\n<li><strong>SubnetID:<\/strong> public subnet that proides internet access for EC2 instances<\/li>\n\n\n\n<li><strong>SubnetID2:<\/strong> second public subnet which has to be in a different availability zone for load balancer requirement<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1067\" height=\"755\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-7.png\" alt=\"\" class=\"wp-image-3441\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-7.png 1067w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-7-300x212.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-7-1024x725.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-7-768x543.png 768w\" sizes=\"auto, (max-width: 1067px) 100vw, 1067px\" \/><\/figure>\n\n\n\n<p>Get the above values by visiting VPC console and select Your VPCs. Click a VPC and find VPC ID and <strong>subnets<\/strong> under <strong>Resource Map<\/strong> tab<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1067\" height=\"1079\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-6.png\" alt=\"\" class=\"wp-image-3440\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-6.png 1067w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-6-297x300.png 297w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-6-1013x1024.png 1013w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-6-768x777.png 768w\" sizes=\"auto, (max-width: 1067px) 100vw, 1067px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Continue to configure stack options, review it, and click Submit<\/li>\n\n\n\n<li>Wait until all the status of resource deployment as CREATE_COMPLETE<\/li>\n<\/ul>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Check the Created Resources<\/h2>\n\n\n\n<p>By far, below is the successfully created resource by the CloudFormation stack<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Two oversized EC2 instances (t3.small)<\/strong> &#8211; Over-provisioned compute that could use t3.micro, still wasting ~$15\/month each <\/li>\n\n\n\n<li><strong>Three unattached EBS volumes (50GB, 50GB, 100GB)<\/strong> &#8211; Pure storage waste costing ~$20\/month total <\/li>\n\n\n\n<li><strong>Two unattached Elastic IP addresses<\/strong> &#8211; Common oversight generating $7.20\/month when unused <\/li>\n\n\n\n<li><strong>An S3 bucket for static website hosting<\/strong> using Standard storage <strong>without lifecycle policies<\/strong> &#8211; Inefficient storage management <\/li>\n\n\n\n<li><strong>Overly permissive security groups<\/strong> &#8211; Opens HTTP (port 80) and SSH (port 22) to all IPs (0.0.0.0\/0)<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1067\" height=\"833\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-8.png\" alt=\"\" class=\"wp-image-3446\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-8.png 1067w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-8-300x234.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-8-1024x799.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-8-768x600.png 768w\" sizes=\"auto, (max-width: 1067px) 100vw, 1067px\" \/><\/figure>\n\n\n\n<p>Notice that all resources were tagged with <strong>Project: CostManager<\/strong><\/p>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Configure S3 Manually<\/h2>\n\n\n\n<p>As some AWS resources, such as S3, cannot be fully configured via CloudFormation, we need to manually configure its bucket policies and static website hosting<\/p>\n\n\n\n<p>Let&#8217;s configure S3 bucket policy first<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to S3 console, select Buckets, select <strong>costmanager-frontend-&lt;account_id&gt;-&lt;region&gt;<\/strong><\/li>\n\n\n\n<li>Click the <strong>Permissions<\/strong> tab<\/li>\n\n\n\n<li>Scroll down to <strong>Bucket Policy<\/strong> section, click <strong>Edit<\/strong>, and paste below policy:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": &#91;\n        {\n            \"Sid\": \"PublicReadGetObject\",\n            \"Effect\": \"Allow\",\n            \"Principal\": \"*\",\n            \"Action\": \"s3:GetObject\",\n            \"Resource\": \"arn:aws:s3:::costmanager-frontend-505679505148-us-east-1\/*\"\n        }\n    ]\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace <strong>&lt;account-id&gt;<\/strong> and <strong>&lt;region&gt;<\/strong> based on the actual values on our S3 bucket arn<\/li>\n\n\n\n<li>Click <strong>Save Changes<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"609\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-9.png\" alt=\"\" class=\"wp-image-3450\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-9.png 793w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-9-300x230.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-9-768x590.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/figure>\n\n\n\n<p>This policy makes bucket contents publicly readable. In production, we would use CloudFront and more restrictive policies.<\/p>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Upload Website Content<\/h2>\n\n\n\n<p>We are going to create a static landing page on S3 bucket for this demonstration<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download this file: <a href=\"https:\/\/github.com\/isuchan\/aws-sa-projects\/blob\/master\/project-5\/index.html\" data-type=\"link\" data-id=\"project-5\/index.html\">index.html<\/a><\/li>\n\n\n\n<li>Upload to S3 bucket. Go to <strong>Objects<\/strong> tab, click <strong>Upload -&gt; Add files<\/strong> and select <strong>index.html<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1060\" height=\"572\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-10.png\" alt=\"\" class=\"wp-image-3453\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-10.png 1060w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-10-300x162.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-10-1024x553.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-10-768x414.png 768w\" sizes=\"auto, (max-width: 1060px) 100vw, 1060px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next, we&#8217;ll enable the static site hosting feature. Go to <strong>Properties<\/strong> tab, scroll down to <strong>Static website hosting<\/strong> and copy the <strong>Bucket website endpoint<\/strong> URL:<br><a href=\"http:\/\/costmanager-frontend-505679505148-us-east-1.s3-website-us-east-1.amazonaws.com\">http:\/\/costmanager-frontend-505679505148-us-east-1.s3-website-us-east-1.amazonaws.com<\/a><\/li>\n\n\n\n<li>We shall have something like below<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1060\" height=\"430\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-11.png\" alt=\"\" class=\"wp-image-3456\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-11.png 1060w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-11-300x122.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-11-1024x415.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-11-768x312.png 768w\" sizes=\"auto, (max-width: 1060px) 100vw, 1060px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Validate and Review Generated Resources and Costs<\/h2>\n\n\n\n<p>Go to EC2 console and check the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Instances<\/strong>: Confirm one t3.small and one t3.medium, instances are running in different AZs<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1060\" height=\"298\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-12.png\" alt=\"\" class=\"wp-image-3463\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-12.png 1060w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-12-300x84.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-12-1024x288.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-12-768x216.png 768w\" sizes=\"auto, (max-width: 1060px) 100vw, 1060px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Volumes<\/strong>: Verify three unattached volumes (50GB, 50GB, 100GB) &#8211; these should show as &#8220;available&#8221; not &#8220;in-use&#8221;. See the <strong>volume state<\/strong> column, <strong>&#8220;Available&#8221;<\/strong> means unattached = wasteful spending<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1211\" height=\"387\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-16.png\" alt=\"\" class=\"wp-image-3467\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-16.png 1211w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-16-300x96.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-16-1024x327.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-16-768x245.png 768w\" sizes=\"auto, (max-width: 1211px) 100vw, 1211px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Elastic IPs<\/strong>: Verify two unattached Elastic IP addresses (should show as &#8220;not associated&#8221;)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1069\" height=\"221\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-19.png\" alt=\"\" class=\"wp-image-3470\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-19.png 1069w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-19-300x62.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-19-1024x212.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-19-768x159.png 768w\" sizes=\"auto, (max-width: 1069px) 100vw, 1069px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Next, go to S3 Console to check the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Buckets<\/strong>: Verify the CostManager frontend bucket exists<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1069\" height=\"420\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-18.png\" alt=\"\" class=\"wp-image-3469\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-18.png 1069w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-18-300x118.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-18-1024x402.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-18-768x302.png 768w\" sizes=\"auto, (max-width: 1069px) 100vw, 1069px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Management tab<\/strong>: Confirm <strong>no lifecycle rules are configured<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1069\" height=\"538\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-20.png\" alt=\"\" class=\"wp-image-3472\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-20.png 1069w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-20-300x151.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-20-1024x515.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-20-768x387.png 768w\" sizes=\"auto, (max-width: 1069px) 100vw, 1069px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Properties tab<\/strong>: Verify website hosting is enabled with index.html as index document<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1069\" height=\"422\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-21.png\" alt=\"\" class=\"wp-image-3474\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-21.png 1069w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-21-300x118.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-21-1024x404.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-21-768x303.png 768w\" sizes=\"auto, (max-width: 1069px) 100vw, 1069px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Security Groups:<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>EC2 Console \u2192 Security Groups<\/strong>: Find &#8220;SimpleSecurityGroup&#8221;<\/li>\n\n\n\n<li><strong>Inbound rules<\/strong>: Confirm overly broad access (0.0.0.0\/0) for ports 22 and 80<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1069\" height=\"620\" src=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-22.png\" alt=\"\" class=\"wp-image-3477\" srcset=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-22.png 1069w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-22-300x174.png 300w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-22-1024x594.png 1024w, https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/05\/image-22-768x445.png 768w\" sizes=\"auto, (max-width: 1069px) 100vw, 1069px\" \/><\/figure>\n\n\n\n<p>The above resources will generate estimated costs like the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>EC2 instances<\/strong>: ~$0.0208\/hour each (t3.small) = ~$30\/month for both <\/li>\n\n\n\n<li><strong>EBS volumes<\/strong>: ~$0.10\/GB\/month for unattached storage = ~$20\/month total <\/li>\n\n\n\n<li><strong>Elastic IPs<\/strong>: $0.005\/hour each when unattached = ~$7.20\/month total <\/li>\n\n\n\n<li><strong>S3 storage<\/strong>: Standard pricing without lifecycle optimization (minimal for empty bucket)<\/li>\n<\/ul>\n\n\n\n<p><strong>Total estimated monthly cost: $30-40<\/strong><\/p>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>After the deployment, we should have the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A functioning S3 bucket configured for static website hosting Multiple cost-inefficient resources actively generating charges Clear examples of common cloud waste patterns:<\/li>\n\n\n\n<li>Oversized compute instances<\/li>\n\n\n\n<li>Unattached storage resources<\/li>\n\n\n\n<li>Unattached network resources (Elastic IPs)<\/li>\n\n\n\n<li>Poor security practices (overly broad security groups)<\/li>\n\n\n\n<li>Lack of storage lifecycle management<\/li>\n\n\n\n<li>Tagged resources for easy identification and cleanup Baseline data for cost optimization exercises<\/li>\n<\/ul>\n\n\n\n<p>In <strong><a href=\"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-2\/\" data-type=\"post\" data-id=\"3485\" target=\"_blank\" rel=\"noreferrer noopener\">the next step<\/a><\/strong>, after letting the resource running for at least 1-2 hours, we will do the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Analyze costs using AWS Cost Explorer Identify waste using AWS Trusted Advisor Set up cost monitoring and alerts Practice cost optimization techniques:<\/li>\n\n\n\n<li>Rightsizing EC2 instances (t3.small \u2192 t3.micro)<\/li>\n\n\n\n<li>Cleaning up unattached resources<\/li>\n\n\n\n<li>Implementing S3 lifecycle policies<\/li>\n\n\n\n<li>Securing security groups<\/li>\n\n\n\n<li>Clean up resources to stop charges<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>As the good AWS architecture has to be efficient in terms of operational cost, in this project we&#8217;ll simulate on how to build a workflow to detect unused resources, recommend cleanup actions, and remove them safely with proper governance. We&#8217;ll start by deploying a wasteful AWS environment built via CloudFormation template and fix the cost leaking that caused by it.<\/p>\n","protected":false},"author":1,"featured_media":3613,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,20,85,75,8],"tags":[],"class_list":["post-3418","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-backend","category-projects","category-system-design","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AWS Solutions Architect Project (Cost Optimization Pillar) - Automated Cost Management - Part 1 - Ichwan Chandra<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AWS Solutions Architect Project (Cost Optimization Pillar) - Automated Cost Management - Part 1 - Ichwan Chandra\" \/>\n<meta property=\"og:description\" content=\"As the good AWS architecture has to be efficient in terms of operational cost, in this project we&#039;ll simulate on how to build a workflow to detect unused resources, recommend cleanup actions, and remove them safely with proper governance. We&#039;ll start by deploying a wasteful AWS environment built via CloudFormation template and fix the cost leaking that caused by it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/\" \/>\n<meta property=\"og:site_name\" content=\"Ichwan Chandra\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-04T18:07:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-12-01T17:09:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/11\/aws-solutions-architect-project-cost-optimization-part-1.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1376\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ichwan Chandra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ichwan Chandra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/\"},\"author\":{\"name\":\"Ichwan Chandra\",\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/#\\\/schema\\\/person\\\/2fa69a7a1008a3369584752194b063d5\"},\"headline\":\"AWS Solutions Architect Project (Cost Optimization Pillar) &#8211; Automated Cost Management &#8211; Part 1\",\"datePublished\":\"2026-05-04T18:07:00+00:00\",\"dateModified\":\"2026-12-01T17:09:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/\"},\"wordCount\":985,\"image\":{\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/aws-solutions-architect-project-cost-optimization-part-1.jpeg\",\"articleSection\":[\"AWS\",\"Backend\",\"Projects\",\"System Design\",\"Technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/\",\"url\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/\",\"name\":\"AWS Solutions Architect Project (Cost Optimization Pillar) - Automated Cost Management - Part 1 - Ichwan Chandra\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/aws-solutions-architect-project-cost-optimization-part-1.jpeg\",\"datePublished\":\"2026-05-04T18:07:00+00:00\",\"dateModified\":\"2026-12-01T17:09:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/#\\\/schema\\\/person\\\/2fa69a7a1008a3369584752194b063d5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/aws-solutions-architect-project-cost-optimization-part-1.jpeg\",\"contentUrl\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/aws-solutions-architect-project-cost-optimization-part-1.jpeg\",\"width\":1376,\"height\":768},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/aws-solutions-architect-project-cost-optimization-part-1\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Solutions Architect Project (Cost Optimization Pillar) &#8211; Automated Cost Management &#8211; Part 1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/\",\"name\":\"Ichwan Chandra\",\"description\":\"In a Lifelong Learning Mode\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/#\\\/schema\\\/person\\\/2fa69a7a1008a3369584752194b063d5\",\"name\":\"Ichwan Chandra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8d8d64c76e361108ee058442df7c49c539eefd1d1e5a3e8dbcc9d70289e0bbf2?s=96&d=retro&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8d8d64c76e361108ee058442df7c49c539eefd1d1e5a3e8dbcc9d70289e0bbf2?s=96&d=retro&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8d8d64c76e361108ee058442df7c49c539eefd1d1e5a3e8dbcc9d70289e0bbf2?s=96&d=retro&r=g\",\"caption\":\"Ichwan Chandra\"},\"sameAs\":[\"https:\\\/\\\/ichwanchandra.com\\\/blog\"],\"url\":\"https:\\\/\\\/ichwanchandra.com\\\/blog\\\/author\\\/isuchan193\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AWS Solutions Architect Project (Cost Optimization Pillar) - Automated Cost Management - Part 1 - Ichwan Chandra","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/","og_locale":"en_US","og_type":"article","og_title":"AWS Solutions Architect Project (Cost Optimization Pillar) - Automated Cost Management - Part 1 - Ichwan Chandra","og_description":"As the good AWS architecture has to be efficient in terms of operational cost, in this project we'll simulate on how to build a workflow to detect unused resources, recommend cleanup actions, and remove them safely with proper governance. We'll start by deploying a wasteful AWS environment built via CloudFormation template and fix the cost leaking that caused by it.","og_url":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/","og_site_name":"Ichwan Chandra","article_published_time":"2026-05-04T18:07:00+00:00","article_modified_time":"2026-12-01T17:09:03+00:00","og_image":[{"width":1376,"height":768,"url":"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/11\/aws-solutions-architect-project-cost-optimization-part-1.jpeg","type":"image\/jpeg"}],"author":"Ichwan Chandra","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ichwan Chandra","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/#article","isPartOf":{"@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/"},"author":{"name":"Ichwan Chandra","@id":"https:\/\/ichwanchandra.com\/blog\/#\/schema\/person\/2fa69a7a1008a3369584752194b063d5"},"headline":"AWS Solutions Architect Project (Cost Optimization Pillar) &#8211; Automated Cost Management &#8211; Part 1","datePublished":"2026-05-04T18:07:00+00:00","dateModified":"2026-12-01T17:09:03+00:00","mainEntityOfPage":{"@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/"},"wordCount":985,"image":{"@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/#primaryimage"},"thumbnailUrl":"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/11\/aws-solutions-architect-project-cost-optimization-part-1.jpeg","articleSection":["AWS","Backend","Projects","System Design","Technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/","url":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/","name":"AWS Solutions Architect Project (Cost Optimization Pillar) - Automated Cost Management - Part 1 - Ichwan Chandra","isPartOf":{"@id":"https:\/\/ichwanchandra.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/#primaryimage"},"image":{"@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/#primaryimage"},"thumbnailUrl":"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/11\/aws-solutions-architect-project-cost-optimization-part-1.jpeg","datePublished":"2026-05-04T18:07:00+00:00","dateModified":"2026-12-01T17:09:03+00:00","author":{"@id":"https:\/\/ichwanchandra.com\/blog\/#\/schema\/person\/2fa69a7a1008a3369584752194b063d5"},"breadcrumb":{"@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/#primaryimage","url":"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/11\/aws-solutions-architect-project-cost-optimization-part-1.jpeg","contentUrl":"https:\/\/ichwanchandra.com\/blog\/wp-content\/uploads\/2026\/11\/aws-solutions-architect-project-cost-optimization-part-1.jpeg","width":1376,"height":768},{"@type":"BreadcrumbList","@id":"https:\/\/ichwanchandra.com\/blog\/aws-solutions-architect-project-cost-optimization-part-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ichwanchandra.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AWS Solutions Architect Project (Cost Optimization Pillar) &#8211; Automated Cost Management &#8211; Part 1"}]},{"@type":"WebSite","@id":"https:\/\/ichwanchandra.com\/blog\/#website","url":"https:\/\/ichwanchandra.com\/blog\/","name":"Ichwan Chandra","description":"In a Lifelong Learning Mode","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ichwanchandra.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ichwanchandra.com\/blog\/#\/schema\/person\/2fa69a7a1008a3369584752194b063d5","name":"Ichwan Chandra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8d8d64c76e361108ee058442df7c49c539eefd1d1e5a3e8dbcc9d70289e0bbf2?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8d8d64c76e361108ee058442df7c49c539eefd1d1e5a3e8dbcc9d70289e0bbf2?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8d8d64c76e361108ee058442df7c49c539eefd1d1e5a3e8dbcc9d70289e0bbf2?s=96&d=retro&r=g","caption":"Ichwan Chandra"},"sameAs":["https:\/\/ichwanchandra.com\/blog"],"url":"https:\/\/ichwanchandra.com\/blog\/author\/isuchan193\/"}]}},"_links":{"self":[{"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/posts\/3418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/comments?post=3418"}],"version-history":[{"count":29,"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/posts\/3418\/revisions"}],"predecessor-version":[{"id":3650,"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/posts\/3418\/revisions\/3650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/media\/3613"}],"wp:attachment":[{"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/media?parent=3418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/categories?post=3418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ichwanchandra.com\/blog\/wp-json\/wp\/v2\/tags?post=3418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}