This repository contains the source code for my attempt at the cloud resume challenge by Forrest Brazeal. The website is built with React, showcasing my professional journey. It's deployed as a static website on AWS S3 and distributed globally through Amazon CloudFront, enhancing security and performance with a content delivery network(CDN). The website also features a view counter, which is powered by an AWS Lambda function triggered on each visit, incrementing a count in an Amazon DynamoDB table, thus providing real-time visitor analytics. The website is fully CI/CD integrated, ensuring that both the frontend and infrastructure code are automatically built, tested, and deployed through a robust pipeline upon each commit
- React Framework: The site is built with React, offering a dynamic and responsive user experience.
- AWS S3 Hosting: The website is hosted on Amazon S3, known for its scalability and reliability.
- Amazon CloudFront: Content is distributed through CloudFront, enhancing the site's security and load times globally.
- View Counter: Features a visitor count functionality implemented with AWS Lambda and DynamoDB to track and display the number of site visits in real-time.
- CI/CD Pipeline: The project utilizes GitHub Actions for Continuous Integration and Continuous Deployment.
- Linting: Ensures code quality by automatically linting code on every pull request to the master branch.
- Terraform Validate: Includes a validation step for Terraform configurations, ensuring that infrastructure changes are vetted for syntax and logical errors before being applied.
- Deployment:
- Frontend Deployment: On a successful merge to the master branch, the static site content is automatically deployed to AWS S3.
- Infrastructure as Code Deployment: Terraform changes are automatically applied to manage and update the AWS infrastructure
To deploy the website to AWS S3, ensure you meet the following requirements:
- AWS Account: An active AWS account is required.
- S3 Bucket: An S3 bucket for hosting the website. The bucket should have public access and be configured for static website hosting.
- IAM User: An IAM user with programmatic access and permissions to put objects in the S3 bucket.
- AWS CLI: The AWS Command Line Interface should be installed and configured on the machine that runs the deployment.
- Environment Variables: The following environment variables must be set in your CI/CD pipeline settings:
AWS_ACCESS_KEY_ID
: The access key for your IAM user.AWS_SECRET_ACCESS_KEY
: The secret access key for your IAM user.AWS_REGION
: The region where your S3 bucket is hosted.S3_BUCKET
: The name of your S3 bucket.
To set up this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git
-
Navigate to the project directory:
cd your-repo-name
-
Install dependencies:
npm install
-
Start the development server:
npm start