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 コーディング(2/3) new ApiGatewayToKinesisStreams で API Gateway + Kinesis Streams を構 築 L3~, L13~ 今回はデフォルト設定 リソースを設定したい場合は xxxProps でチ ューニング apiGatewayProps, kinesisStreamProps, logGroupProps 15
Passed! Ensure that CloudWatch Log Group is encrypted by KMS (×2) Ensure that CloudWatch Log Group specifies retention days (×2) Ensure API Gateway caching is enabled Ensure the S3 bucket has access logging enabled 23