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,154 @@
|
|
|
1
|
+
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
|
|
2
|
+
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
3
|
+
import * as glue from 'aws-cdk-lib/aws-glue';
|
|
4
|
+
import * as cdk from 'aws-cdk-lib';
|
|
5
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
6
|
+
import { Construct } from 'constructs';
|
|
7
|
+
|
|
8
|
+
const app = new cdk.App();
|
|
9
|
+
|
|
10
|
+
const SCHEMA_COLUMNS = [
|
|
11
|
+
{
|
|
12
|
+
name: 'column_a',
|
|
13
|
+
type: 'string',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'column_b',
|
|
17
|
+
type: 'string',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
class TestStack extends cdk.Stack {
|
|
22
|
+
public readonly deliveryStreamsToTest: firehose.IDeliveryStream[];
|
|
23
|
+
public readonly bucket: s3.Bucket;
|
|
24
|
+
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
|
|
25
|
+
super(scope, id, props);
|
|
26
|
+
|
|
27
|
+
this.bucket = new s3.Bucket(this, 'Bucket', {
|
|
28
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
29
|
+
autoDeleteObjects: true,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const database = new glue.CfnDatabase(this, 'Database', {
|
|
33
|
+
databaseInput: {
|
|
34
|
+
description: 'My database',
|
|
35
|
+
},
|
|
36
|
+
catalogId: this.account,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const registry = new glue.CfnRegistry(this, 'SchemaRegistry', {
|
|
40
|
+
name: 'my_schema_registry',
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const inlineSchemaTable = this.createTableWithInlineSchema(database);
|
|
44
|
+
const inlineSchemaDeliveryStream = this.createDeliveryStreamWithDataFormatConversion('InlineSchema', {
|
|
45
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(inlineSchemaTable),
|
|
46
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
47
|
+
outputFormat: firehose.OutputFormat.PARQUET,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const registrySchemaTable = this.createTableWithRegistrySchema(database, registry);
|
|
51
|
+
const registrySchemaDeliveryStream = this.createDeliveryStreamWithDataFormatConversion('RegistrySchema', {
|
|
52
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(registrySchemaTable),
|
|
53
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
54
|
+
outputFormat: firehose.OutputFormat.PARQUET,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
this.deliveryStreamsToTest = [
|
|
58
|
+
inlineSchemaDeliveryStream,
|
|
59
|
+
registrySchemaDeliveryStream,
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private createTableWithInlineSchema(database: glue.CfnDatabase): glue.CfnTable {
|
|
64
|
+
return new glue.CfnTable(this, 'InlineSchemaTable', {
|
|
65
|
+
catalogId: database.catalogId,
|
|
66
|
+
databaseName: database.ref,
|
|
67
|
+
tableInput: {
|
|
68
|
+
storageDescriptor: {
|
|
69
|
+
columns: SCHEMA_COLUMNS,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private createTableWithRegistrySchema(database: glue.CfnDatabase, registry: glue.CfnRegistry): glue.CfnTable {
|
|
76
|
+
const schemaDefinition = JSON.stringify({
|
|
77
|
+
type: 'record',
|
|
78
|
+
name: 'MyRecord',
|
|
79
|
+
fields: SCHEMA_COLUMNS,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const schema = new glue.CfnSchema(this, 'Schema', {
|
|
83
|
+
registry: {
|
|
84
|
+
arn: registry.attrArn,
|
|
85
|
+
},
|
|
86
|
+
compatibility: 'NONE',
|
|
87
|
+
dataFormat: 'AVRO',
|
|
88
|
+
name: 'my_schema',
|
|
89
|
+
schemaDefinition: schemaDefinition,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return new glue.CfnTable(this, 'RegistrySchemaTable', {
|
|
93
|
+
catalogId: database.catalogId,
|
|
94
|
+
databaseName: database.ref,
|
|
95
|
+
tableInput: {
|
|
96
|
+
storageDescriptor: {
|
|
97
|
+
schemaReference: {
|
|
98
|
+
schemaVersionId: schema.attrInitialSchemaVersionId,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private createDeliveryStreamWithDataFormatConversion(
|
|
106
|
+
id: string,
|
|
107
|
+
dataFormatConversion: firehose.DataFormatConversionProps,
|
|
108
|
+
): firehose.DeliveryStream {
|
|
109
|
+
return new firehose.DeliveryStream(this, id, {
|
|
110
|
+
destination: new firehose.S3Bucket(this.bucket, {
|
|
111
|
+
dataOutputPrefix: `success/${id}/`,
|
|
112
|
+
errorOutputPrefix: `error/${id}/`,
|
|
113
|
+
bufferingInterval: cdk.Duration.seconds(0),
|
|
114
|
+
dataFormatConversion: dataFormatConversion,
|
|
115
|
+
}),
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const stack = new TestStack(app, 'RecordFormatConversionSchema');
|
|
121
|
+
const testCase = new integ.IntegTest(app, 'RecordFormatConversionSchemaTest', {
|
|
122
|
+
testCases: [stack],
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const assertions = testCase.assertions;
|
|
126
|
+
|
|
127
|
+
// Test each delivery stream with the same input, and verify that each writes the output to the success prefix
|
|
128
|
+
// Relies on waiting timeout to tell if record format conversion failed.
|
|
129
|
+
stack.deliveryStreamsToTest.forEach(deliveryStream => {
|
|
130
|
+
const putDataCall = assertions.awsApiCall('Firehose', 'putRecord', {
|
|
131
|
+
DeliveryStreamName: deliveryStream.deliveryStreamName,
|
|
132
|
+
Record: {
|
|
133
|
+
Data: JSON.stringify({
|
|
134
|
+
Column_A: 'foo',
|
|
135
|
+
Column_B: 'bar',
|
|
136
|
+
}),
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
const waitForResultCall = assertions.awsApiCall('S3', 'listObjectsV2', {
|
|
141
|
+
Bucket: stack.bucket.bucketName,
|
|
142
|
+
Prefix: `success/${deliveryStream.node.id}/`,
|
|
143
|
+
}).expect(integ.ExpectedResult.objectLike({
|
|
144
|
+
KeyCount: 1,
|
|
145
|
+
})).waitForAssertions({
|
|
146
|
+
interval: cdk.Duration.seconds(5),
|
|
147
|
+
totalTimeout: cdk.Duration.minutes(2),
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
const api = waitForResultCall as integ.AwsApiCall;
|
|
151
|
+
api.waiterProvider?.addPolicyStatementFromSdkCall('s3', 'ListBucket', [stack.bucket.bucketArn]);
|
|
152
|
+
api.waiterProvider?.addPolicyStatementFromSdkCall('s3', 'GetObject', [stack.bucket.arnForObjects('*')]);
|
|
153
|
+
putDataCall.next(waitForResultCall);
|
|
154
|
+
});
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
|
|
2
|
+
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
3
|
+
import * as glue from 'aws-cdk-lib/aws-glue';
|
|
4
|
+
import * as cdk from 'aws-cdk-lib';
|
|
5
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
6
|
+
import { Construct } from 'constructs';
|
|
7
|
+
|
|
8
|
+
const app = new cdk.App();
|
|
9
|
+
|
|
10
|
+
const SCHEMA_COLUMNS = [
|
|
11
|
+
{
|
|
12
|
+
name: 'column_a',
|
|
13
|
+
type: 'string',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'column_b',
|
|
17
|
+
type: 'string',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
class TestStack extends cdk.Stack {
|
|
22
|
+
public readonly bucket: s3.Bucket;
|
|
23
|
+
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
|
|
24
|
+
super(scope, id, props);
|
|
25
|
+
|
|
26
|
+
this.bucket = new s3.Bucket(this, 'Bucket', {
|
|
27
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
28
|
+
autoDeleteObjects: true,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const database = new glue.CfnDatabase(this, 'Database', {
|
|
32
|
+
databaseInput: {
|
|
33
|
+
description: 'My database',
|
|
34
|
+
},
|
|
35
|
+
catalogId: this.account,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const schemaTable = this.createTableWithInlineSchema(database);
|
|
39
|
+
|
|
40
|
+
// default hive json input with default orc output
|
|
41
|
+
this.createDeliveryStreamWithDataFormatConversion('DefaultHiveJsonOrc', {
|
|
42
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
43
|
+
inputFormat: firehose.InputFormat.HIVE_JSON,
|
|
44
|
+
outputFormat: firehose.OutputFormat.ORC,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// default openx json input with default parquet output
|
|
48
|
+
this.createDeliveryStreamWithDataFormatConversion('DefaultOpenXJsonParquet', {
|
|
49
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
50
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
51
|
+
outputFormat: firehose.OutputFormat.PARQUET,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// custom hive json input
|
|
55
|
+
this.createDeliveryStreamWithDataFormatConversion('CustomHiveJson', {
|
|
56
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
57
|
+
inputFormat: new firehose.HiveJsonInputFormat({
|
|
58
|
+
timestampParsers: [
|
|
59
|
+
firehose.TimestampParser.EPOCH_MILLIS,
|
|
60
|
+
firehose.TimestampParser.fromFormatString('yyyy-MM-dd'),
|
|
61
|
+
],
|
|
62
|
+
}),
|
|
63
|
+
outputFormat: firehose.OutputFormat.ORC,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// custom openx json input
|
|
67
|
+
this.createDeliveryStreamWithDataFormatConversion('CustomOpenXJson', {
|
|
68
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
69
|
+
inputFormat: new firehose.OpenXJsonInputFormat({
|
|
70
|
+
lowercaseColumnNames: false,
|
|
71
|
+
columnToJsonKeyMappings: { column_yay: 'Column_A' },
|
|
72
|
+
convertDotsInJsonKeysToUnderscores: true,
|
|
73
|
+
}),
|
|
74
|
+
outputFormat: firehose.OutputFormat.PARQUET,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// custom orc output
|
|
78
|
+
this.createDeliveryStreamWithDataFormatConversion('CustomOrc', {
|
|
79
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
80
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
81
|
+
outputFormat: new firehose.OrcOutputFormat({
|
|
82
|
+
blockSize: cdk.Size.mebibytes(256),
|
|
83
|
+
bloomFilterColumns: ['column_a'],
|
|
84
|
+
bloomFilterFalsePositiveProbability: 0.5,
|
|
85
|
+
compression: firehose.OrcCompression.NONE,
|
|
86
|
+
dictionaryKeyThreshold: 0.3,
|
|
87
|
+
formatVersion: firehose.OrcFormatVersion.V0_11,
|
|
88
|
+
enablePadding: true,
|
|
89
|
+
paddingTolerance: 0.4,
|
|
90
|
+
rowIndexStride: 5000,
|
|
91
|
+
stripeSize: cdk.Size.mebibytes(32),
|
|
92
|
+
}),
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// ORC ZLIB compression
|
|
96
|
+
this.createDeliveryStreamWithDataFormatConversion('CustomOrcZlib', {
|
|
97
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
98
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
99
|
+
outputFormat: new firehose.OrcOutputFormat({
|
|
100
|
+
compression: firehose.OrcCompression.ZLIB,
|
|
101
|
+
formatVersion: firehose.OrcFormatVersion.V0_12,
|
|
102
|
+
}),
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// ORC SNAPPY compression
|
|
106
|
+
this.createDeliveryStreamWithDataFormatConversion('CustomOrcSnappy', {
|
|
107
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
108
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
109
|
+
outputFormat: new firehose.OrcOutputFormat({
|
|
110
|
+
compression: firehose.OrcCompression.SNAPPY,
|
|
111
|
+
}),
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// custom parquet output format
|
|
115
|
+
this.createDeliveryStreamWithDataFormatConversion('CustomParquet', {
|
|
116
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
117
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
118
|
+
outputFormat: new firehose.ParquetOutputFormat({
|
|
119
|
+
blockSize: cdk.Size.mebibytes(128),
|
|
120
|
+
pageSize: cdk.Size.mebibytes(2),
|
|
121
|
+
compression: firehose.ParquetCompression.UNCOMPRESSED,
|
|
122
|
+
writerVersion: firehose.ParquetWriterVersion.V2,
|
|
123
|
+
enableDictionaryCompression: true,
|
|
124
|
+
maxPadding: cdk.Size.bytes(100),
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// Parquet GZIP compression
|
|
129
|
+
this.createDeliveryStreamWithDataFormatConversion('CustomParquetGzip', {
|
|
130
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
131
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
132
|
+
outputFormat: new firehose.ParquetOutputFormat({
|
|
133
|
+
compression: firehose.ParquetCompression.GZIP,
|
|
134
|
+
writerVersion: firehose.ParquetWriterVersion.V1,
|
|
135
|
+
}),
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// Parquet SNAPPY compression
|
|
139
|
+
this.createDeliveryStreamWithDataFormatConversion('CustomParquetSnappy', {
|
|
140
|
+
schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaTable),
|
|
141
|
+
inputFormat: firehose.InputFormat.OPENX_JSON,
|
|
142
|
+
outputFormat: new firehose.ParquetOutputFormat({
|
|
143
|
+
compression: firehose.ParquetCompression.SNAPPY,
|
|
144
|
+
}),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
private createTableWithInlineSchema(database: glue.CfnDatabase): glue.CfnTable {
|
|
149
|
+
return new glue.CfnTable(this, 'InlineSchemaTable', {
|
|
150
|
+
catalogId: database.catalogId,
|
|
151
|
+
databaseName: database.ref,
|
|
152
|
+
tableInput: {
|
|
153
|
+
storageDescriptor: {
|
|
154
|
+
columns: SCHEMA_COLUMNS,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
private createDeliveryStreamWithDataFormatConversion(
|
|
161
|
+
id: string,
|
|
162
|
+
dataFormatConversion: firehose.DataFormatConversionProps,
|
|
163
|
+
): firehose.DeliveryStream {
|
|
164
|
+
return new firehose.DeliveryStream(this, id, {
|
|
165
|
+
destination: new firehose.S3Bucket(this.bucket, {
|
|
166
|
+
dataOutputPrefix: `success/${id}/`,
|
|
167
|
+
errorOutputPrefix: `error/${id}/`,
|
|
168
|
+
bufferingInterval: cdk.Duration.seconds(0),
|
|
169
|
+
dataFormatConversion: dataFormatConversion,
|
|
170
|
+
}),
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const stack = new TestStack(app, 'RecordFormatConversion');
|
|
176
|
+
new integ.IntegTest(app, 'RecordFormatConversionTest', {
|
|
177
|
+
testCases: [stack],
|
|
178
|
+
});
|
|
@@ -642,6 +642,15 @@ new CfnOutput(this, 'TheUrl', {
|
|
|
642
642
|
});
|
|
643
643
|
```
|
|
644
644
|
|
|
645
|
+
### Important Function URL Permission Update - Oct 2025
|
|
646
|
+
Starting Oct 2025, Function URL invocation will require two permissions
|
|
647
|
+
- lambda:InvokeFunctionUrl
|
|
648
|
+
- lambda:InvokeFunction (New)
|
|
649
|
+
|
|
650
|
+
CDK has updated `grantInvokeUrl` and `addFunctionUrl` to add both permission above.
|
|
651
|
+
|
|
652
|
+
If your existing CDK stack uses `grantInvokeUrl` or `addFunctionUrl`, your next deployment will automatically add the `lambda:InvokeFunction` permission without requiring any code changes. This ensures your Function URLs continue working seamlessly. No additional actions are needed.
|
|
653
|
+
|
|
645
654
|
### CORS configuration for Function URLs
|
|
646
655
|
|
|
647
656
|
If you want your Function URLs to be invokable from a web page in browser, you
|
|
@@ -1249,6 +1258,36 @@ const fn = new lambda.Function(this, 'MyFunction', {
|
|
|
1249
1258
|
});
|
|
1250
1259
|
```
|
|
1251
1260
|
|
|
1261
|
+
## Lambda with Tenant Isolation
|
|
1262
|
+
|
|
1263
|
+
Lambda functions can be configured with tenant isolation to ensure that different tenants never share the same execution environment. This is useful for SaaS applications where you need to guarantee compute isolation between untrusted tenants while using a single Lambda function.
|
|
1264
|
+
|
|
1265
|
+
```ts
|
|
1266
|
+
const fn = new lambda.Function(this, 'MyFunction', {
|
|
1267
|
+
runtime: lambda.Runtime.NODEJS_18_X,
|
|
1268
|
+
handler: 'index.handler',
|
|
1269
|
+
code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
|
|
1270
|
+
tenancyConfig: lambda.TenancyConfig.PER_TENANT,
|
|
1271
|
+
});
|
|
1272
|
+
```
|
|
1273
|
+
|
|
1274
|
+
**Important considerations:**
|
|
1275
|
+
|
|
1276
|
+
* **Immutable configuration**: Tenant isolation can only be configured during function creation and cannot be modified on existing functions.
|
|
1277
|
+
* **Incompatible features**: The following features are not compatible with tenant isolation and will result in CloudFormation deployment errors:
|
|
1278
|
+
* **Provisioned Concurrency**
|
|
1279
|
+
* **Function URLs**
|
|
1280
|
+
* **SnapStart**
|
|
1281
|
+
* **Event Source Mappings** (except API Gateway):
|
|
1282
|
+
* ❌ SQS
|
|
1283
|
+
* ❌ DynamoDB
|
|
1284
|
+
* ❌ Kinesis
|
|
1285
|
+
* ❌ MSK
|
|
1286
|
+
* ❌ Self-managed Kafka
|
|
1287
|
+
* ✅ API Gateway (supported)
|
|
1288
|
+
|
|
1289
|
+
CDK validates these restrictions at synthesis time and provides clear error messages when incompatible features are configured.
|
|
1290
|
+
|
|
1252
1291
|
### Legacy Log Retention
|
|
1253
1292
|
|
|
1254
1293
|
As an alternative to providing a custom, user controlled log group, the legacy `logRetention` property can be used to set a different expiration period.
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.binary-payload.ts
CHANGED
|
@@ -10,7 +10,7 @@ const app = new App({
|
|
|
10
10
|
const stack = new Stack(app, 'IntegBinaryPayload');
|
|
11
11
|
|
|
12
12
|
const fn = new Function(stack, 'fn', {
|
|
13
|
-
runtime: Runtime.
|
|
13
|
+
runtime: Runtime.NODEJS_20_X,
|
|
14
14
|
handler: 'index.handler',
|
|
15
15
|
code: Code.fromInline(`
|
|
16
16
|
exports.handler = async (event) => {
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.logging-config.ts
CHANGED
|
@@ -18,49 +18,49 @@ const logGroup = new logs.LogGroup(stack, 'MyLogGroupWithLogGroupName', {
|
|
|
18
18
|
new Function(stack, 'LambdaWithLogGroup', {
|
|
19
19
|
code: new InlineCode('foo'),
|
|
20
20
|
handler: 'index.handler',
|
|
21
|
-
runtime: Runtime.
|
|
21
|
+
runtime: Runtime.NODEJS_20_X,
|
|
22
22
|
logGroup: logGroup,
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
new Function(stack, 'LambdaWithLogGroupAndNoLogGroupName', {
|
|
26
26
|
code: new InlineCode('foo'),
|
|
27
27
|
handler: 'index.handler',
|
|
28
|
-
runtime: Runtime.
|
|
28
|
+
runtime: Runtime.NODEJS_20_X,
|
|
29
29
|
logGroup: new logs.LogGroup(stack, 'MyLogGroupWithoutLogGroupName'),
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
new Function(stack, 'LambdaWithTextFormat', {
|
|
33
33
|
code: new InlineCode('foo'),
|
|
34
34
|
handler: 'index.handler',
|
|
35
|
-
runtime: Runtime.
|
|
35
|
+
runtime: Runtime.NODEJS_20_X,
|
|
36
36
|
logFormat: LogFormat.TEXT,
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
new Function(stack, 'LambdaWithJSONFormat', {
|
|
40
40
|
code: new InlineCode('foo'),
|
|
41
41
|
handler: 'index.handler',
|
|
42
|
-
runtime: Runtime.
|
|
42
|
+
runtime: Runtime.NODEJS_20_X,
|
|
43
43
|
logFormat: LogFormat.JSON,
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
new Function(stack, 'LambdaWithTextLoggingFormat', {
|
|
47
47
|
code: new InlineCode('foo'),
|
|
48
48
|
handler: 'index.handler',
|
|
49
|
-
runtime: Runtime.
|
|
49
|
+
runtime: Runtime.NODEJS_20_X,
|
|
50
50
|
logFormat: LoggingFormat.TEXT,
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
new Function(stack, 'LambdaWithJSONLoggingFormat', {
|
|
54
54
|
code: new InlineCode('foo'),
|
|
55
55
|
handler: 'index.handler',
|
|
56
|
-
runtime: Runtime.
|
|
56
|
+
runtime: Runtime.NODEJS_20_X,
|
|
57
57
|
logFormat: LoggingFormat.JSON,
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
new Function(stack, 'LambdaWithLogLevel', {
|
|
61
61
|
code: new InlineCode('foo'),
|
|
62
62
|
handler: 'index.handler',
|
|
63
|
-
runtime: Runtime.
|
|
63
|
+
runtime: Runtime.NODEJS_20_X,
|
|
64
64
|
logFormat: LogFormat.JSON,
|
|
65
65
|
systemLogLevel: SystemLogLevel.INFO,
|
|
66
66
|
applicationLogLevel: ApplicationLogLevel.INFO,
|
|
@@ -69,7 +69,7 @@ new Function(stack, 'LambdaWithLogLevel', {
|
|
|
69
69
|
new Function(stack, 'LambdaWithLogLevelV2', {
|
|
70
70
|
code: new InlineCode('foo'),
|
|
71
71
|
handler: 'index.handler',
|
|
72
|
-
runtime: Runtime.
|
|
72
|
+
runtime: Runtime.NODEJS_20_X,
|
|
73
73
|
loggingFormat: LoggingFormat.JSON,
|
|
74
74
|
systemLogLevelV2: SystemLogLevel.INFO,
|
|
75
75
|
applicationLogLevelV2: ApplicationLogLevel.INFO,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { App, Stack } from 'aws-cdk-lib';
|
|
2
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
3
|
+
import { Function, InlineCode, Runtime, TenancyConfig } from 'aws-cdk-lib/aws-lambda';
|
|
4
|
+
|
|
5
|
+
const app = new App({
|
|
6
|
+
postCliContext: {
|
|
7
|
+
'@aws-cdk/aws-lambda:useCdkManagedLogGroup': false,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const stack = new Stack(app, 'aws-cdk-lambda-multi-tenancy');
|
|
12
|
+
|
|
13
|
+
new Function(stack, 'MultiTenantFunction', {
|
|
14
|
+
code: new InlineCode('foo'),
|
|
15
|
+
handler: 'index.handler',
|
|
16
|
+
runtime: Runtime.NODEJS_18_X,
|
|
17
|
+
tenancyConfig: TenancyConfig.PER_TENANT,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
new integ.IntegTest(app, 'lambda-multi-tenancy', {
|
|
21
|
+
testCases: [stack],
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
app.synth();
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.params-and-secrets.ts
CHANGED
|
@@ -46,7 +46,7 @@ class StackUnderTest extends Stack {
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
const lambdaFunction = new Function(this, 'MyFunc', {
|
|
49
|
-
runtime: Runtime.
|
|
49
|
+
runtime: Runtime.NODEJS_20_X,
|
|
50
50
|
handler: 'index.handler',
|
|
51
51
|
code: Code.fromAsset(path.join(__dirname, 'params-and-secrets-handler')),
|
|
52
52
|
architecture: props.architecture,
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime-management.ts
CHANGED
|
@@ -13,7 +13,7 @@ const stack = new Stack(app, 'aws-cdk-lambda-runtime-management');
|
|
|
13
13
|
new Function(stack, 'Lambda', {
|
|
14
14
|
code: new InlineCode('foo'),
|
|
15
15
|
handler: 'index.handler',
|
|
16
|
-
runtime: Runtime.
|
|
16
|
+
runtime: Runtime.NODEJS_20_X,
|
|
17
17
|
runtimeManagementMode: RuntimeManagementMode.AUTO,
|
|
18
18
|
});
|
|
19
19
|
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime.fromasset.ts
CHANGED
|
@@ -10,20 +10,35 @@ const app = new App({
|
|
|
10
10
|
});
|
|
11
11
|
const stack = new Stack(app, 'aws-cdk-lambda-runtime-fromasset');
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const lambdaFunctionJava21 = new Function(stack, 'MyFunctionJava21', {
|
|
14
14
|
runtime: Runtime.JAVA_21,
|
|
15
15
|
handler: 'com.mycompany.app.LambdaMethodHandler::handleRequest',
|
|
16
16
|
code: Code.fromAsset(path.join(__dirname, 'my-app-1.0-SNAPSHOT.zip')),
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
+
const lambdaFunctionJava25 = new Function(stack, 'MyFunctionJava25', {
|
|
20
|
+
runtime: Runtime.JAVA_25,
|
|
21
|
+
handler: 'com.mycompany.app.LambdaMethodHandler::handleRequest',
|
|
22
|
+
code: Code.fromAsset(path.join(__dirname, 'my-app-1.0-SNAPSHOT.zip')),
|
|
23
|
+
});
|
|
24
|
+
|
|
19
25
|
const integTest = new integ.IntegTest(app, 'Integ', { testCases: [stack] });
|
|
20
26
|
|
|
21
|
-
const
|
|
22
|
-
functionName:
|
|
27
|
+
const invokeJava21 = integTest.assertions.invokeFunction({
|
|
28
|
+
functionName: lambdaFunctionJava21.functionName,
|
|
29
|
+
payload: '123',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
invokeJava21.expect(integ.ExpectedResult.objectLike({
|
|
33
|
+
Payload: '"123"',
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
const invokeJava25 = integTest.assertions.invokeFunction({
|
|
37
|
+
functionName: lambdaFunctionJava25.functionName,
|
|
23
38
|
payload: '123',
|
|
24
39
|
});
|
|
25
40
|
|
|
26
|
-
|
|
41
|
+
invokeJava25.expect(integ.ExpectedResult.objectLike({
|
|
27
42
|
Payload: '"123"',
|
|
28
43
|
}));
|
|
29
44
|
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime.inlinecode.ts
CHANGED
|
@@ -55,12 +55,12 @@ const python313 = new Function(stack, 'PYTHON_3_13', {
|
|
|
55
55
|
});
|
|
56
56
|
new CfnOutput(stack, 'PYTHON_3_13-functionName', { value: python313.functionName });
|
|
57
57
|
|
|
58
|
-
const
|
|
59
|
-
code: new InlineCode('
|
|
58
|
+
const python314 = new Function(stack, 'PYTHON_3_14', {
|
|
59
|
+
code: new InlineCode('def handler(event, context):\n return "success"'),
|
|
60
60
|
handler: 'index.handler',
|
|
61
|
-
runtime: Runtime.
|
|
61
|
+
runtime: Runtime.PYTHON_3_14,
|
|
62
62
|
});
|
|
63
|
-
new CfnOutput(stack, '
|
|
63
|
+
new CfnOutput(stack, 'PYTHON_3_14-functionName', { value: python314.functionName });
|
|
64
64
|
|
|
65
65
|
const node20xfn = new Function(stack, 'NODEJS_20_X', {
|
|
66
66
|
code: new InlineCode('exports.handler = async function(event) { return "success" }'),
|
|
@@ -76,6 +76,13 @@ const node22xfn = new Function(stack, 'NODEJS_22_X', {
|
|
|
76
76
|
});
|
|
77
77
|
new CfnOutput(stack, 'NODEJS_22_X-functionName', { value: node22xfn.functionName });
|
|
78
78
|
|
|
79
|
+
const node24xfn = new Function(stack, 'NODEJS_24_X', {
|
|
80
|
+
code: new InlineCode('exports.handler = async function(event) { return "success" }'),
|
|
81
|
+
handler: 'index.handler',
|
|
82
|
+
runtime: Runtime.NODEJS_24_X,
|
|
83
|
+
});
|
|
84
|
+
new CfnOutput(stack, 'NODEJS_24_X-functionName', { value: node24xfn.functionName });
|
|
85
|
+
|
|
79
86
|
new integ.IntegTest(app, 'lambda-runtime-inlinecode', {
|
|
80
87
|
testCases: [stack],
|
|
81
88
|
});
|
|
@@ -14,7 +14,7 @@ const stack = new cdk.Stack(app, 'TestStack');
|
|
|
14
14
|
|
|
15
15
|
const handler = new lambda.NodejsFunction(stack, 'Function', {
|
|
16
16
|
entry: path.join(__dirname, 'integ-handlers/pnpm/dependencies-pnpm.ts'),
|
|
17
|
-
runtime: Runtime.
|
|
17
|
+
runtime: Runtime.NODEJS_20_X,
|
|
18
18
|
bundling: {
|
|
19
19
|
minify: true,
|
|
20
20
|
// Will be installed, not bundled
|
|
@@ -14,7 +14,7 @@ class TestStack extends Stack {
|
|
|
14
14
|
|
|
15
15
|
this.lambdaFunction = new lambda.NodejsFunction(this, 'NodeJsFunction', {
|
|
16
16
|
entry: path.join(__dirname, 'integ-handlers/dependencies.ts'),
|
|
17
|
-
runtime: Runtime.
|
|
17
|
+
runtime: Runtime.NODEJS_20_X,
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -25,7 +25,7 @@ const app = new App({
|
|
|
25
25
|
[LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES]: true,
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
const stack = new TestStack(app, 'cdk-integ-lambda-nodejs-
|
|
28
|
+
const stack = new TestStack(app, 'cdk-integ-lambda-nodejs-20-exclude-smithy');
|
|
29
29
|
new IntegTest(app, 'NodeJsFunctionExcludeSmithyInteg', {
|
|
30
30
|
testCases: [stack],
|
|
31
31
|
diffAssets: true,
|
|
@@ -12,7 +12,7 @@ class TestStack extends Stack {
|
|
|
12
12
|
super(scope, id, props);
|
|
13
13
|
|
|
14
14
|
const runtimes: Runtime[]= [
|
|
15
|
-
Runtime.
|
|
15
|
+
Runtime.NODEJS_20_X, Runtime.NODEJS_LATEST, Runtime.NODEJS_22_X,
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
const uniqueRuntimes: Runtime[] = runtimes.filter((value, index, array) => array.findIndex(value1 => value1.runtimeEquals(value)) === index);
|
|
@@ -545,6 +545,10 @@ new logs.Transformer(this, 'Transformer', {
|
|
|
545
545
|
|
|
546
546
|
For more details on CloudWatch Logs transformation processors, refer to the [AWS documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html).
|
|
547
547
|
|
|
548
|
+
### Usage of metric filters on transformed logs
|
|
549
|
+
|
|
550
|
+
In order to use the transformed logs as search pattern, set the parameter `applyOnTransformedLogs: true` in the MetricFilterProps.
|
|
551
|
+
|
|
548
552
|
## Notes
|
|
549
553
|
|
|
550
554
|
Be aware that Log Group ARNs will always have the string `:*` appended to
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
|
|
2
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
3
|
+
import { FilterPattern, LogGroup, MetricFilter } from 'aws-cdk-lib/aws-logs';
|
|
4
|
+
|
|
5
|
+
class TestStack extends Stack {
|
|
6
|
+
constructor(scope: App, id: string, props?: StackProps) {
|
|
7
|
+
super(scope, id, props);
|
|
8
|
+
|
|
9
|
+
const logGroup = new LogGroup(this, 'LogGroup', {
|
|
10
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
new MetricFilter(this, 'MetricFilter', {
|
|
14
|
+
logGroup,
|
|
15
|
+
metricNamespace: 'MyApp',
|
|
16
|
+
metricName: 'Latency',
|
|
17
|
+
filterPattern: FilterPattern.exists('$.latency'),
|
|
18
|
+
applyOnTransformedLogs: true,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const app = new App();
|
|
24
|
+
const testCase = new TestStack(app, 'aws-cdk-metricfilter-apply-on-transformed-logs-integ');
|
|
25
|
+
|
|
26
|
+
new IntegTest(app, 'metricfilter-apply-on-transformed-logs', {
|
|
27
|
+
testCases: [testCase],
|
|
28
|
+
});
|
|
29
|
+
app.synth();
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.subscriptionfilter.ts
CHANGED
|
@@ -11,7 +11,7 @@ class SubscriptionFilterIntegStack extends Stack {
|
|
|
11
11
|
const logGroup = new LogGroup(this, 'LogGroup');
|
|
12
12
|
|
|
13
13
|
const fn = new Function(this, 'Function', {
|
|
14
|
-
runtime: Runtime.
|
|
14
|
+
runtime: Runtime.NODEJS_20_X,
|
|
15
15
|
handler: 'index.handler',
|
|
16
16
|
code: Code.fromInline('foo'),
|
|
17
17
|
});
|