How to use the @aws-cdk/aws-s3-deployment.Source function in @aws-cdk/aws-s3-deployment

To help you get started, we’ve selected a few @aws-cdk/aws-s3-deployment examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-samples / aws-cdk-changelogs-demo / changelogs-md.js View on Github external
constructor(parent, id, props) {
    super(parent, id, props);

    // Copy the static files into the static S3 bucket
    this.s3Deployment = new s3Deployment.BucketDeployment(this, 'deploy-web', {
      source: s3Deployment.Source.asset('./static'),
      destinationBucket: props.staticBucket,
    });

    // Create a lambda that regenerates the homepage
    const regenerateHomepage = new lambda.Function(this, 'regenerate-homepage', {
      runtime: lambda.Runtime.NODEJS_10_X,
      handler: 'regenerate-homepage.handle',
      code: lambda.Code.asset('./app/regenerate-homepage'),
      environment: {
        CHANGELOGS_TABLE_NAME: props.changelogsTable.tableName,
        FEEDS_TABLE_NAME: props.feedsTable.tableName,
        WEB_BUCKET_NAME: props.webBucket.bucketName
      }
    });

    // Grant the lambda permission to read the tables
github josephluck / internote / ui / deploy / index.ts View on Github external
sources: staticPages.map(page =>
      s3Upload.Source.asset(`./.next/serverless/${page}`)
    ),

@aws-cdk/aws-s3-deployment

Constructs for deploying contents to S3 buckets

Apache-2.0
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis