@gammarers/aws-frontend-web-app-deploy-stack
Version:
This is an AWS CDK Construct to make deploying a Frontend Web App (SPA) deploy to S3 behind CloudFront.
73 lines (49 loc) • 2.75 kB
Markdown
# AWS Frontend Web App Deploy Stack
[](https://github.com/gammarers/aws-frontend-web-app-deploy-stack/blob/main/LICENSE)
[](https://www.npmjs.com/package/@gammarers/aws-frontend-web-app-deploy-stack)
[](https://pypi.org/project/gammarers.aws-frontend-web-app-deploy-stack/)
[](https://www.nuget.org/packages/Gammarers.CDK.AWS.FrontendWebAppDeployStack/)
[](https://github.com/gammarers/aws-frontend-web-app-deploy-stack/actions/workflows/release.yml)
[](https://github.com/gammarers/aws-frontend-web-app-deploy-stack/releases)
[](https://constructs.dev/packages/@gammarers/aws-frontend-web-app-deploy-stack)
This is an AWS CDK Construct to make deploying a Frontend Web App (SPA) deploy to S3 behind CloudFront.
## Install
### TypeScript
#### install by npm
```shell
npm install @gammarers/aws-frontend-web-app-deploy-stack
```
#### install by yarn
```shell
yarn add @gammarers/aws-frontend-web-app-deploy-stack
```
#### install by pnpm
```shell
pnpm add @gammarers/aws-frontend-web-app-deploy-stack
```
#### install by bun
```shell
bun add @gammarers/aws-frontend-web-app-deploy-stack
```
### Python
```shell
pip install gammarers.aws-frontend-web-app-deploy-stack
```
### C# / .NET
```shell
dotnet add package Gammarers.CDK.AWS.FrontendWebAppDeployStack
```
## Example
```typescript
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.