How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • import * as path from 'path';
    import * as firehose from '@aws-cdk/aws-kinesisfirehose';
    import * as kms from '@aws-cdk/aws-kms';
    import * as lambdanodejs from '@aws-cdk/aws-lambda-nodejs';
    import * as logs from '@aws-cdk/aws-logs';
    import * as s3 from '@aws-cdk/aws-s3';
    import * as cdk from '@aws-cdk/core';
    import * as destinations from '../lib';
    
    const app = new cdk.App();
    
    const stack = new cdk.Stack(app, 'aws-cdk-firehose-delivery-stream-s3-all-properties');
    
    const bucket = new s3.Bucket(stack, 'Bucket', {
      removalPolicy: cdk.RemovalPolicy.DESTROY,
      autoDeleteObjects: true,
    });
    
    const backupBucket = new s3.Bucket(stack, 'BackupBucket', {
      removalPolicy: cdk.RemovalPolicy.DESTROY,
      autoDeleteObjects: true,
    });
    const logGroup = new logs.LogGroup(stack, 'LogGroup', {
      removalPolicy: cdk.RemovalPolicy.DESTROY,
    });
    
    const dataProcessorFunction = new lambdanodejs.NodejsFunction(stack, 'DataProcessorFunction', {
      entry: path.join(__dirname, 'lambda-data-processor.js'),
      timeout: cdk.Duration.minutes(1),
    });
    
    const processor = new firehose.LambdaFunctionProcessor(dataProcessorFunction, {
      bufferInterval: cdk.Duration.seconds(60),
      bufferSize: cdk.Size.mebibytes(1),
      retries: 1,
    });
    
    const key = new kms.Key(stack, 'Key', {
      removalPolicy: cdk.RemovalPolicy.DESTROY,
    });
    
    const backupKey = new kms.Key(stack, 'BackupKey', {
      removalPolicy: cdk.RemovalPolicy.DESTROY,
    });
    
    new firehose.DeliveryStream(stack, 'Delivery Stream', {
      destinations: [new destinations.S3Bucket(bucket, {
        logging: true,
        logGroup: logGroup,
        processor: processor,
        compression: destinations.Compression.GZIP,
        dataOutputPrefix: 'regularPrefix',
        errorOutputPrefix: 'errorPrefix',
        bufferingInterval: cdk.Duration.seconds(60),
        bufferingSize: cdk.Size.mebibytes(1),
        encryptionKey: key,
        s3Backup: {
          mode: destinations.BackupMode.ALL,
          bucket: backupBucket,
          compression: destinations.Compression.ZIP,
          dataOutputPrefix: 'backupPrefix',
          errorOutputPrefix: 'backupErrorPrefix',
          bufferingInterval: cdk.Duration.seconds(60),
          bufferingSize: cdk.Size.mebibytes(1),
          encryptionKey: backupKey,
        },
      })],
    });
    
    app.synth();
    
    
    Docs
  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as kinesisfirehose_destinations from '@aws-cdk/aws-kinesisfirehose-destinations';
    import * as kms from '@aws-cdk/aws-kms';
    import * as cdk from '@aws-cdk/core';
    
    declare const compression: kinesisfirehose_destinations.Compression;
    declare const key: kms.Key;
    declare const size: cdk.Size;
    const commonDestinationS3Props: kinesisfirehose_destinations.CommonDestinationS3Props = {
      bufferingInterval: cdk.Duration.minutes(30),
      bufferingSize: size,
      compression: compression,
      dataOutputPrefix: 'dataOutputPrefix',
      encryptionKey: key,
      errorOutputPrefix: 'errorOutputPrefix',
    };
    
    Docs
  • import { Stack } from '@aws-cdk/core';
    import { Template } from '@aws-cdk/assertions';
    
    const stack = new Stack(/* ... */);
    // ...
    const template = Template.fromStack(stack);
    
    Docs
  • import * as cdk from '@aws-cdk/core';
    
    declare const instance: rds.DatabaseInstance;
    instance.addRotationSingleUser({
      automaticallyAfter: cdk.Duration.days(7), // defaults to 30 days
      excludeCharacters: '!@#$%^&*', // defaults to the set " %+~`#$&*()|[]{}:;<>?!'/@\"\\"
    });
    
    Docs
  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as lambda from '@aws-cdk/aws-lambda';
    import * as cdk from '@aws-cdk/core';
    const logRetentionRetryOptions: lambda.LogRetentionRetryOptions = {
      base: cdk.Duration.minutes(30),
      maxRetries: 123,
    };
    
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples