Client application bucket - SoftupTechnologies/infrastructure-components GitHub Wiki

Path: /lib/clientapp-bucket/index.ts

Exports: ClientAppInfrastructure

Required construct packages: @aws-cdk/aws-s3

This construct creates a s3 bucket configured as a static website host which serves the content through a CloudFront distribution.

Usage

import * as cdk from '@aws-cdk/core';
import { ClientAppInfrastructure } from './clientapp-bucket';

export class ServerlessInfrastructureCdkStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props: StackProps) {
    super(scope, id);

    const clientApp = new ClientAppInfrastructure(this, 'ClientApp', {
      clientAppBucketName: 'web-app-1'
    });
  }
}

Construct props

Name Type Required Default Description
clientAppBucketName string true undefined Bucket name.

Properties

Name Type Description
clientAppCfDomainName string Domain name of cloud front distribution.
clientAppDistributionId string Cloud front distribution id.
clientAppBucket s3.Bucket Created bucket instance.