<?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"><channel><title><![CDATA[reeceappau]]></title><description><![CDATA[reeceappau]]></description><link>https://blog.reeceappau.com</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 09:53:34 GMT</lastBuildDate><atom:link href="https://blog.reeceappau.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Building a Serverless Contact Form API with AWS Lambda, SES, Bedrock, and Terraform]]></title><description><![CDATA[When someone fills out a contact form on most websites, they get a generic auto-reply — something like “Thanks for reaching out. We’ve received your message.” It’s functional but forgettable.
I wanted something better.
So I built a serverless contact...]]></description><link>https://blog.reeceappau.com/genai-serverless-contact-form</link><guid isPermaLink="true">https://blog.reeceappau.com/genai-serverless-contact-form</guid><dc:creator><![CDATA[Reece Appau]]></dc:creator><pubDate>Sun, 06 Apr 2025 13:39:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1743948799959/342d24cf-c6a4-4e29-a3ef-72054d9fe05a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When someone fills out a contact form on most websites, they get a generic auto-reply — something like “Thanks for reaching out. We’ve received your message.” It’s functional but forgettable.</p>
<p>I wanted something better.</p>
<p>So I built a serverless contact form API that not only sends the submitted form data to my email using AWS services but also replies to the user with a unique, AI-generated inspirational quote. Instead of a bland confirmation, users receive something that leaves a positive impression.</p>
<h2 id="heading-what-this-project-does">What This Project Does</h2>
<ul>
<li><p>Accepts contact form submissions via a REST API</p>
</li>
<li><p>Sends the form details to my email using Amazon SES</p>
</li>
<li><p>Uses Amazon Bedrock to generate an inspirational quote</p>
</li>
<li><p>Sends the user a confirmation email that includes the quote</p>
</li>
<li><p>The website owner also gets an email with the message attached</p>
</li>
<li><p>All deployed and managed through Terraform</p>
</li>
</ul>
<h2 id="heading-technologies-used">Technologies Used</h2>
<ul>
<li><p><strong>AWS Lambda</strong> – Runs a Python script that processes form submissions.</p>
</li>
<li><p><strong>API Gateway</strong> – Exposes a RESTful endpoint for the frontend form.</p>
</li>
<li><p><strong>Amazon SES</strong> – Sends two emails: one to me and one to the user.</p>
</li>
<li><p><strong>Amazon Bedrock</strong> – Generates a unique inspirational quote with every submission.</p>
</li>
<li><p><strong>Terraform</strong> – Manages infrastructure as code.</p>
</li>
</ul>
<h2 id="heading-try-it-yourself">Try It Yourself</h2>
<p>Want to see it in action?<br />Head over to the contact page on my <a target="_blank" href="https://reeceappau.com">website</a> and send me a message. You’ll receive an inspirational quote generated by Amazon Bedrock straight in your inbox!</p>
<p>Curious about how it's built?<br />👉 Check out the <a target="_blank" href="https://github.com/reeceappau/GenAI-Serverless-Contact-Form">Terraform code on GitHub</a></p>
]]></content:encoded></item><item><title><![CDATA[Building and deploying a React website on AWS S3 using Terraform and GitHub Actions]]></title><description><![CDATA[Introduction
In this project, I built and deployed a React website hosted on AWS S3, with Amazon CloudFront as a content delivery network (CDN) to improve performance and ensure global availability. Terraform was used for infrastructure as code, and ...]]></description><link>https://blog.reeceappau.com/deploying-a-react-website-on-s3</link><guid isPermaLink="true">https://blog.reeceappau.com/deploying-a-react-website-on-s3</guid><category><![CDATA[AWS]]></category><category><![CDATA[S3]]></category><category><![CDATA[React]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[github-actions]]></category><category><![CDATA[cloudfront]]></category><dc:creator><![CDATA[Reece Appau]]></dc:creator><pubDate>Sun, 12 Jan 2025 20:40:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1736714100125/be576eeb-c978-44f8-a783-3bc567e95e72.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction"><strong>Introduction</strong></h2>
<p>In this project, I built and deployed a React website hosted on AWS S3, with Amazon CloudFront as a content delivery network (CDN) to improve performance and ensure global availability. Terraform was used for infrastructure as code, and GitHub Actions handled the automation of the deployment process. This documentation walks you through the setup, the structure of the project, and how the various components work together to achieve a seamless deployment pipeline. The source code is available on <a target="_blank" href="https://github.com/reeceappau/s3-react-app">github</a>. The project structure includes three primary folders: <code>terraform</code> for infrastructure, <code>website</code> for the React application, and <code>.github</code> for the deployment workflow.</p>
<p><a target="_blank" href="https://github.com/reeceappau/s3-react-app">Click here for Github Code</a><br /><a target="_blank" href="https://d7ixs9j6efgcw.cloudfront.net/">Click here to view live website</a></p>
<h2 id="heading-react-website"><strong>React Website</strong></h2>
<p>The React website is a simple application created using <strong>Vite</strong>, a modern build tool that has gained popularity for its fast build speeds and developer-friendly features. Unlike Create React App (CRA), which has been the go-to option for React applications, Vite is actively maintained and offers better performance. As CRA is no longer maintained as of a certain date, I chose Vite to future-proof the application.</p>
<p>The <code>website</code> folder contains the React application code, which was generated using the vite command below</p>
<pre><code class="lang-bash">npm create vite@latest website -- --template react
</code></pre>
<p>After generating the react code, Terraform is used to develop the AWS infrastructure to host the website. AWS S3 was used as the primary storage and hosting solution for the static files of the React application. Additionally, Amazon CloudFront was configured as a content delivery network (CDN) to enhance performance by caching these assets at edge locations globally, reducing latency for end users.</p>
<h2 id="heading-terraform-code"><strong>Terraform Code</strong></h2>
<p>The infrastructure for this project is managed entirely using Terraform. The <code>terraform</code> folder is organized into modular components, with each module serving a specific purpose. These modules are housed in the <code>modules</code> folder, and the main Terraform configuration files in the root folder bring everything together. Here’s an explanation of each module and its role:</p>
<p><strong>Remote Backend:</strong> The <code>remote_backend</code> module sets up the infrastructure needed to store and manage the Terraform state. This includes creating an S3 bucket for storing the state file and a DynamoDB table for state locking. Additionally, the module creates an IAM user with the <code>AdministratorAccess</code> policy attached to ensure Terraform has the necessary permissions to deploy resources. While attaching <code>AdministratorAccess</code> simplifies permissions management during development, it is not recommended for production-scale applications due to the potential security risks.</p>
<p><strong>S3 Website:</strong> The <code>s3_website</code> module provisions an S3 bucket configured for static website hosting. It enables versioning on the bucket, sets up website-specific configurations (such as specifying <code>index.html</code> as the entry point), and allows public access through a bucket policy.</p>
<p><strong>S3 + CloudFront:</strong> The <code>s3_cloudfront</code> module sets up a CloudFront distribution to serve the website by caching the website’s files at edge locations worldwide, reducing latency for users. It also configures an Origin Access Control (OAC) to allow CloudFront to securely access the S3 bucket.</p>
<h2 id="heading-github-actions-workflow"><strong>GitHub Actions Workflow</strong></h2>
<p>The deployment process is automated using GitHub Actions, with the workflow defined in <code>.github/workflows/deploy.yaml</code>. This workflow is triggered whenever changes are pushed to the main branch and consists of three jobs.</p>
<p>The <strong>first job, "Terraform,"</strong> handles the deployment of the AWS infrastructure. The <strong>second job, "Sync_S3,"</strong> builds the React application and uploads the production files to the S3 bucket. The <strong>final job, "Invalidate_CloudFront,"</strong> invalidates the CloudFront cache to ensure that users see the latest version of the website.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>This project demonstrates how to build and deploy a React website using AWS S3, CloudFront, Terraform, and GitHub Actions. The setup ensures scalability, global performance, and automation, with S3 hosting the app, CloudFront improving delivery speed, and Terraform simplifying infrastructure management. While the workflow securely uses GitHub Secrets for sensitive credentials, configurations like <code>AdministratorAccess</code> should be refined for production environments.</p>
]]></content:encoded></item></channel></rss>