Awsboilerplate

screenshot of Awsboilerplate
react

A complete starter kit to get your project live on AWS in minutes and a CICD pipeline to allow you to move quickly

Overview

AWS Boilerplate is a comprehensive and integrated boilerplate solution for building web applications or startups. It offers a complete stack, including a React front end, Lambda backend, infrastructure, and CI/CD pipeline. The motivation behind AWS Boilerplate is to allow users to focus on their ideas rather than spending time on setup and configuration.

Features

  • Complete stack: Includes a React front end, Lambda backend, infrastructure, and CI/CD pipeline.
  • React/Redux stack: Leverages the react-boilerplate project for the front end development.
  • Lambda backend: Provides exemplars for common Lambda patterns, such as hello world, background jobs, and data pipelines.
  • Infrastructure: Offers domain registration via Route53, DNS, naked domain redirect, CloudFront, and API Gateways.
  • Monitoring: Uses CloudWatch for monitoring purposes.
  • Infrastructure as Code: All elements, including applications, infrastructure, and the pipeline, are defined in code using Cloud Development Kit (CDK).
  • CI/CD pipeline: A self-mutating pipeline that deploys all elements of the stack.
  • Local development workflow: Supports local development using AWS SAM.
  • Integration: All components are wired together, including build, config, and infrastructure.

Run Locally

  1. Fork and checkout the AWS Boilerplate project.
  2. Navigate to the lambda_hello_world directory (cd awsboilerplate/app/lambda_hello_world) and run sam local start-api to start the Lambda locally.
  3. Navigate to the www directory (cd awsboilerplate/www) and run npm start to start the React front end locally.
  4. Open http://localhost:3000/ in your browser to view the application.

Run on AWS

  1. Fork and clone the AWS Boilerplate project.
  2. Create a Python virtual environment.
  3. Install AWS CDK and run cdk synth to test the installation.
  4. Run cdk bootstrap --trust <AWS ACCOUNT ID> --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess to set up CDK on your AWS account.
  5. Log into GitHub and create an access token to allow CodePipeline to pull from your repository.
  6. Add the access token to AWS Secrets Manager using the appropriate command.
  7. Register a domain via Route53, which will create a hosted zone. Run aws route53 list-hosted-zones and enter the hosted zone ID and domain name in the awsboilerplate_config.py file.
  8. Update the server URL in awsboilerplate/www/internals/webpack/webpack.prod.babel.js
  9. Commit and push the changes to your GitHub fork.
  10. Run cdk deploy to create the pipeline and infrastructure defined in awsboilerplate/pipeline/cdk_pipeline_stack.py.
  11. Once the pipeline runs, you can access the application by using the domain name (note that CloudFront cache may be enabled).

Summary

AWS Boilerplate is a ready-to-use solution for building web applications or startups using a React front end and Lambda backend. It provides a complete stack, including infrastructure and a CI/CD pipeline, allowing users to focus on their ideas rather than spending time on setup and configuration. The installation guide provides step-by-step instructions for running the application locally and deploying it on AWS.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components