React Go Gatsby website

Serverless website template with Gatsby frontend, React dashboard and Go backend. AWS Cognito is used for authentication.

Info

Developer: ivtsar

Last Modified: Jun 18th 2020

Provider: AWS

Variables

NameDescription
Web site domain nameThe domain name that will be used by the web site (front-end)
API domain nameThe domain name that will be used by the api (back-end)
AWS S3 Bucket nameThe name of the S3 bucket to be created. This name has to be globally unique
AWS Certificate ARNThe ARN of the certificate for the specified domain names
Frontend RepositoryThe code repository name to commit the generated frontend code
Frontend RepositoryThe code repository name to commit the generated backend code
Dashboard RepositoryThe code repository name to commit the generated dashboard code
Auth RepositoryThe code repository name to commit the generated authentication code

Artifacts

NameDescription
WebsitePublic static website. The website is built using Gatsby, which allows using all Gatsby features, like themes, components, etc
DashboardWebsite dashboard available only to the authenticated users. The dashboard is built with React & Redux
Backend APIServerless backend API URI. Most of the API calls are authorized by Cognito authorizer
Cognito user poolCognito user pool manages website users
Frontend code repositoryCreated repository with public website source code (Gatsby)
Backend code repositoryCreated repository with backend source code in Go (golang). It is defined as a SAM template and deploys API Gateway, Lambda functions and Dynamo DB tables for storage
Dashboard source codeCreated repository with dashboard code implemented as a React web-site (React & Redux)
Authentication code repositoryCreated repository of the authentication logic, defined as a set of NodeJs lambda functions connecting to the Cognito user pool.
Frontend deployment pipelineCI/CD: Code pipeline deploying frontend code changes from repository to production
Backend deployment pipelineCI/CD: Code pipeline deploying backend code changes from repository to production
Dashboard deployment pipelineCI/CD: Code pipeline deploying dashboard code changes from repository to production

Infrastructure Cost

ComponentApprox Price Per MonthFree TierPrice
S3$0

5 GB of storage (Standard);

20,000 GET Requests;

2,000 PUT, COPY, POST, or LIST Requests;

15GB of Data Transfer Out each month for one year

Storage: $0.023 per GB per month;

Requests: $0.005 per 1,000 requests;

Data Transfer: $0.09 per GB

Data Tranfer to CloudFront: Free

CloudFront$0

50 GB of data transfer out;

2M http(s) requests each month

$0.085 per GB;

$0.01 per 10,000 https request

$0.6 per 1M Lambda@Edge requests

API Gateway$0

1M REST API calls received;

1M HTTP API calls received;

1M messages;

750,000 connection minutes

$1 per 1M HTTP API calls;

$3.50 per 1M RESP API calls;

$1.00 per 1M Web socket requests;

$0.25 per 1M Web socket connection minutes

Lambda$0

1M free requests per month;

400,000 GB-seconds of compute time per month

$0.20 per 1M requests;

$0.0000166667 for every GB-second

CodeBuild$0

100 build minutes of general1.small per month

$0.005 per general1.small build minute

CodePipeline$0

One free active pipeline each month

$1.00 per active pipeline per month;

Free for pipelines that have existed for less than 30 days;

Free for pipelines that have no new code changes running through them during the month

Cognito$0

50,000 Monthly Active Users for users who sign in directly to Cognito User Pools;

50 Monthly Active Users for users federated through SAML 2.0 based identity providers

$0.0055 per monthly active user

Certificate Manager$0

Public SSL/TLS certificates provisioned through AWS Certificate Manager are free

Public SSL/TLS certificates provisioned through AWS Certificate Manager are free

IAM$0

Free

Free

CloudFormation$0

1,000 handler operations per month per account

$0.0009 per handler operation