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
    0
  •     const user = new User(this, 'MyUser', { password: cdk.SecretValue.plainText('1234') });
        const group = new Group(this, 'MyGroup');
    
        const policy = new Policy(this, 'MyPolicy');
        policy.attachToUser(user);
        group.attachInlinePolicy(policy);
    
    Docs
    0
  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as cdk from '@aws-cdk/core';
    
    declare const validationResult: cdk.ValidationResult;
    
    const validationResults = new cdk.ValidationResults(/* all optional props */ [validationResult]);
    
    Docs
    0
  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as cdk from '@aws-cdk/core';
    
    const stringConcat = new cdk.StringConcat();
    
    Docs
    0
  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as cdk from '@aws-cdk/core';
    
    const removeTag = new cdk.RemoveTag('key', /* all optional props */ {
      applyToLaunchedInstances: false,
      excludeResourceTypes: ['excludeResourceTypes'],
      includeResourceTypes: ['includeResourceTypes'],
      priority: 123,
    });
    
    Docs
    0
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples