StackProps StackProps StackProps StackProps StackProps } from from from from 'aws-cdk-lib' import import import import { Construct Construct Construct Construct Construct } from from from from 'constructs' import import import import { ApiGatewayToKinesisStreams ApiGatewayToKinesisStreams ApiGatewayToKinesisStreams ApiGatewayToKinesisStreams ApiGatewayToKinesisStreams } from from from from '@aws-solutions-constructs/aws-apigateway-kinesisstreams' import import import import { KinesisStreamsToKinesisFirehoseToS3 KinesisStreamsToKinesisFirehoseToS3 KinesisStreamsToKinesisFirehoseToS3 KinesisStreamsToKinesisFirehoseToS3 KinesisStreamsToKinesisFirehoseToS3 } from from from from '@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3' export export export export class class class class Sample1Stack Sample1Stack Sample1Stack Sample1Stack Sample1Stack extends extends extends extends Stack { constructor constructor constructor constructor constructor(scope scope scope scope scope: Construct, id id id id id: string, props props props props props? ? ? ?: StackProps) { super super super super(scope scope scope scope, id id id id, props props props props) const const const const ApiGwToKinesisStreams ApiGwToKinesisStreams ApiGwToKinesisStreams ApiGwToKinesisStreams ApiGwToKinesisStreams = = = = new new new new ApiGatewayToKinesisStreams ApiGatewayToKinesisStreams ApiGatewayToKinesisStreams ApiGatewayToKinesisStreams(this this this this, 'apigw-stream', {} ) new new new new KinesisStreamsToKinesisFirehoseToS3 KinesisStreamsToKinesisFirehoseToS3 KinesisStreamsToKinesisFirehoseToS3 KinesisStreamsToKinesisFirehoseToS3(this this this this, 'stream-firehose-s3', { existingStreamObj existingStreamObj existingStreamObj existingStreamObj existingStreamObj: ApiGwToKinesisStreams ApiGwToKinesisStreams ApiGwToKinesisStreams ApiGwToKinesisStreams.kinesisStream kinesisStream kinesisStream kinesisStream kinesisStream, }) } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 コーディング(3/3) KinesisStreamsToKinesisFirehoseToS 3 で Kinesis Firehose+S3 を構築 L6~, L16~ 作成済の .kinesisStream を指定す ると、簡単に繋がるぞ リソースを設定したい場合は xxxProps でチ ューニング kinesisStreamProps, kinesisFirehoseProps, bucketProps, logGroupProps, loggingBucketProps 16