konokenj.cdk-api-mcp-server 0.48.0__py3-none-any.whl → 0.57.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cdk_api_mcp_server/__about__.py +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-amplify-alpha/README.md +12 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-agentcore-alpha/README.md +1979 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-alpha/README.md +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/README.md +156 -69
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-imagebuilder-alpha/README.md +656 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-lambda-go-alpha/README.md +102 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-msk-alpha/README.md +38 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-sagemaker-alpha/README.md +32 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/mixins-preview/README.md +182 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/README.md/README.md +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/README.md +34 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.api-with-authorizer-and-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.lambda-api.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.lambda-permission-consolidation.ts +55 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.spec-restapi.ts +1 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/README.md +93 -81
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.stage.ts +20 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.iam.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.lambda.ts +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.user-pool.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/README.md +35 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.add-subroute-integration.ts +7 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.http-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda-connect-disconnect-trigger.ts +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda-permission-consolidation.ts +45 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda.ts +4 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appsync/integ.graphql-lambda-permission.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appsync/integ.js-resolver.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-batch/README.md +15 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-batch/integ.managed-compute-environment-default-instance-class.ts +20 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudformation/integ.core-custom-resources-node-18.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudformation/integ.core-custom-resources-service-timeout.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/README.md +33 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/integ.function-url-origin-ip-address-type.ts +84 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/integ.origin-response-completion-timeout.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudtrail/integ.cloudtrail-data-events-only.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudwatch/README.md +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudwatch/integ.anomaly-detection-alarm.ts +44 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/README.md +0 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codepipeline-actions/integ.pipeline-elastic-beanstalk-deploy.ts +4 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cognito/README.md +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/README.md +125 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/TABLE_V1_API.md +45 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.add-to-resource-policy.ts +97 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.compound.ts +32 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.policy.ts +21 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.table-v2.compound.ts +43 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ec2/README.md +16 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ec2/integ.client-vpn-endpoint-disconnect-on-session-timeout.ts +65 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ec2/integ.vpc-flow-logs.ts +4 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr/README.md +41 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr/integ.tag-mutability-exclusion.ts +30 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/README.md +47 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.managedinstances-capacity-provider.ts +5 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.managedinstances-no-default-capacity-provider.ts +107 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.placement-strategies.ts +32 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs-patterns/integ.alb-fargate-service-public-private-switch.ts +45 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/README.md +103 -83
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.eks-al2023-nodegroup.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.eks-cluster-removal-policy.ts +31 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.fargate-cluster.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/README.md +34 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb-lambda-multi-value-headers.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb.oidc.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.nlb.security-group.ts +70 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2-actions/integ.cognito.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events-targets/README.md +22 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events-targets/integ.firehose-delivery-stream.ts +51 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-iam/integ.managed-policy.ts +9 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-iam/integ.policy.ts +9 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesis/README.md +42 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesis/integ.stream-shard-level-monitoring.ts +47 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/README.md +156 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/integ.cloudwatch-logs-processors.ts +45 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/integ.record-format-conversion-schema.ts +154 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/integ.record-format-conversion.ts +178 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/README.md +39 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.binary-payload.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.logging-config.ts +8 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.multi-tenancy.ts +24 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.params-and-secrets.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime-management.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime.fromasset.ts +19 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime.inlinecode.ts +11 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.dependencies-pnpm.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.function-exclude-smithy-models.ts +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.nodejs.build.images.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/README.md +4 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.metricfilter-apply-on-transformed-logs.ts +29 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.subscriptionfilter.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-opensearchservice/integ.opensearch.ebs.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-opensearchservice/integ.opensearch.min.ts +1 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/README.md +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster-cloudwatch-logs-exports.ts +56 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster-data-api-to-imported-cluster.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster-data-api.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53/README.md +44 -31
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53/integ.private-hosted-zone-from-attributes.ts +41 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53/integ.zone-delegation-iam-stack.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/README.md +65 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-big-response.ts +17 -6
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cloudfront.ts +20 -18
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-nested-stack-source.ts +7 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-stack-source.ts +6 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-stack-ssm-source.ts +7 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-data.ts +99 -59
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-deployed-bucket.ts +10 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-large-file.ts +23 -12
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-loggroup.ts +7 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-efs.ts +77 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-empty.ts +69 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-multiple.ts +89 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-single.ts +77 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-signcontent.ts +11 -7
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution-with-destination-key.ts +15 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution-with-role.ts +29 -14
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution.ts +16 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-basic.ts +65 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-config.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-custom-subnets.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-efs.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-security-groups.ts +72 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-subnet-selection.ts +70 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment.ts +47 -69
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-secretsmanager/integ.secret.dynamic-reference-key.ts +38 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions/integ.sm-jsonpath-with-distributed-map-jsonata.ts +105 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/README.md +15 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.call-aws-service-cross-region-lambda.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-arm64.ts +27 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-default.ts +25 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-mixed-arch.ts +35 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-x86.ts +27 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.invoke-json-path.ts +102 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/README.md +17 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/integ.canary-runtime-validation.ts +43 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/integ.canary.ts +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/README.md +56 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.aws-custom-resource.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.custom-resource-config-lambda-node-runtime.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.external-id.ts +80 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.invoke-function-payload.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +71 -10
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/README.md +32 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/interfaces/README.md +33 -0
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/METADATA +2 -2
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/RECORD +151 -106
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events-targets/integ.kinesis-firehose-stream.ts +0 -33
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/WHEEL +0 -0
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/entry_points.txt +0 -0
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ExpectedResult, IntegTest, Match } from '@aws-cdk/integ-tests-alpha';
|
|
2
|
+
import { Stack, aws_ec2 as ec2, aws_elasticloadbalancingv2 as elbv2, App } from 'aws-cdk-lib';
|
|
3
|
+
import { Construct } from 'constructs';
|
|
4
|
+
|
|
5
|
+
class TestStack extends Stack {
|
|
6
|
+
public readonly lbWithSg: elbv2.NetworkLoadBalancer;
|
|
7
|
+
public readonly lbWithSg2: elbv2.NetworkLoadBalancer;
|
|
8
|
+
public readonly lbWithoutSg: elbv2.NetworkLoadBalancer;
|
|
9
|
+
|
|
10
|
+
constructor(scope: Construct, id: string) {
|
|
11
|
+
super(scope, id);
|
|
12
|
+
|
|
13
|
+
const vpc = new ec2.Vpc(this, 'Stack', {
|
|
14
|
+
maxAzs: 1,
|
|
15
|
+
natGateways: 0,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
this.lbWithSg = new elbv2.NetworkLoadBalancer(this, 'NlbWithSecurityGroup', {
|
|
19
|
+
vpc,
|
|
20
|
+
});
|
|
21
|
+
this.lbWithSg2 = new elbv2.NetworkLoadBalancer(this, 'NlbWithSecurityGroup2', {
|
|
22
|
+
vpc,
|
|
23
|
+
securityGroups: [new ec2.SecurityGroup(this, 'SecurityGroup', {
|
|
24
|
+
vpc,
|
|
25
|
+
allowAllOutbound: true,
|
|
26
|
+
})],
|
|
27
|
+
});
|
|
28
|
+
this.lbWithSg.connections.allowTo(this.lbWithSg2, ec2.Port.tcp(1229));
|
|
29
|
+
this.lbWithoutSg = new elbv2.NetworkLoadBalancer(this, 'NlbWithoutSecurityGroup', {
|
|
30
|
+
vpc,
|
|
31
|
+
disableSecurityGroups: true,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const app = new App({
|
|
37
|
+
postCliContext: {
|
|
38
|
+
'@aws-cdk/aws-elasticloadbalancingv2:networkLoadBalancerWithSecurityGroupByDefault': true,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
const stack = new TestStack(app, 'NlbSecurityGroupStack');
|
|
42
|
+
const integ = new IntegTest(app, 'NlbSecurityGroupInteg', {
|
|
43
|
+
testCases: [stack],
|
|
44
|
+
});
|
|
45
|
+
integ.assertions.awsApiCall('elastic-load-balancing-v2', 'describeLoadBalancers', {
|
|
46
|
+
LoadBalancerArns: [
|
|
47
|
+
stack.lbWithSg.loadBalancerArn,
|
|
48
|
+
stack.lbWithSg2.loadBalancerArn,
|
|
49
|
+
stack.lbWithoutSg.loadBalancerArn,
|
|
50
|
+
],
|
|
51
|
+
}).expect(ExpectedResult.objectLike({
|
|
52
|
+
LoadBalancers: [
|
|
53
|
+
Match.objectLike({
|
|
54
|
+
LoadBalancerArn: stack.lbWithSg.loadBalancerArn,
|
|
55
|
+
SecurityGroups: Match.arrayWith([
|
|
56
|
+
Match.stringLikeRegexp('sg-[0-9a-f]{8,17}'),
|
|
57
|
+
]),
|
|
58
|
+
}),
|
|
59
|
+
Match.objectLike({
|
|
60
|
+
LoadBalancerArn: stack.lbWithSg2.loadBalancerArn,
|
|
61
|
+
SecurityGroups: Match.arrayWith([
|
|
62
|
+
Match.stringLikeRegexp('sg-[0-9a-f]{8,17}'),
|
|
63
|
+
]),
|
|
64
|
+
}),
|
|
65
|
+
Match.objectLike({
|
|
66
|
+
LoadBalancerArn: stack.lbWithoutSg.loadBalancerArn,
|
|
67
|
+
SecurityGroups: undefined,
|
|
68
|
+
}),
|
|
69
|
+
],
|
|
70
|
+
}));
|
|
@@ -206,7 +206,7 @@ const signinFunction = new lambda.Function(testCase, 'Signin', {
|
|
|
206
206
|
functionName: 'cdk-integ-alb-cognito-signin-handler',
|
|
207
207
|
code: lambda.Code.fromAsset('alb-cognito-signin-handler', { exclude: ['*.ts'] }),
|
|
208
208
|
handler: 'index.handler',
|
|
209
|
-
runtime: lambda.Runtime.
|
|
209
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
210
210
|
environment: {
|
|
211
211
|
TEST_USERNAME: testUser.username,
|
|
212
212
|
TEST_PASSWORD: testUser.password,
|
|
@@ -19,6 +19,7 @@ Currently supported are:
|
|
|
19
19
|
- [Invoke an API Destination](#invoke-an-api-destination)
|
|
20
20
|
- [Invoke an AppSync GraphQL API](#invoke-an-appsync-graphql-api)
|
|
21
21
|
- [Put an event on an EventBridge bus](#put-an-event-on-an-eventbridge-bus)
|
|
22
|
+
- [Put an event on a Firehose delivery stream](#put-an-event-on-a-firehose-delivery-stream)
|
|
22
23
|
- [Run an ECS Task](#run-an-ecs-task)
|
|
23
24
|
- [Tagging Tasks](#tagging-tasks)
|
|
24
25
|
- [Launch type for ECS Task](#launch-type-for-ecs-task)
|
|
@@ -528,6 +529,27 @@ rule.addTarget(new targets.EventBus(
|
|
|
528
529
|
));
|
|
529
530
|
```
|
|
530
531
|
|
|
532
|
+
## Put an event on a Firehose delivery stream
|
|
533
|
+
|
|
534
|
+
Use the `FirehoseDeliveryStream` target to put event to an Amazon Data Firehose delivery stream.
|
|
535
|
+
|
|
536
|
+
The code snippet below creates the scheduled event rule that put events to an Amazon Data Firehose delivery stream.
|
|
537
|
+
|
|
538
|
+
```ts
|
|
539
|
+
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
|
|
540
|
+
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
541
|
+
|
|
542
|
+
declare const bucket: s3.Bucket;
|
|
543
|
+
const stream = new firehose.DeliveryStream(this, 'DeliveryStream', {
|
|
544
|
+
destination: new firehose.S3Bucket(bucket),
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
const rule = new events.Rule(this, 'Rule', {
|
|
548
|
+
schedule: events.Schedule.expression('rate(1 minute)'),
|
|
549
|
+
});
|
|
550
|
+
rule.addTarget(new targets.FirehoseDeliveryStream(stream));
|
|
551
|
+
```
|
|
552
|
+
|
|
531
553
|
## Run an ECS Task
|
|
532
554
|
|
|
533
555
|
Use the `EcsTask` target to run an ECS Task.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as events from 'aws-cdk-lib/aws-events';
|
|
2
|
+
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
|
|
3
|
+
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
4
|
+
import * as cdk from 'aws-cdk-lib';
|
|
5
|
+
import * as targets from 'aws-cdk-lib/aws-events-targets';
|
|
6
|
+
import { IntegTest, ExpectedResult, AwsApiCall } from '@aws-cdk/integ-tests-alpha';
|
|
7
|
+
|
|
8
|
+
// ---------------------------------
|
|
9
|
+
// Define a rule that triggers a put to a Firehose delivery stream every 1min.
|
|
10
|
+
|
|
11
|
+
const app = new cdk.App();
|
|
12
|
+
|
|
13
|
+
const stack = new cdk.Stack(app, 'aws-cdk-firehose-event-target');
|
|
14
|
+
|
|
15
|
+
const bucket = new s3.Bucket(stack, 'firehose-bucket', {
|
|
16
|
+
autoDeleteObjects: true,
|
|
17
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
18
|
+
});
|
|
19
|
+
const deliveryStream = new firehose.DeliveryStream(stack, 'MyDeliveryStream', {
|
|
20
|
+
destination: new firehose.S3Bucket(bucket, {
|
|
21
|
+
bufferingInterval: cdk.Duration.seconds(30),
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const event = new events.Rule(stack, 'EveryMinute', {
|
|
26
|
+
schedule: events.Schedule.rate(cdk.Duration.minutes(1)),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
event.addTarget(new targets.FirehoseDeliveryStream(deliveryStream));
|
|
30
|
+
|
|
31
|
+
const testCase = new IntegTest(app, 'firehose-event-target-integ', {
|
|
32
|
+
testCases: [stack],
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const s3ApiCall = testCase.assertions.awsApiCall('S3', 'listObjectsV2', {
|
|
36
|
+
Bucket: bucket.bucketName,
|
|
37
|
+
MaxKeys: 1,
|
|
38
|
+
}).expect(ExpectedResult.objectLike({
|
|
39
|
+
KeyCount: 1,
|
|
40
|
+
})).waitForAssertions({
|
|
41
|
+
interval: cdk.Duration.seconds(30),
|
|
42
|
+
totalTimeout: cdk.Duration.minutes(10),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
if (s3ApiCall instanceof AwsApiCall) {
|
|
46
|
+
s3ApiCall.waiterProvider?.addToRolePolicy({
|
|
47
|
+
Effect: 'Allow',
|
|
48
|
+
Action: ['s3:GetObject', 's3:ListBucket'],
|
|
49
|
+
Resource: ['*'],
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { App, Stack } from 'aws-cdk-lib';
|
|
2
2
|
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
3
3
|
import { AccountRootPrincipal, Grant, ManagedPolicy, PolicyStatement, Role, User } from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
4
5
|
|
|
5
6
|
const app = new App();
|
|
6
7
|
|
|
@@ -34,6 +35,14 @@ policy.attachToRole(role);
|
|
|
34
35
|
const importedRole = Role.fromRoleArn(stack, 'ImportedRole', role.roleArn);
|
|
35
36
|
policy.attachToRole(importedRole);
|
|
36
37
|
|
|
38
|
+
// Can be passed to grantInvoke, see https://github.com/aws/aws-cdk/issues/32980
|
|
39
|
+
const func = new lambda.Function(stack, 'Function', {
|
|
40
|
+
runtime: lambda.Runtime.NODEJS_LATEST,
|
|
41
|
+
handler: 'index.handler',
|
|
42
|
+
code: lambda.Code.fromInline('export const handler = async () => null'),
|
|
43
|
+
});
|
|
44
|
+
func.grantInvoke(policy);
|
|
45
|
+
|
|
37
46
|
new IntegTest(app, 'ManagedPolicyInteg', {
|
|
38
47
|
testCases: [stack],
|
|
39
48
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { App, Stack } from 'aws-cdk-lib';
|
|
2
2
|
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
3
3
|
import { AccountRootPrincipal, Grant, Policy, PolicyStatement, Role, User } from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
4
5
|
|
|
5
6
|
const app = new App();
|
|
6
7
|
|
|
@@ -21,6 +22,14 @@ role.grantAssumeRole(user);
|
|
|
21
22
|
|
|
22
23
|
Grant.addToPrincipal({ actions: ['iam:*'], resourceArns: [role.roleArn], grantee: policy2 });
|
|
23
24
|
|
|
25
|
+
// Can be passed to grantInvoke, see https://github.com/aws/aws-cdk/issues/32980
|
|
26
|
+
const func = new lambda.Function(stack, 'Function', {
|
|
27
|
+
runtime: lambda.Runtime.NODEJS_LATEST,
|
|
28
|
+
handler: 'index.handler',
|
|
29
|
+
code: lambda.Code.fromInline('export const handler = async () => null'),
|
|
30
|
+
});
|
|
31
|
+
func.grantInvoke(policy);
|
|
32
|
+
|
|
24
33
|
new IntegTest(app, 'PolicyInteg', {
|
|
25
34
|
testCases: [stack],
|
|
26
35
|
});
|
|
@@ -15,6 +15,7 @@ intake and aggregation.
|
|
|
15
15
|
- [Write Permissions](#write-permissions)
|
|
16
16
|
- [Custom Permissions](#custom-permissions)
|
|
17
17
|
- [Metrics](#metrics)
|
|
18
|
+
- [Shard-level Metrics](#shard-level-metrics)
|
|
18
19
|
- [Stream Consumers](#stream-consumers)
|
|
19
20
|
- [Read Permissions](#read-permissions-1)
|
|
20
21
|
- [Resource Policy](#resource-policy)
|
|
@@ -191,6 +192,47 @@ stream.metricGetRecordsSuccess();
|
|
|
191
192
|
stream.metricGetRecordsSuccess({ statistic: 'Maximum' });
|
|
192
193
|
```
|
|
193
194
|
|
|
195
|
+
#### Shard-level Metrics
|
|
196
|
+
|
|
197
|
+
You can enable enhanced shard-level metrics for your Kinesis stream to get detailed monitoring of individual shards. Shard-level metrics provide more granular insights into the performance and health of your stream.
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
const stream = new kinesis.Stream(this, 'MyStream', {
|
|
201
|
+
shardLevelMetrics: [kinesis.ShardLevelMetrics.ALL],
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
You can also specify individual metrics that you want to monitor:
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
const stream = new kinesis.Stream(this, 'MyStream', {
|
|
209
|
+
shardLevelMetrics: [
|
|
210
|
+
kinesis.ShardLevelMetrics.INCOMING_BYTES,
|
|
211
|
+
kinesis.ShardLevelMetrics.INCOMING_RECORDS,
|
|
212
|
+
kinesis.ShardLevelMetrics.ITERATOR_AGE_MILLISECONDS,
|
|
213
|
+
kinesis.ShardLevelMetrics.OUTGOING_BYTES,
|
|
214
|
+
kinesis.ShardLevelMetrics.OUTGOING_RECORDS,
|
|
215
|
+
kinesis.ShardLevelMetrics.READ_PROVISIONED_THROUGHPUT_EXCEEDED,
|
|
216
|
+
kinesis.ShardLevelMetrics.WRITE_PROVISIONED_THROUGHPUT_EXCEEDED,
|
|
217
|
+
],
|
|
218
|
+
});
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Available shard-level metrics include:
|
|
222
|
+
|
|
223
|
+
- `INCOMING_BYTES` - The number of bytes successfully put to the shard
|
|
224
|
+
- `INCOMING_RECORDS` - The number of records successfully put to the shard
|
|
225
|
+
- `ITERATOR_AGE_MILLISECONDS` - The age of the last record in all GetRecords calls made against a shard
|
|
226
|
+
- `OUTGOING_BYTES` - The number of bytes retrieved from the shard
|
|
227
|
+
- `OUTGOING_RECORDS` - The number of records retrieved from the shard
|
|
228
|
+
- `READ_PROVISIONED_THROUGHPUT_EXCEEDED` - The number of GetRecords calls throttled for the shard
|
|
229
|
+
- `WRITE_PROVISIONED_THROUGHPUT_EXCEEDED` - The number of records rejected due to throttling for the shard
|
|
230
|
+
- `ALL` - All available metrics
|
|
231
|
+
|
|
232
|
+
Note: You cannot specify `ALL` together with other individual metrics. If you want all metrics, use `ALL` alone.
|
|
233
|
+
|
|
234
|
+
For more information about shard-level metrics, see [Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch](https://docs.aws.amazon.com/streams/latest/dev/monitoring-with-cloudwatch.html#kinesis-metrics-shard).
|
|
235
|
+
|
|
194
236
|
## Stream Consumers
|
|
195
237
|
|
|
196
238
|
Creating stream consumers allow consumers to receive data from the stream using enhanced fan-out at a rate of up to 2 MiB per second for every shard.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { App, Stack, RemovalPolicies } from 'aws-cdk-lib';
|
|
2
|
+
import * as kinesis from 'aws-cdk-lib/aws-kinesis';
|
|
3
|
+
import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
4
|
+
|
|
5
|
+
const app = new App();
|
|
6
|
+
const stack = new Stack(app, 'kinesis-stream-shard-level-monitoring-stack');
|
|
7
|
+
|
|
8
|
+
const explicitStream = new kinesis.Stream(stack, 'ExplicitStream', {
|
|
9
|
+
shardLevelMetrics: [
|
|
10
|
+
kinesis.ShardLevelMetrics.INCOMING_BYTES,
|
|
11
|
+
kinesis.ShardLevelMetrics.INCOMING_RECORDS,
|
|
12
|
+
kinesis.ShardLevelMetrics.ITERATOR_AGE_MILLISECONDS,
|
|
13
|
+
kinesis.ShardLevelMetrics.OUTGOING_BYTES,
|
|
14
|
+
kinesis.ShardLevelMetrics.OUTGOING_RECORDS,
|
|
15
|
+
kinesis.ShardLevelMetrics.WRITE_PROVISIONED_THROUGHPUT_EXCEEDED,
|
|
16
|
+
kinesis.ShardLevelMetrics.READ_PROVISIONED_THROUGHPUT_EXCEEDED,
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const allStream = new kinesis.Stream(stack, 'AllStream', {
|
|
21
|
+
shardLevelMetrics: [kinesis.ShardLevelMetrics.ALL],
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
RemovalPolicies.of(stack).destroy();
|
|
25
|
+
|
|
26
|
+
const integ = new IntegTest(app, 'integ-kinesis-stream-consumer', {
|
|
27
|
+
testCases: [stack],
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const streams = [explicitStream, allStream];
|
|
31
|
+
streams.forEach((stream) => {
|
|
32
|
+
integ.assertions.awsApiCall('Kinesis', 'describeStream', {
|
|
33
|
+
StreamName: stream.streamName,
|
|
34
|
+
}).expect(ExpectedResult.objectLike({
|
|
35
|
+
StreamDescription: {
|
|
36
|
+
ShardLevelMetrics: [
|
|
37
|
+
'IncomingBytes',
|
|
38
|
+
'IncomingRecords',
|
|
39
|
+
'IteratorAgeMilliseconds',
|
|
40
|
+
'OutgoingBytes',
|
|
41
|
+
'OutgoingRecords',
|
|
42
|
+
'WriteProvisionedThroughputExceeded',
|
|
43
|
+
'ReadProvisionedThroughputExceeded',
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
}));
|
|
47
|
+
});
|
|
@@ -125,6 +125,102 @@ const s3Destination = new firehose.S3Bucket(bucket, {
|
|
|
125
125
|
});
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
+
## Data Format Conversion
|
|
129
|
+
|
|
130
|
+
Data format conversion allows automatic conversion of inputs from JSON to either Parquet or ORC.
|
|
131
|
+
Converting JSON records to columnar formats like Parquet or ORC can help speed up analytical querying while also increasing compression efficiency.
|
|
132
|
+
When data format conversion is specified, it automatically enables Snappy compression on the output.
|
|
133
|
+
|
|
134
|
+
Only S3 Destinations support data format conversion.
|
|
135
|
+
|
|
136
|
+
An example of defining an S3 destination configured with data format conversion:
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
declare const bucket: s3.Bucket;
|
|
140
|
+
declare const schemaGlueTable: glue.CfnTable;
|
|
141
|
+
const s3Destination = new firehose.S3Bucket(bucket, {
|
|
142
|
+
dataFormatConversion: {
|
|
143
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaGlueTable),
|
|
144
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
145
|
+
outputFormat: firehose.OutputFormat.PARQUET,
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
When data format conversion is enabled, the Delivery Stream's buffering size must be at least 64 MiB.
|
|
151
|
+
Additionally, the default buffering size is changed from 5 MiB to 128 MiB. This mirrors the Cloudformation behavior.
|
|
152
|
+
|
|
153
|
+
You can only parse JSON and transform it into either Parquet or ORC:
|
|
154
|
+
- to read JSON using OpenX parser, choose `InputFormat.OPENX_JSON`.
|
|
155
|
+
- to read JSON using Hive parser, choose `InputFormat.HIVE_JSON`.
|
|
156
|
+
- to transform into Parquet, choose `OutputFormat.PARQUET`.
|
|
157
|
+
- to transform into ORC, choose `OutputFormat.ORC`.
|
|
158
|
+
|
|
159
|
+
The following subsections explain how to specify advanced configuration options for each input and output format if the defaults are not desirable
|
|
160
|
+
|
|
161
|
+
### Input Format: OpenX JSON
|
|
162
|
+
|
|
163
|
+
Example creation of custom OpenX JSON InputFormat:
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
const inputFormat = new firehose.OpenXJsonInputFormat({
|
|
167
|
+
lowercaseColumnNames: false,
|
|
168
|
+
columnToJsonKeyMappings: {"ts": "timestamp"},
|
|
169
|
+
convertDotsInJsonKeysToUnderscores: true,
|
|
170
|
+
})
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Input Format: Hive JSON
|
|
174
|
+
|
|
175
|
+
Example creation of custom Hive JSON InputFormat:
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
const inputFormat = new firehose.HiveJsonInputFormat({
|
|
179
|
+
timestampParsers: [
|
|
180
|
+
firehose.TimestampParser.fromFormatString('yyyy-MM-dd'),
|
|
181
|
+
firehose.TimestampParser.EPOCH_MILLIS,
|
|
182
|
+
]
|
|
183
|
+
})
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Hive JSON allows you to specify custom timestamp formats to parse. The syntax of the format string is Joda Time.
|
|
187
|
+
|
|
188
|
+
To parse timestamps formatted as milliseconds since epoch, use the convenience constant `TimestampParser.EPOCH_MILLIS`.
|
|
189
|
+
|
|
190
|
+
### Output Format: Parquet
|
|
191
|
+
|
|
192
|
+
Example of a custom Parquet OutputFormat, with all values changed from the defaults.
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
const outputFormat = new firehose.ParquetOutputFormat({
|
|
196
|
+
blockSize: Size.mebibytes(512),
|
|
197
|
+
compression: firehose.ParquetCompression.UNCOMPRESSED,
|
|
198
|
+
enableDictionaryCompression: true,
|
|
199
|
+
maxPadding: Size.bytes(10),
|
|
200
|
+
pageSize: Size.mebibytes(2),
|
|
201
|
+
writerVersion: firehose.ParquetWriterVersion.V2,
|
|
202
|
+
})
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Output Format: ORC
|
|
206
|
+
|
|
207
|
+
Example creation of custom ORC OutputFormat, with all values changed from the defaults.
|
|
208
|
+
|
|
209
|
+
```ts
|
|
210
|
+
const outputFormat = new firehose.OrcOutputFormat({
|
|
211
|
+
formatVersion: firehose.OrcFormatVersion.V0_11,
|
|
212
|
+
blockSize: Size.mebibytes(256),
|
|
213
|
+
compression: firehose.OrcCompression.NONE,
|
|
214
|
+
bloomFilterColumns: ['columnA'],
|
|
215
|
+
bloomFilterFalsePositiveProbability: 0.1,
|
|
216
|
+
dictionaryKeyThreshold: 0.7,
|
|
217
|
+
enablePadding: true,
|
|
218
|
+
paddingTolerance: 0.2,
|
|
219
|
+
rowIndexStride: 9000,
|
|
220
|
+
stripeSize: Size.mebibytes(32),
|
|
221
|
+
})
|
|
222
|
+
```
|
|
223
|
+
|
|
128
224
|
## Server-side Encryption
|
|
129
225
|
|
|
130
226
|
Enabling server-side encryption (SSE) requires Amazon Data Firehose to encrypt all data
|
|
@@ -387,8 +483,11 @@ Data can be transformed before being delivered to destinations. There are two ty
|
|
|
387
483
|
data processing for delivery streams: record transformation with AWS Lambda, and record
|
|
388
484
|
format conversion using a schema stored in an AWS Glue table. If both types of data
|
|
389
485
|
processing are configured, then the Lambda transformation is performed first. By default,
|
|
390
|
-
no data processing occurs.
|
|
391
|
-
|
|
486
|
+
no data processing occurs.
|
|
487
|
+
|
|
488
|
+
This construct library currently only supports data
|
|
489
|
+
transformation with AWS Lambda and some built-in data processors.
|
|
490
|
+
See [#15501](https://github.com/aws/aws-cdk/issues/15501)
|
|
392
491
|
to track the status of adding support for record format conversion.
|
|
393
492
|
|
|
394
493
|
### Data transformation with AWS Lambda
|
|
@@ -424,7 +523,7 @@ const lambdaProcessor = new firehose.LambdaFunctionProcessor(lambdaFunction, {
|
|
|
424
523
|
});
|
|
425
524
|
declare const bucket: s3.Bucket;
|
|
426
525
|
const s3Destination = new firehose.S3Bucket(bucket, {
|
|
427
|
-
|
|
526
|
+
processors: [lambdaProcessor],
|
|
428
527
|
});
|
|
429
528
|
new firehose.DeliveryStream(this, 'Delivery Stream', {
|
|
430
529
|
destination: s3Destination,
|
|
@@ -436,6 +535,60 @@ new firehose.DeliveryStream(this, 'Delivery Stream', {
|
|
|
436
535
|
See: [Data Transformation](https://docs.aws.amazon.com/firehose/latest/dev/data-transformation.html)
|
|
437
536
|
in the *Amazon Data Firehose Developer Guide*.
|
|
438
537
|
|
|
538
|
+
### Add a new line delimiter when delivering data to Amazon S3
|
|
539
|
+
|
|
540
|
+
You can specify the `AppendDelimiterToRecordProcessor` built-in processor to add a new line delimiter between records in objects that are delivered to Amazon S3. This can be helpful for parsing objects in Amazon S3.
|
|
541
|
+
For details, see [Use Amazon S3 bucket prefix to deliver data](https://docs.aws.amazon.com/firehose/latest/dev/dynamic-partitioning-s3bucketprefix.html).
|
|
542
|
+
|
|
543
|
+
```ts
|
|
544
|
+
declare const bucket: s3.Bucket;
|
|
545
|
+
const s3Destination = new firehose.S3Bucket(bucket, {
|
|
546
|
+
processors: [
|
|
547
|
+
new firehose.AppendDelimiterToRecordProcessor(),
|
|
548
|
+
],
|
|
549
|
+
});
|
|
550
|
+
new firehose.DeliveryStream(this, 'Delivery Stream', {
|
|
551
|
+
destination: s3Destination,
|
|
552
|
+
});
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
### Decompress and extract message of CloudWatch Logs
|
|
556
|
+
|
|
557
|
+
CloudWatch Logs events are sent to Firehose in compressed gzip format. If you want to deliver decompressed log events to Firehose destinations, you can use the `DecompressionProcessor` to automatically decompress CloudWatch Logs.
|
|
558
|
+
For details, see [Send CloudWatch Logs to Firehose](https://docs.aws.amazon.com/firehose/latest/dev/writing-with-cloudwatch-logs.html).
|
|
559
|
+
|
|
560
|
+
You may also needed to specify `AppendDelimiterToRecordProcessor`
|
|
561
|
+
because decompressed log events record has no trailing newline.
|
|
562
|
+
|
|
563
|
+
```ts
|
|
564
|
+
declare const bucket: s3.Bucket;
|
|
565
|
+
const s3Destination = new firehose.S3Bucket(bucket, {
|
|
566
|
+
processors: [
|
|
567
|
+
new firehose.DecompressionProcessor(),
|
|
568
|
+
new firehose.AppendDelimiterToRecordProcessor(),
|
|
569
|
+
],
|
|
570
|
+
});
|
|
571
|
+
new firehose.DeliveryStream(this, 'Delivery Stream', {
|
|
572
|
+
destination: s3Destination,
|
|
573
|
+
});
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
When you enable decompression, you have the option to also enable message extraction. When using message extraction, Firehose filters out all metadata, such as owner, loggroup, logstream, and others from the decompressed CloudWatch Logs records and delivers only the content inside the message fields.
|
|
577
|
+
|
|
578
|
+
```ts
|
|
579
|
+
declare const bucket: s3.Bucket;
|
|
580
|
+
const s3Destination = new firehose.S3Bucket(bucket, {
|
|
581
|
+
processors: [
|
|
582
|
+
new firehose.DecompressionProcessor(),
|
|
583
|
+
new firehose.CloudWatchLogProcessor({ dataMessageExtraction: true }),
|
|
584
|
+
],
|
|
585
|
+
});
|
|
586
|
+
new firehose.DeliveryStream(this, 'Delivery Stream', {
|
|
587
|
+
destination: s3Destination,
|
|
588
|
+
});
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
|
|
439
592
|
## Specifying an IAM role
|
|
440
593
|
|
|
441
594
|
The DeliveryStream class automatically creates IAM service roles with all the minimum
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
|
|
4
|
+
import * as lambdanodejs from 'aws-cdk-lib/aws-lambda-nodejs';
|
|
5
|
+
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
6
|
+
import * as cdk from 'aws-cdk-lib';
|
|
7
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
8
|
+
|
|
9
|
+
const app = new cdk.App();
|
|
10
|
+
|
|
11
|
+
const stack = new cdk.Stack(app, 'firehose-delivery-stream-cloudwatch-logs-processors');
|
|
12
|
+
|
|
13
|
+
const bucket = new s3.Bucket(stack, 'DestinationBucket', {
|
|
14
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
15
|
+
autoDeleteObjects: true,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const dataProcessorFunction = new lambdanodejs.NodejsFunction(stack, 'DataProcessorFunction', {
|
|
19
|
+
entry: path.join(__dirname, 'lambda-data-processor.js'),
|
|
20
|
+
timeout: cdk.Duration.minutes(1),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
new firehose.DeliveryStream(stack, 'DecompressCloudWatchLogsEntry', {
|
|
24
|
+
destination: new firehose.S3Bucket(bucket, {
|
|
25
|
+
processors: [
|
|
26
|
+
new firehose.DecompressionProcessor(),
|
|
27
|
+
new firehose.AppendDelimiterToRecordProcessor(),
|
|
28
|
+
new firehose.LambdaFunctionProcessor(dataProcessorFunction),
|
|
29
|
+
],
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
new firehose.DeliveryStream(stack, 'ExtractCloudWatchLogsEntry', {
|
|
34
|
+
destination: new firehose.S3Bucket(bucket, {
|
|
35
|
+
processors: [
|
|
36
|
+
new firehose.DecompressionProcessor(),
|
|
37
|
+
new firehose.CloudWatchLogProcessor({ dataMessageExtraction: true }),
|
|
38
|
+
new firehose.LambdaFunctionProcessor(dataProcessorFunction),
|
|
39
|
+
],
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
new IntegTest(app, 'integ-tests', {
|
|
44
|
+
testCases: [stack],
|
|
45
|
+
});
|