Skip to content

his is an AWS CDK Construct to make deploying a Frontend Web App (SPA) deploy to S3 behind CloudFront.

License

Notifications You must be signed in to change notification settings

gammarers/aws-frontend-web-app-deploy-stack

Repository files navigation

AWS Frontend Web App Deploy Stack

GitHub npm (scoped) PyPI Nuget GitHub Workflow Status (branch) GitHub release (latest SemVer)

View on Construct Hub

This is an AWS CDK Construct to make deploying a Frontend Web App (SPA) deploy to S3 behind CloudFront.

Install

TypeScript

npm install @gammarers/aws-frontend-web-app-deploy-stack
# or
yarn add @gammarers/aws-frontend-web-app-deploy-stack

Python

pip install gammarers.aws-frontend-web-app-deploy-stack

C# / .NET

dotnet add package Gammarers.CDK.AWS.FrontendWebAppDeployStack

Example

import { FrontendWebAppDeployStack } from '@gammarers/aws-frontend-web-app-deploy-stack';

new FrontendWebAppDeployStack(app, 'FrontendWebAppDeployStack', {
  env: { account: '012345678901', region: 'us-east-1' },
  domainName: 'example.com',
  hostedZoneId: 'Z0000000000000000000Q',
  originBucketName: 'frontend-web-app-example-origin-bucket', // new create in this stack
  deploySourceAssetPath: 'website/',
  logBucketArn: 'arn:aws:s3:::frontend-web-app-example-access-log-bucket', // already created
});

License

This project is licensed under the Apache-2.0 License.