konokenj.cdk-api-mcp-server 0.31.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 +946 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/README.md +160 -75
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-elasticache-alpha/README.md +421 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-glue-alpha/README.md +39 -9
- 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-iot-alpha/README.md +1 -1
- 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-lambda-python-alpha/README.md +6 -6
- 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-s3tables-alpha/README.md +82 -2
- 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 +367 -17
- 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 +224 -60
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.api-dualstack.ts +3 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.api.ts +5 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.stage.ts +10 -7
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.usage-plan.ts +80 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.iam.ts +34 -38
- 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-apigatewayv2-integrations/integ.sqs.ts +58 -71
- 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-autoscaling/README.md +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-autoscaling/integ.asg-lt.ts +7 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-batch/README.md +49 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-batch/integ.ecs-exec-batch-job.ts +148 -0
- 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-certificatemanager/README.md +11 -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/README.md +292 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/README.md +83 -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.http-origin.ts +5 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/integ.origin-response-completion-timeout.ts +50 -0
- 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 +104 -12
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudwatch/integ.alarm-and-dashboard.ts +12 -0
- 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-cloudwatch/integ.dashboard-with-graphwidget-with-labels-visible.ts +92 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudwatch/integ.dashboard-with-metric-id-and-visible.ts +70 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudwatch/integ.search-expression.ts +51 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/README.md +143 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-docker-server.ts +44 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-fleet-attribute-based-compute.ts +59 -7
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-fleet-custom-instance-type.ts +130 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-fleet-overflow-behavior.ts +61 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-s3-cache.ts +71 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-windows-image.ts +1 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codepipeline-actions/integ.pipeline-elastic-beanstalk-deploy.ts +26 -17
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cognito/README.md +13 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cognito/integ.user-pool-client-explicit-props.ts +1 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-docdb/README.md +24 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-docdb/integ.cluster-serverless.ts +34 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/README.md +225 -15
- 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-v2.cci.ts +49 -0
- 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.cci.ts +27 -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.contirubtor-insights-for-gsi.ts +6 -2
- 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-global.ts +9 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.table-v2-mrsc.ts +31 -0
- 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 +28 -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-endpoint.lit.ts +6 -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-ecr-assets/README.md +4 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr-assets/integ.assets-docker.ts +6 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/README.md +189 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.availability-zone-rebalancing.ts +14 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.blue-green-deployment-strategy.ts +147 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.cluster-windows-server-ami.ts +5 -6
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.ebs-volume-initialization-rate.ts +80 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.enable-execute-command.ts +35 -29
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.exec-command.ts +16 -22
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.lb-awsvpc-nw.ts +26 -16
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.managedinstances-capacity-provider.ts +114 -0
- 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/integ.pseudo-terminal.ts +18 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs-patterns/README.md +2 -0
- 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-ecs-patterns/integ.alb-fargate-service-smart-defaults.ts +143 -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 +55 -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-target-group-attributes.ts +45 -0
- 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-target-group-attributes.ts +45 -0
- 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/README.md +41 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events/integ.api-destination.ts +42 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events/integ.archive-customer-managed-key.ts +23 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events/integ.eventbus.ts +13 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events-targets/README.md +93 -4
- 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.custom-permissions-boundary-aspect.ts +50 -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 +159 -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-kinesisfirehose/integ.s3-bucket.lit.ts +1 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/README.md +41 -2
- 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.lambda-policy-with-token-resolution.ts +46 -0
- 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/README.md +3 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.dependencies-bun-lock.ts +50 -0
- 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 +69 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.loggroup-transformer.ts +37 -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.save-logs-insights-query-definition.ts +7 -2
- 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-logs/integ.transformer.ts +27 -0
- 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 +72 -2
- 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-rds/integ.cluster-lookup.ts +100 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-database-insights.ts +43 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-lookup.ts +77 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.proxy-endpoint.ts +36 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53/README.md +68 -31
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53/integ.delete-existing-record-set.ts +0 -1
- 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.route53.ts +51 -1
- 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-route53-targets/integ.cloudfront-alias-target.ts +16 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53-targets/integ.elastic-beanstalk-hostedzoneid.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3/integ.bucket.notifications-scoped-permissions.ts +71 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-assets/integ.assets.bundling.docker-opts.ts +4 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/README.md +83 -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 +64 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-stack-source.ts +53 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-stack-ssm-source.ts +97 -0
- 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-s3-notifications/integ.bucket-notifications.ts +80 -42
- 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-signer/integ.signing-profile.ts +5 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-sns/README.md +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-sns-subscriptions/integ.sns-sqs-subscription-filter.ts +75 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-sns-subscriptions/integ.sns-sqs.ts +21 -40
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions/integ.distributed-map-parallel.ts +82 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions/integ.distributed-map-redrive.ts +130 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions/integ.map-with-catch.ts +1 -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 +75 -5
- 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.emr-create-cluster-with-ebs.ts +126 -0
- 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-nodejs22.ts +27 -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 +84 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/integ.canary-browser-type.ts +35 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/integ.canary-resources-to-replicate-tags.ts +36 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/integ.canary-retry.ts +32 -0
- 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/cloudformation-include/integ.novalue-nonstring.ts +25 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/core/README.md +2 -1870
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/README.md +59 -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 +152 -10
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/README.md +55 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/interfaces/README.md +33 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/pipelines/README.md +4 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/pipelines/integ.newpipeline-reduce-stagerole-scope.ts +4 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/pipelines/integ.pipeline-with-customsynthesizer.ts +105 -0
- {konokenj_cdk_api_mcp_server-0.31.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/METADATA +2 -2
- {konokenj_cdk_api_mcp_server-0.31.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/RECORD +240 -151
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events-targets/integ.kinesis-firehose-stream.ts +0 -33
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.expose-metric-with-dimensions.ts +0 -47
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-signcontent.d.ts +0 -1
- {konokenj_cdk_api_mcp_server-0.31.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/WHEEL +0 -0
- {konokenj_cdk_api_mcp_server-0.31.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/entry_points.txt +0 -0
- {konokenj_cdk_api_mcp_server-0.31.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -17,7 +17,9 @@ By default, `TableV2` will create a single table in the main deployment region r
|
|
|
17
17
|
```ts
|
|
18
18
|
const table = new dynamodb.TableV2(this, 'Table', {
|
|
19
19
|
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
20
|
-
|
|
20
|
+
contributorInsightsSpecification: {
|
|
21
|
+
enabled: true,
|
|
22
|
+
},
|
|
21
23
|
tableClass: dynamodb.TableClass.STANDARD_INFREQUENT_ACCESS,
|
|
22
24
|
pointInTimeRecoverySpecification: {
|
|
23
25
|
pointInTimeRecoveryEnabled: true,
|
|
@@ -66,12 +68,12 @@ globalTable.addReplica({ region: 'us-east-2', deletionProtection: true });
|
|
|
66
68
|
```
|
|
67
69
|
|
|
68
70
|
The following properties are configurable on a per-replica basis, but will be inherited from the `TableV2` properties if not specified:
|
|
69
|
-
*
|
|
71
|
+
* contributorInsightsSpecification
|
|
70
72
|
* deletionProtection
|
|
71
73
|
* pointInTimeRecoverySpecification
|
|
72
74
|
* tableClass
|
|
73
75
|
* readCapacity (only configurable if the `TableV2` billing mode is `PROVISIONED`)
|
|
74
|
-
* globalSecondaryIndexes (only `
|
|
76
|
+
* globalSecondaryIndexes (only `contributorInsightsSpecification` and `readCapacity`)
|
|
75
77
|
|
|
76
78
|
The following example shows how to define properties on a per-replica basis:
|
|
77
79
|
|
|
@@ -83,7 +85,9 @@ const stack = new cdk.Stack(app, 'Stack', { env: { region: 'us-west-2' } });
|
|
|
83
85
|
|
|
84
86
|
const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
|
|
85
87
|
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
86
|
-
|
|
88
|
+
contributorInsightsSpecification: {
|
|
89
|
+
enabled: true,
|
|
90
|
+
},
|
|
87
91
|
pointInTimeRecoverySpecification: {
|
|
88
92
|
pointInTimeRecoveryEnabled: true,
|
|
89
93
|
},
|
|
@@ -97,7 +101,9 @@ const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
|
|
|
97
101
|
},
|
|
98
102
|
{
|
|
99
103
|
region: 'us-east-2',
|
|
100
|
-
|
|
104
|
+
contributorInsightsSpecification: {
|
|
105
|
+
enabled: false,
|
|
106
|
+
},
|
|
101
107
|
},
|
|
102
108
|
],
|
|
103
109
|
});
|
|
@@ -150,6 +156,68 @@ const barStack = new BarStack(app, 'BarStack', {
|
|
|
150
156
|
|
|
151
157
|
Note: You can create an instance of the `TableV2` construct with as many `replicas` as needed as long as there is only one replica per region. After table creation you can add or remove `replicas`, but you can only add or remove a single replica in each update.
|
|
152
158
|
|
|
159
|
+
## Multi-Region Strong Consistency (MRSC)
|
|
160
|
+
|
|
161
|
+
By default, DynamoDB global tables provide eventual consistency across regions. For applications requiring strong consistency across regions, you can configure Multi-Region Strong Consistency (MRSC) using the `multiRegionConsistency` property.
|
|
162
|
+
|
|
163
|
+
MRSC global tables can be configured in two ways:
|
|
164
|
+
* **Three replicas**: Deploy your table across three regions within the same region set
|
|
165
|
+
* **Two replicas + one witness**: Deploy your table across two regions with a witness region for consensus
|
|
166
|
+
|
|
167
|
+
### Region Sets
|
|
168
|
+
|
|
169
|
+
MRSC global tables must be deployed within the same region set. The supported region sets are:
|
|
170
|
+
|
|
171
|
+
* **US Region set**: `us-east-1`, `us-east-2`, `us-west-2`
|
|
172
|
+
* **EU Region set**: `eu-west-1`, `eu-west-2`, `eu-west-3`, `eu-central-1`
|
|
173
|
+
* **AP Region set**: `ap-northeast-1`, `ap-northeast-2`, `ap-northeast-3`
|
|
174
|
+
|
|
175
|
+
### Three Replicas Configuration
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
import * as cdk from 'aws-cdk-lib';
|
|
179
|
+
|
|
180
|
+
const app = new cdk.App();
|
|
181
|
+
const stack = new cdk.Stack(app, 'Stack', { env: { region: 'us-west-2' } });
|
|
182
|
+
|
|
183
|
+
const mrscTable = new dynamodb.TableV2(stack, 'MRSCTable', {
|
|
184
|
+
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
185
|
+
multiRegionConsistency: dynamodb.MultiRegionConsistency.STRONG,
|
|
186
|
+
replicas: [
|
|
187
|
+
{ region: 'us-east-1' },
|
|
188
|
+
{ region: 'us-east-2' },
|
|
189
|
+
],
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Two Replicas + Witness Configuration
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
import * as cdk from 'aws-cdk-lib';
|
|
197
|
+
|
|
198
|
+
const app = new cdk.App();
|
|
199
|
+
const stack = new cdk.Stack(app, 'Stack', { env: { region: 'us-west-2' } });
|
|
200
|
+
|
|
201
|
+
const mrscTable = new dynamodb.TableV2(stack, 'MRSCTable', {
|
|
202
|
+
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
203
|
+
multiRegionConsistency: dynamodb.MultiRegionConsistency.STRONG,
|
|
204
|
+
replicas: [
|
|
205
|
+
{ region: 'us-east-1' },
|
|
206
|
+
],
|
|
207
|
+
witnessRegion: 'us-east-2',
|
|
208
|
+
});
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Important Considerations
|
|
212
|
+
|
|
213
|
+
* **Witness regions** can only be used with `MultiRegionConsistency.STRONG`. Attempting to specify a witness region with eventual consistency will result in a validation error.
|
|
214
|
+
* **Region validation**: All regions (primary, replicas, and witness) must be within the same region set.
|
|
215
|
+
* **Replica count**: When using a witness region, you must have exactly 2 replicas (including the primary). Without a witness region, you must have exactly 3 replicas.
|
|
216
|
+
* **Performance**: MRSC provides strong consistency but may have higher latency compared to eventual consistency.
|
|
217
|
+
|
|
218
|
+
Further reading:
|
|
219
|
+
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes-mrsc
|
|
220
|
+
|
|
153
221
|
## Billing
|
|
154
222
|
|
|
155
223
|
The `TableV2` construct can be configured with on-demand or provisioned billing:
|
|
@@ -313,7 +381,7 @@ https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-mgmt
|
|
|
313
381
|
|
|
314
382
|
Secondary indexes allow efficient access to data with attributes other than the `primaryKey`. DynamoDB supports two types of secondary indexes:
|
|
315
383
|
|
|
316
|
-
* Global secondary index - An index with
|
|
384
|
+
* Global secondary index - An index with partition key(s) and optional sort key(s) that can be different from those on the base table. A `globalSecondaryIndex` is considered "global" because queries on the index can span all of the data in the base table, across all partitions. A `globalSecondaryIndex` is stored in its own partition space away from the base table and scales separately from the base table.
|
|
317
385
|
|
|
318
386
|
* Local secondary index - An index that has the same `partitionKey` as the base table, but a different `sortKey`. A `localSecondaryIndex` is "local" in the sense that every partition of a `localSecondaryIndex` is scoped to a base table partition that has the same `partitionKey` value.
|
|
319
387
|
|
|
@@ -336,7 +404,41 @@ const table = new dynamodb.TableV2(this, 'Table', {
|
|
|
336
404
|
});
|
|
337
405
|
```
|
|
338
406
|
|
|
339
|
-
|
|
407
|
+
#### Compound Keys
|
|
408
|
+
|
|
409
|
+
Global secondary indexes support compound keys, allowing you to specify multiple partition keys and/or multiple sort keys. This enables more flexible query patterns for complex data models.
|
|
410
|
+
|
|
411
|
+
**Key Constraints:**
|
|
412
|
+
- You can specify up to **4 partition keys** per global secondary index
|
|
413
|
+
- You can specify up to **4 sort keys** per global secondary index
|
|
414
|
+
- Use **either** `partitionKey` (singular) **or** `partitionKeys` (plural), but not both
|
|
415
|
+
- Use **either** `sortKey` (singular) **or** `sortKeys` (plural), but not both
|
|
416
|
+
- At least one partition key must be specified (either `partitionKey` or `partitionKeys`)
|
|
417
|
+
- For multiple keys, you **must** use the plural parameters (`partitionKeys` and/or `sortKeys`)
|
|
418
|
+
- **Keys cannot be added or modified after index creation** - attempting to add additional keys to an existing index will result in an error
|
|
419
|
+
|
|
420
|
+
**Example with compound partition and sort keys:**
|
|
421
|
+
|
|
422
|
+
```ts
|
|
423
|
+
const table = new dynamodb.TableV2(this, 'Table', {
|
|
424
|
+
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
425
|
+
globalSecondaryIndexes: [
|
|
426
|
+
{
|
|
427
|
+
indexName: 'compound-gsi',
|
|
428
|
+
partitionKeys: [
|
|
429
|
+
{ name: 'gsi_pk1', type: dynamodb.AttributeType.STRING },
|
|
430
|
+
{ name: 'gsi_pk2', type: dynamodb.AttributeType.NUMBER },
|
|
431
|
+
],
|
|
432
|
+
sortKeys: [
|
|
433
|
+
{ name: 'gsi_sk1', type: dynamodb.AttributeType.STRING },
|
|
434
|
+
{ name: 'gsi_sk2', type: dynamodb.AttributeType.BINARY },
|
|
435
|
+
],
|
|
436
|
+
},
|
|
437
|
+
],
|
|
438
|
+
});
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
You can also add a `globalSecondaryIndex` using the `addGlobalSecondaryIndex` method:
|
|
340
442
|
|
|
341
443
|
```ts
|
|
342
444
|
const table = new dynamodb.TableV2(this, 'Table', {
|
|
@@ -353,6 +455,16 @@ table.addGlobalSecondaryIndex({
|
|
|
353
455
|
indexName: 'gsi2',
|
|
354
456
|
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
355
457
|
});
|
|
458
|
+
|
|
459
|
+
// Add a GSI with compound keys
|
|
460
|
+
table.addGlobalSecondaryIndex({
|
|
461
|
+
indexName: 'compound-gsi2',
|
|
462
|
+
partitionKeys: [
|
|
463
|
+
{ name: 'compound_pk1', type: dynamodb.AttributeType.STRING },
|
|
464
|
+
{ name: 'compound_pk2', type: dynamodb.AttributeType.NUMBER },
|
|
465
|
+
],
|
|
466
|
+
sortKey: { name: 'sk', type: dynamodb.AttributeType.STRING },
|
|
467
|
+
});
|
|
356
468
|
```
|
|
357
469
|
|
|
358
470
|
You can configure `readCapacity` and `writeCapacity` on a `globalSecondaryIndex` when an `TableV2` is configured with provisioned `billing`. If `TableV2` is configured with provisioned `billing` but `readCapacity` or `writeCapacity` are not configured on a `globalSecondaryIndex`, then they will be inherited from the capacity settings specified with the `billing` configuration:
|
|
@@ -381,7 +493,7 @@ const table = new dynamodb.TableV2(this, 'Table', {
|
|
|
381
493
|
});
|
|
382
494
|
```
|
|
383
495
|
|
|
384
|
-
All `globalSecondaryIndexes` for replica tables are inherited from the primary table. You can configure `
|
|
496
|
+
All `globalSecondaryIndexes` for replica tables are inherited from the primary table. You can configure `contributorInsightsSpecification` and `readCapacity` for each `globalSecondaryIndex` on a per-replica basis:
|
|
385
497
|
|
|
386
498
|
```ts
|
|
387
499
|
import * as cdk from 'aws-cdk-lib';
|
|
@@ -391,7 +503,9 @@ const stack = new cdk.Stack(app, 'Stack', { env: { region: 'us-west-2' } });
|
|
|
391
503
|
|
|
392
504
|
const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
|
|
393
505
|
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
394
|
-
|
|
506
|
+
contributorInsightsSpecification: {
|
|
507
|
+
enabled: true,
|
|
508
|
+
},
|
|
395
509
|
billing: dynamodb.Billing.provisioned({
|
|
396
510
|
readCapacity: dynamodb.Capacity.fixed(10),
|
|
397
511
|
writeCapacity: dynamodb.Capacity.autoscaled({ maxCapacity: 10 }),
|
|
@@ -422,7 +536,9 @@ const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
|
|
|
422
536
|
region: 'us-east-2',
|
|
423
537
|
globalSecondaryIndexOptions: {
|
|
424
538
|
gsi2: {
|
|
425
|
-
|
|
539
|
+
contributorInsightsSpecification: {
|
|
540
|
+
enabled: false,
|
|
541
|
+
},
|
|
426
542
|
},
|
|
427
543
|
},
|
|
428
544
|
},
|
|
@@ -543,25 +659,40 @@ const table = new dynamodb.TableV2(this, 'Table', {
|
|
|
543
659
|
|
|
544
660
|
## Contributor Insights
|
|
545
661
|
|
|
546
|
-
Enabling `
|
|
662
|
+
Enabling `contributorInsightSpecification` for `TableV2` will provide information about the most accessed and throttled or throttled only items in a table or `globalSecondaryIndex`. DynamoDB delivers this information to you via CloudWatch Contributor Insights rules, reports, and graphs of report data.
|
|
663
|
+
|
|
664
|
+
By default, Contributor Insights for DynamoDB monitors all requests, including both the most accessed and most throttled items.
|
|
665
|
+
To limit the scope to only the most accessed or only the most throttled items, use the optional `mode` parameter.
|
|
666
|
+
|
|
667
|
+
- To monitor all traffic on a table or index, set `mode` to `ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS`.
|
|
668
|
+
- To monitor only throttled traffic on a table or index, set `mode` to `ContributorInsightsMode.THROTTLED_KEYS`.
|
|
669
|
+
|
|
547
670
|
|
|
548
671
|
```ts
|
|
549
672
|
const table = new dynamodb.TableV2(this, 'Table', {
|
|
550
673
|
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
551
|
-
|
|
674
|
+
contributorInsightsSpecification: {
|
|
675
|
+
enabled: true,
|
|
676
|
+
mode: dynamodb.ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS,
|
|
677
|
+
},
|
|
552
678
|
});
|
|
553
679
|
```
|
|
554
680
|
|
|
555
|
-
When you use `Table`, you can enable contributor insights for a table or specific global secondary index by setting `
|
|
681
|
+
When you use `Table`, you can enable contributor insights for a table or specific global secondary index by setting `contributorInsightsSpecification` parameter `enabled` to `true`.
|
|
556
682
|
|
|
557
683
|
```ts
|
|
558
684
|
const table = new dynamodb.Table(this, 'Table', {
|
|
559
685
|
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
560
|
-
|
|
686
|
+
contributorInsightsSpecification: { // for a table
|
|
687
|
+
enabled: true,
|
|
688
|
+
mode: dynamodb.ContributorInsightsMode.THROTTLED_KEYS, // only emit throttling events
|
|
689
|
+
},
|
|
561
690
|
});
|
|
562
691
|
|
|
563
692
|
table.addGlobalSecondaryIndex({
|
|
564
|
-
|
|
693
|
+
contributorInsightsSpecification: { // for a specific global secondary index
|
|
694
|
+
enabled: true,
|
|
695
|
+
},
|
|
565
696
|
indexName: 'gsi',
|
|
566
697
|
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
567
698
|
});
|
|
@@ -729,9 +860,88 @@ Using `resourcePolicy` you can add a [resource policy](https://docs.aws.amazon.c
|
|
|
729
860
|
});
|
|
730
861
|
```
|
|
731
862
|
|
|
863
|
+
### Adding Resource Policy Statements Dynamically
|
|
864
|
+
|
|
865
|
+
You can also add resource policy statements to a table after it's created using the `addToResourcePolicy` method. Following the same pattern as KMS, resource policies use wildcard resources to avoid circular dependencies:
|
|
866
|
+
|
|
867
|
+
```ts
|
|
868
|
+
const table = new dynamodb.TableV2(this, 'Table', {
|
|
869
|
+
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
870
|
+
});
|
|
871
|
+
|
|
872
|
+
// Standard resource policy (recommended approach)
|
|
873
|
+
table.addToResourcePolicy(new iam.PolicyStatement({
|
|
874
|
+
actions: ['dynamodb:GetItem', 'dynamodb:PutItem', 'dynamodb:Query'],
|
|
875
|
+
principals: [new iam.AccountRootPrincipal()],
|
|
876
|
+
resources: ['*'], // Wildcard avoids circular dependency - same pattern as KMS
|
|
877
|
+
}));
|
|
878
|
+
|
|
879
|
+
// Allow specific service access
|
|
880
|
+
table.addToResourcePolicy(new iam.PolicyStatement({
|
|
881
|
+
actions: ['dynamodb:Query'],
|
|
882
|
+
principals: [new iam.ServicePrincipal('lambda.amazonaws.com')],
|
|
883
|
+
resources: ['*'],
|
|
884
|
+
}));
|
|
885
|
+
```
|
|
886
|
+
|
|
887
|
+
#### Scoped Resource Policies (Advanced)
|
|
888
|
+
|
|
889
|
+
For scoped resource policies that reference specific table ARNs, you must specify an explicit table name:
|
|
890
|
+
|
|
891
|
+
```ts
|
|
892
|
+
import { Fn } from 'aws-cdk-lib';
|
|
893
|
+
|
|
894
|
+
// Table with explicit name enables scoped resource policies
|
|
895
|
+
const table = new dynamodb.TableV2(this, 'Table', {
|
|
896
|
+
tableName: 'my-explicit-table-name', // Required for scoped resources
|
|
897
|
+
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
898
|
+
});
|
|
899
|
+
|
|
900
|
+
// Now you can use scoped resources
|
|
901
|
+
table.addToResourcePolicy(new iam.PolicyStatement({
|
|
902
|
+
actions: ['dynamodb:GetItem'],
|
|
903
|
+
principals: [new iam.AccountRootPrincipal()],
|
|
904
|
+
resources: [
|
|
905
|
+
Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/my-explicit-table-name'),
|
|
906
|
+
Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/my-explicit-table-name/index/*'),
|
|
907
|
+
],
|
|
908
|
+
}));
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
**Important Limitations:**
|
|
912
|
+
- **Auto-generated table names**: Must use `resources: ['*']` to avoid circular dependencies
|
|
913
|
+
- **Explicit table names**: Enable scoped resources but lose CDK's automatic naming benefits
|
|
914
|
+
- **CloudFormation constraint**: Resource policies cannot reference the resource they're attached to during creation
|
|
915
|
+
|
|
732
916
|
TableV2 doesn’t support creating a replica and adding a resource-based policy to that replica in the same stack update in Regions other than the Region where you deploy the stack update.
|
|
733
917
|
To incorporate a resource-based policy into a replica, you'll need to initially deploy the replica without the policy, followed by a subsequent update to include the desired policy.
|
|
734
918
|
|
|
919
|
+
### Grant Methods and Resource Policies
|
|
920
|
+
|
|
921
|
+
Grant methods like `grantReadData()`, `grantWriteData()`, and `grantReadWriteData()` automatically add permissions to resource policies when used with same-account principals (like `AccountRootPrincipal`). This happens transparently:
|
|
922
|
+
|
|
923
|
+
```ts
|
|
924
|
+
const table = new dynamodb.TableV2(this, 'Table', {
|
|
925
|
+
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
926
|
+
});
|
|
927
|
+
|
|
928
|
+
// Automatically adds to table's resource policy (same account)
|
|
929
|
+
table.grantReadData(new iam.AccountRootPrincipal());
|
|
930
|
+
|
|
931
|
+
// Adds to IAM user's policy (not resource policy)
|
|
932
|
+
declare const user: iam.User;
|
|
933
|
+
table.grantReadData(user);
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
**How it works:**
|
|
937
|
+
- **Same-account principals** (AccountRootPrincipal, AccountPrincipal): Grant adds statement to table's resource policy
|
|
938
|
+
- **IAM identities** (User, Role, Group): Grant adds statement to the identity's IAM policy
|
|
939
|
+
- **Resource policy statements**: Automatically use wildcard resources (`*`) to avoid circular dependencies
|
|
940
|
+
|
|
941
|
+
This behavior follows the same pattern as other AWS services like KMS and S3, where grants intelligently choose between resource policies and identity policies based on the principal type.
|
|
942
|
+
|
|
943
|
+
**To avoid wildcards in resource policies:** If you need scoped resource ARNs instead of wildcards, use `addToResourcePolicy()` directly with an explicit table name instead of grant methods. See the "Scoped Resource Policies (Advanced)" section above for details.
|
|
944
|
+
|
|
735
945
|
## Grants
|
|
736
946
|
|
|
737
947
|
Using any of the `grant*` methods on an instance of the `TableV2` construct will only apply to the primary table, its indexes, and any associated `encryptionKey`. As an example, `grantReadData` used below will only apply the table in `us-west-2`:
|
|
@@ -210,12 +210,55 @@ To get the partition key and sort key of the table or indexes you have configure
|
|
|
210
210
|
|
|
211
211
|
```ts
|
|
212
212
|
declare const table: dynamodb.Table;
|
|
213
|
+
|
|
214
|
+
// For single keys, use schema() (deprecated for compound keys)
|
|
213
215
|
const schema = table.schema();
|
|
214
216
|
const partitionKey = schema.partitionKey;
|
|
215
217
|
const sortKey = schema.sortKey;
|
|
216
218
|
|
|
217
|
-
//
|
|
218
|
-
|
|
219
|
+
// For compound keys, use schemaV2() which returns normalized arrays
|
|
220
|
+
const schemaV2 = table.schemaV2();
|
|
221
|
+
const partitionKeys = schemaV2.partitionKeys; // Attribute[]
|
|
222
|
+
const sortKeys = schemaV2.sortKeys; // Attribute[]
|
|
223
|
+
|
|
224
|
+
// Get schema for a specific index
|
|
225
|
+
const indexSchema = table.schemaV2('INDEX_NAME');
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Note: `schema()` is deprecated for indexes with compound keys and will throw an error. Use `schemaV2()` instead, which always returns normalized arrays.
|
|
229
|
+
|
|
230
|
+
## Global Secondary Indexes with Compound Keys
|
|
231
|
+
|
|
232
|
+
Global secondary indexes support compound keys, allowing you to specify multiple partition keys and/or multiple sort keys. This enables more flexible query patterns for complex data models.
|
|
233
|
+
|
|
234
|
+
**Key Constraints:**
|
|
235
|
+
- You can specify up to **4 partition keys** per global secondary index
|
|
236
|
+
- You can specify up to **4 sort keys** per global secondary index
|
|
237
|
+
- Use **either** `partitionKey` (singular) **or** `partitionKeys` (plural), but not both
|
|
238
|
+
- Use **either** `sortKey` (singular) **or** `sortKeys` (plural), but not both
|
|
239
|
+
- At least one partition key must be specified (either `partitionKey` or `partitionKeys`)
|
|
240
|
+
- For multiple keys, you **must** use the plural parameters (`partitionKeys` and/or `sortKeys`)
|
|
241
|
+
- **Keys cannot be added or modified after index creation** - attempting to add additional keys to an existing index will result in an error
|
|
242
|
+
|
|
243
|
+
**Example:**
|
|
244
|
+
|
|
245
|
+
```ts
|
|
246
|
+
const table = new dynamodb.Table(this, 'Table', {
|
|
247
|
+
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
|
|
248
|
+
sortKey: { name: 'sk', type: dynamodb.AttributeType.STRING },
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
table.addGlobalSecondaryIndex({
|
|
252
|
+
indexName: 'compound-gsi',
|
|
253
|
+
partitionKeys: [
|
|
254
|
+
{ name: 'gsi_pk1', type: dynamodb.AttributeType.STRING },
|
|
255
|
+
{ name: 'gsi_pk2', type: dynamodb.AttributeType.NUMBER },
|
|
256
|
+
],
|
|
257
|
+
sortKeys: [
|
|
258
|
+
{ name: 'gsi_sk1', type: dynamodb.AttributeType.STRING },
|
|
259
|
+
{ name: 'gsi_sk2', type: dynamodb.AttributeType.BINARY },
|
|
260
|
+
],
|
|
261
|
+
});
|
|
219
262
|
```
|
|
220
263
|
|
|
221
264
|
## Kinesis Stream
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb-v2.cci.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { App, Stack, StackProps } from 'aws-cdk-lib';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
|
|
4
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
5
|
+
|
|
6
|
+
const app = new App();
|
|
7
|
+
|
|
8
|
+
class TestStack extends Stack {
|
|
9
|
+
constructor(scope: Construct, id: string, props?: StackProps) {
|
|
10
|
+
super(scope, id, props);
|
|
11
|
+
|
|
12
|
+
new dynamodb.TableV2(this, 'TableV2', {
|
|
13
|
+
partitionKey: { name: 'hashKey', type: dynamodb.AttributeType.STRING },
|
|
14
|
+
sortKey: { name: 'sortKey', type: dynamodb.AttributeType.NUMBER },
|
|
15
|
+
globalSecondaryIndexes: [
|
|
16
|
+
{
|
|
17
|
+
indexName: 'gsi',
|
|
18
|
+
partitionKey: { name: 'gsiHashKey', type: dynamodb.AttributeType.STRING },
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
contributorInsightsSpecification: {
|
|
22
|
+
enabled: true,
|
|
23
|
+
mode: dynamodb.ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS,
|
|
24
|
+
},
|
|
25
|
+
replicas: [
|
|
26
|
+
{
|
|
27
|
+
region: 'eu-west-2',
|
|
28
|
+
contributorInsightsSpecification: {
|
|
29
|
+
enabled: false,
|
|
30
|
+
},
|
|
31
|
+
globalSecondaryIndexOptions: {
|
|
32
|
+
gsi: {
|
|
33
|
+
contributorInsightsSpecification: {
|
|
34
|
+
enabled: true,
|
|
35
|
+
mode: dynamodb.ContributorInsightsMode.THROTTLED_KEYS,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const stack = new TestStack(app, 'CCI-Integ-Test', { env: { region: 'eu-west-1' } });
|
|
46
|
+
|
|
47
|
+
new IntegTest(app, 'table-v2-CCI-test', {
|
|
48
|
+
testCases: [stack],
|
|
49
|
+
});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integration test for DynamoDB Table.addToResourcePolicy() method
|
|
3
|
+
*
|
|
4
|
+
* This test validates the fix for issue #35062: "(aws-dynamodb): `addToResourcePolicy` has no effect"
|
|
5
|
+
*
|
|
6
|
+
* WHAT WE'RE TESTING:
|
|
7
|
+
* - The addToResourcePolicy() method was broken - it had "no effect" when called
|
|
8
|
+
* - Resource policies weren't being added to the CloudFormation template
|
|
9
|
+
* - This created a security gap where developers thought they were securing tables but policies weren't applied
|
|
10
|
+
*
|
|
11
|
+
* TEST VALIDATION:
|
|
12
|
+
* 1. Creates DynamoDB tables with different resource policy configurations
|
|
13
|
+
* 2. Tests both wildcard resources (for auto-generated names) and scoped resources (for explicit names)
|
|
14
|
+
* 3. Verifies policies get added to CloudFormation templates with correct structure
|
|
15
|
+
* 4. Ensures both patterns work without circular dependencies
|
|
16
|
+
*
|
|
17
|
+
* @see https://github.com/aws/aws-cdk/issues/35062
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { App, Fn, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
|
|
21
|
+
import { Construct } from 'constructs';
|
|
22
|
+
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
|
|
23
|
+
import * as iam from 'aws-cdk-lib/aws-iam';
|
|
24
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
25
|
+
|
|
26
|
+
export class TestStack extends Stack {
|
|
27
|
+
public readonly wildcardTable: dynamodb.Table;
|
|
28
|
+
public readonly scopedTable: dynamodb.Table;
|
|
29
|
+
public readonly grantTable: dynamodb.Table;
|
|
30
|
+
|
|
31
|
+
constructor(scope: Construct, id: string, props?: StackProps) {
|
|
32
|
+
super(scope, id, props);
|
|
33
|
+
|
|
34
|
+
// TEST 1: Table with wildcard resource policy (auto-generated name)
|
|
35
|
+
// This is the standard pattern to avoid circular dependencies
|
|
36
|
+
this.wildcardTable = new dynamodb.Table(this, 'WildcardTable', {
|
|
37
|
+
partitionKey: {
|
|
38
|
+
name: 'id',
|
|
39
|
+
type: dynamodb.AttributeType.STRING,
|
|
40
|
+
},
|
|
41
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// Add resource policy with wildcard resources
|
|
45
|
+
this.wildcardTable.addToResourcePolicy(new iam.PolicyStatement({
|
|
46
|
+
actions: ['dynamodb:GetItem', 'dynamodb:PutItem', 'dynamodb:Query'],
|
|
47
|
+
principals: [new iam.AccountRootPrincipal()],
|
|
48
|
+
resources: ['*'], // Use wildcard to avoid circular dependency - standard pattern for resource policies
|
|
49
|
+
}));
|
|
50
|
+
|
|
51
|
+
// TEST 2: Table with scoped resource policy (explicit table name)
|
|
52
|
+
// This demonstrates how to use scoped resources when table name is known at synthesis time
|
|
53
|
+
this.scopedTable = new dynamodb.Table(this, 'ScopedTable', {
|
|
54
|
+
tableName: 'my-explicit-scoped-table', // Explicit name enables scoped ARN construction
|
|
55
|
+
partitionKey: {
|
|
56
|
+
name: 'id',
|
|
57
|
+
type: dynamodb.AttributeType.STRING,
|
|
58
|
+
},
|
|
59
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Add resource policy with properly scoped resource using explicit table name
|
|
63
|
+
// This works because table name is known at synthesis time (no circular dependency)
|
|
64
|
+
this.scopedTable.addToResourcePolicy(new iam.PolicyStatement({
|
|
65
|
+
actions: ['dynamodb:GetItem', 'dynamodb:Query'],
|
|
66
|
+
principals: [new iam.AccountRootPrincipal()],
|
|
67
|
+
// Use CloudFormation intrinsic function to construct table ARN with known table name
|
|
68
|
+
resources: [Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/my-explicit-scoped-table')],
|
|
69
|
+
}));
|
|
70
|
+
|
|
71
|
+
// TEST 3: Table using grant methods with AccountRootPrincipal
|
|
72
|
+
// This validates the fix for issue #35967: circular dependency when using grant methods
|
|
73
|
+
// Before fix: grant methods with AccountRootPrincipal caused circular dependency
|
|
74
|
+
// After fix: grant methods use resourceSelfArns: ['*'] to avoid circular dependency
|
|
75
|
+
this.grantTable = new dynamodb.Table(this, 'GrantTable', {
|
|
76
|
+
partitionKey: {
|
|
77
|
+
name: 'id',
|
|
78
|
+
type: dynamodb.AttributeType.STRING,
|
|
79
|
+
},
|
|
80
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// This should NOT cause circular dependency - validates fix for #35967
|
|
84
|
+
// Using grantWriteData because it has simpler actions valid for resource policies
|
|
85
|
+
this.grantTable.grantWriteData(new iam.AccountRootPrincipal());
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Test Setup
|
|
90
|
+
const app = new App();
|
|
91
|
+
const stack = new TestStack(app, 'add-to-resource-policy-test-stack');
|
|
92
|
+
|
|
93
|
+
// Integration Test Configuration
|
|
94
|
+
new IntegTest(app, 'add-to-resource-policy-integ-test', {
|
|
95
|
+
testCases: [stack],
|
|
96
|
+
});
|
|
97
|
+
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.cci.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { App, Stack, StackProps } from 'aws-cdk-lib';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
|
|
4
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
5
|
+
|
|
6
|
+
const app = new App();
|
|
7
|
+
|
|
8
|
+
class TestStack extends Stack {
|
|
9
|
+
constructor(scope: Construct, id: string, props?: StackProps) {
|
|
10
|
+
super(scope, id, props);
|
|
11
|
+
|
|
12
|
+
new dynamodb.Table(this, 'TableV2', {
|
|
13
|
+
partitionKey: { name: 'hashKey', type: dynamodb.AttributeType.STRING },
|
|
14
|
+
sortKey: { name: 'sortKey', type: dynamodb.AttributeType.NUMBER },
|
|
15
|
+
contributorInsightsSpecification: {
|
|
16
|
+
enabled: true,
|
|
17
|
+
mode: dynamodb.ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const stack = new TestStack(app, 'CCI-Integ-Test-TableV1', { env: { region: 'eu-west-1' } });
|
|
24
|
+
|
|
25
|
+
new IntegTest(app, 'table-v1-CCI-test', {
|
|
26
|
+
testCases: [stack],
|
|
27
|
+
});
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.compound.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { App, RemovalPolicy, Stack } from 'aws-cdk-lib';
|
|
2
|
+
import { AttributeType, ProjectionType, Table } from 'aws-cdk-lib/aws-dynamodb';
|
|
3
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
4
|
+
|
|
5
|
+
const app = new App();
|
|
6
|
+
const stack = new Stack(app, 'aws-cdk-dynamodb-compound-keys');
|
|
7
|
+
|
|
8
|
+
const table = new Table(stack, 'Table', {
|
|
9
|
+
tableName: 'cdk-test-compound',
|
|
10
|
+
partitionKey: { name: 'pkey', type: AttributeType.NUMBER },
|
|
11
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
table.addGlobalSecondaryIndex({
|
|
15
|
+
indexName: 'IndexA',
|
|
16
|
+
partitionKeys: [{ name: 'PK1', type: AttributeType.STRING }, { name: 'PK2', type: AttributeType.NUMBER }],
|
|
17
|
+
sortKeys: [{ name: 'SK1', type: AttributeType.STRING }, { name: 'SK2', type: AttributeType.NUMBER }],
|
|
18
|
+
projectionType: ProjectionType.INCLUDE,
|
|
19
|
+
nonKeyAttributes: ['bar'],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
table.addGlobalSecondaryIndex({
|
|
23
|
+
indexName: 'IndexB',
|
|
24
|
+
partitionKey: { name: 'baz', type: AttributeType.STRING },
|
|
25
|
+
sortKeys: [{ name: 'bar', type: AttributeType.STRING }, { name: 'foo', type: AttributeType.NUMBER }],
|
|
26
|
+
projectionType: ProjectionType.INCLUDE,
|
|
27
|
+
nonKeyAttributes: ['blah'],
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
new IntegTest(app, 'aws-cdk-dynamodb-compound-key-gsi', {
|
|
31
|
+
testCases: [stack],
|
|
32
|
+
});
|
|
@@ -24,12 +24,16 @@ const table = new Table(stack, TABLE, {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
table.addGlobalSecondaryIndex({
|
|
27
|
-
|
|
27
|
+
contributorInsightsSpecification: {
|
|
28
|
+
enabled: true,
|
|
29
|
+
},
|
|
28
30
|
indexName: GSI_TEST_CASE_1,
|
|
29
31
|
partitionKey: GSI_PARTITION_KEY,
|
|
30
32
|
});
|
|
31
33
|
table.addGlobalSecondaryIndex({
|
|
32
|
-
|
|
34
|
+
contributorInsightsSpecification: {
|
|
35
|
+
enabled: false,
|
|
36
|
+
},
|
|
33
37
|
indexName: GSI_TEST_CASE_2,
|
|
34
38
|
partitionKey: GSI_PARTITION_KEY,
|
|
35
39
|
});
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.policy.ts
CHANGED
|
@@ -38,7 +38,27 @@ export class TestStack extends Stack {
|
|
|
38
38
|
removalPolicy: RemovalPolicy.DESTROY,
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
// IMPORTANT: Cross-account grants with auto-generated table names create circular dependencies
|
|
42
|
+
//
|
|
43
|
+
// WHY NOT this.tableTwo.grantReadData(new iam.AccountPrincipal('123456789012'))?
|
|
44
|
+
// - Cross-account principals cannot have policies attached to them
|
|
45
|
+
// - Grant falls back to adding a resource policy to the table
|
|
46
|
+
// - Resource policy tries to reference this.tableArn (the table's own ARN)
|
|
47
|
+
// - This creates a circular dependency: Table → ResourcePolicy → Table ARN → Table
|
|
48
|
+
// - CloudFormation fails with "Circular dependency between resources"
|
|
49
|
+
//
|
|
50
|
+
// SOLUTIONS:
|
|
51
|
+
// 1. Use addToResourcePolicy with wildcard resources (this approach)
|
|
52
|
+
// 2. Use explicit table names: tableName: 'my-table-name' (enables scoped resources)
|
|
53
|
+
// 3. Use same-account principals (grants go to principal policy, not resource policy)
|
|
54
|
+
//
|
|
55
|
+
this.tableTwo.addToResourcePolicy(new iam.PolicyStatement({
|
|
56
|
+
actions: ['dynamodb:*'],
|
|
57
|
+
// we need a valid account for cross-account principal otherwise it won't deploy
|
|
58
|
+
// this account is from fact-table.ts
|
|
59
|
+
principals: [new iam.AccountPrincipal('127311923021')],
|
|
60
|
+
resources: ['*'], // Wildcard avoids circular dependency - same pattern as KMS
|
|
61
|
+
}));
|
|
42
62
|
}
|
|
43
63
|
}
|
|
44
64
|
|