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.
Potentially problematic release.
This version of konokenj.cdk-api-mcp-server might be problematic. Click here for more details.
- 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
|
@@ -48,7 +48,6 @@ For CDK apps, declare them under the `dependencies` section. Use a caret so you
|
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
|
|
52
51
|
### Use in your code
|
|
53
52
|
|
|
54
53
|
#### Classic import
|
|
@@ -155,6 +154,86 @@ new MyStack(app, 'MyStack', {
|
|
|
155
154
|
For more information on bootstrapping accounts and customizing synthesis,
|
|
156
155
|
see [Bootstrapping in the CDK Developer Guide](https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html).
|
|
157
156
|
|
|
157
|
+
### STS Role Options
|
|
158
|
+
|
|
159
|
+
You can configure STS options that instruct the CDK CLI on which configuration should it use when assuming
|
|
160
|
+
the various roles that are involved in a deployment operation.
|
|
161
|
+
|
|
162
|
+
Refer to [the bootstrapping guide](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping-env.html#bootstrapping-env-roles) for further context.
|
|
163
|
+
|
|
164
|
+
These options are available via the `DefaultStackSynthesizer` properties:
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
class MyStack extends Stack {
|
|
168
|
+
constructor(scope: Construct, id: string, props: StackProps) {
|
|
169
|
+
super(scope, id, {
|
|
170
|
+
...props,
|
|
171
|
+
synthesizer: new DefaultStackSynthesizer({
|
|
172
|
+
deployRoleExternalId: '',
|
|
173
|
+
deployRoleAdditionalOptions: {
|
|
174
|
+
// https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters
|
|
175
|
+
},
|
|
176
|
+
fileAssetPublishingExternalId: '',
|
|
177
|
+
fileAssetPublishingRoleAdditionalOptions: {
|
|
178
|
+
// https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters
|
|
179
|
+
},
|
|
180
|
+
imageAssetPublishingExternalId: '',
|
|
181
|
+
imageAssetPublishingRoleAdditionalOptions: {
|
|
182
|
+
// https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters
|
|
183
|
+
},
|
|
184
|
+
lookupRoleExternalId: '',
|
|
185
|
+
lookupRoleAdditionalOptions: {
|
|
186
|
+
// https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters
|
|
187
|
+
},
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
> Note that the `*additionalOptions` property does not allow passing `ExternalId` or `RoleArn`, as these options
|
|
195
|
+
> have dedicated properties that configure them.
|
|
196
|
+
|
|
197
|
+
#### Session Tags
|
|
198
|
+
|
|
199
|
+
STS session tags are used to implement [Attribute-Based Access Control](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_attribute-based-access-control.html) (ABAC).
|
|
200
|
+
|
|
201
|
+
See [IAM tutorial: Define permissions to access AWS resources based on tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html).
|
|
202
|
+
|
|
203
|
+
You can pass session tags for each [role created during bootstrap](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping-env.html#bootstrapping-env-roles) via the `*additionalOptions` property:
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
class MyStack extends Stack {
|
|
207
|
+
constructor(parent: Construct, id: string, props: StackProps) {
|
|
208
|
+
super(parent, id, {
|
|
209
|
+
...props,
|
|
210
|
+
synthesizer: new DefaultStackSynthesizer({
|
|
211
|
+
deployRoleAdditionalOptions: {
|
|
212
|
+
Tags: [{ Key: 'Department', Value: 'Engineering' }]
|
|
213
|
+
},
|
|
214
|
+
fileAssetPublishingRoleAdditionalOptions: {
|
|
215
|
+
Tags: [{ Key: 'Department', Value: 'Engineering' }]
|
|
216
|
+
},
|
|
217
|
+
imageAssetPublishingRoleAdditionalOptions: {
|
|
218
|
+
Tags: [{ Key: 'Department', Value: 'Engineering' }]
|
|
219
|
+
},
|
|
220
|
+
lookupRoleAdditionalOptions: {
|
|
221
|
+
Tags: [{ Key: 'Department', Value: 'Engineering' }]
|
|
222
|
+
},
|
|
223
|
+
})
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
This will cause the CDK CLI to include session tags when assuming each of these roles during deployment.
|
|
230
|
+
Note that the trust policy of the role must contain permissions for the `sts:TagSession` action.
|
|
231
|
+
|
|
232
|
+
Refer to the [IAM user guide on session tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_permissions-required).
|
|
233
|
+
|
|
234
|
+
- If you are using a custom bootstrap template, make sure the template includes these permissions.
|
|
235
|
+
- If you are using the default bootstrap template from a CDK version lower than XXXX, you will need to rebootstrap your enviroment (once).
|
|
236
|
+
|
|
158
237
|
## Nested Stacks
|
|
159
238
|
|
|
160
239
|
[Nested stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) are stacks created as part of other stacks. You create a nested stack within another stack by using the `NestedStack` construct.
|
|
@@ -226,7 +305,7 @@ other.
|
|
|
226
305
|
> **This feature is currently experimental**
|
|
227
306
|
|
|
228
307
|
You can enable the Stack property `crossRegionReferences`
|
|
229
|
-
in order to access resources in a different stack
|
|
308
|
+
in order to access resources in a different stack *and* region. With this feature flag
|
|
230
309
|
enabled it is possible to do something like creating a CloudFront distribution in `us-east-2` and
|
|
231
310
|
an ACM certificate in `us-east-1`.
|
|
232
311
|
|
|
@@ -257,7 +336,7 @@ new cloudfront.Distribution(stack2, 'Distribution', {
|
|
|
257
336
|
});
|
|
258
337
|
```
|
|
259
338
|
|
|
260
|
-
When the AWS CDK determines that the resource is in a different stack
|
|
339
|
+
When the AWS CDK determines that the resource is in a different stack *and* is in a different
|
|
261
340
|
region, it will "export" the value by creating a custom resource in the producing stack which
|
|
262
341
|
creates SSM Parameters in the consuming region for each exported value. The parameters will be
|
|
263
342
|
created with the name '/cdk/exports/${consumingStackName}/${export-name}'.
|
|
@@ -401,6 +480,8 @@ CloudFormation to re-read the secret.
|
|
|
401
480
|
`SecretValue.ssmSecure()` is only supported for a limited set of resources.
|
|
402
481
|
[Click here for a list of supported resources and properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#template-parameters-dynamic-patterns-resources).
|
|
403
482
|
|
|
483
|
+
`SecretValue.cfnDynamicReferenceKey` takes the same parameters as `SecretValue.secretsManager` and returns a key which can be used within a [dynamic reference](#dynamic-references) to dynamically load a secret from AWS Secrets Manager.
|
|
484
|
+
|
|
404
485
|
## ARN manipulation
|
|
405
486
|
|
|
406
487
|
Sometimes you will need to put together or pick apart Amazon Resource Names
|
|
@@ -522,15 +603,20 @@ new CustomResource(this, 'MyMagicalResource', {
|
|
|
522
603
|
resourceType: 'Custom::MyCustomResource', // must start with 'Custom::'
|
|
523
604
|
|
|
524
605
|
// the resource properties
|
|
606
|
+
// properties like serviceToken or serviceTimeout are ported into properties automatically
|
|
607
|
+
// try not to use key names similar to these or there will be a risk of overwriting those values
|
|
525
608
|
properties: {
|
|
526
609
|
Property1: 'foo',
|
|
527
|
-
Property2: 'bar'
|
|
610
|
+
Property2: 'bar',
|
|
528
611
|
},
|
|
529
612
|
|
|
530
613
|
// the ARN of the provider (SNS/Lambda) which handles
|
|
531
614
|
// CREATE, UPDATE or DELETE events for this resource type
|
|
532
615
|
// see next section for details
|
|
533
|
-
serviceToken: 'ARN'
|
|
616
|
+
serviceToken: 'ARN',
|
|
617
|
+
|
|
618
|
+
// the maximum time, in seconds, that can elapse before a custom resource operation times out.
|
|
619
|
+
serviceTimeout: Duration.seconds(60),
|
|
534
620
|
});
|
|
535
621
|
```
|
|
536
622
|
|
|
@@ -560,7 +646,7 @@ Legend:
|
|
|
560
646
|
- **Language**: which programming languages can be used to implement handlers.
|
|
561
647
|
- **Footprint**: how many resources are used by the provider framework itself.
|
|
562
648
|
|
|
563
|
-
|
|
649
|
+
#### A note about singletons
|
|
564
650
|
|
|
565
651
|
When defining resources for a custom resource provider, you will likely want to
|
|
566
652
|
define them as a *stack singleton* so that only a single instance of the
|
|
@@ -844,6 +930,17 @@ new CfnOutput(this, 'OutputName', {
|
|
|
844
930
|
});
|
|
845
931
|
```
|
|
846
932
|
|
|
933
|
+
You can also use the `exportValue` method to export values as stack outputs:
|
|
934
|
+
|
|
935
|
+
```ts
|
|
936
|
+
declare const stack: Stack;
|
|
937
|
+
|
|
938
|
+
stack.exportValue(myBucket.bucketName, {
|
|
939
|
+
name: 'TheAwesomeBucket',
|
|
940
|
+
description: 'The name of an S3 bucket',
|
|
941
|
+
});
|
|
942
|
+
```
|
|
943
|
+
|
|
847
944
|
[cfn-stack-output]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html
|
|
848
945
|
|
|
849
946
|
### Parameters
|
|
@@ -964,7 +1061,7 @@ The properties passed to the level 2 constructs `AutoScalingGroup` and `Instance
|
|
|
964
1061
|
`aws-ec2` module abstract what is passed into the `CfnOption` properties `resourceSignal` and
|
|
965
1062
|
`autoScalingCreationPolicy`, but when using level 1 constructs you can specify these yourself.
|
|
966
1063
|
|
|
967
|
-
The CfnWaitCondition resource from the `aws-cloudformation` module
|
|
1064
|
+
The CfnWaitCondition resource from the `aws-cloudformation` module supports the `resourceSignal`.
|
|
968
1065
|
The format of the timeout is `PT#H#M#S`. In the example below AWS Cloudformation will wait for
|
|
969
1066
|
3 success signals to occur within 15 minutes before the status of the resource will be set to
|
|
970
1067
|
`CREATE_COMPLETE`.
|
|
@@ -1105,7 +1202,7 @@ regionTable.findInMap(Aws.REGION, 'regionName');
|
|
|
1105
1202
|
```
|
|
1106
1203
|
|
|
1107
1204
|
An optional default value can also be passed to `findInMap`. If either key is not found in the map and the mapping is lazy, `findInMap` will return the default value and not render the mapping.
|
|
1108
|
-
If the mapping is not lazy or either key is an unresolved token, the call to `findInMap` will return a token that resolves to
|
|
1205
|
+
If the mapping is not lazy or either key is an unresolved token, the call to `findInMap` will return a token that resolves to
|
|
1109
1206
|
`{ "Fn::FindInMap": [ "MapName", "TopLevelKey", "SecondLevelKey", { "DefaultValue": "DefaultValue" } ] }`, and the mapping will be rendered.
|
|
1110
1207
|
Note that the `AWS::LanguageExtentions` transform is added to enable the default value functionality.
|
|
1111
1208
|
|
|
@@ -1146,6 +1243,75 @@ new CfnDynamicReference(
|
|
|
1146
1243
|
|
|
1147
1244
|
[cfn-dynamic-references]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html
|
|
1148
1245
|
|
|
1246
|
+
## RemovalPolicies
|
|
1247
|
+
|
|
1248
|
+
The `RemovalPolicies` class provides a convenient way to manage removal policies for AWS CDK resources within a construct scope. It allows you to apply removal policies to multiple resources at once, with options to include or exclude specific resource types.
|
|
1249
|
+
|
|
1250
|
+
```typescript
|
|
1251
|
+
declare const scope: Construct;
|
|
1252
|
+
declare const parent: Construct;
|
|
1253
|
+
declare const bucket: s3.CfnBucket;
|
|
1254
|
+
|
|
1255
|
+
// Apply DESTROY policy to all resources in a scope
|
|
1256
|
+
RemovalPolicies.of(scope).destroy();
|
|
1257
|
+
|
|
1258
|
+
// Apply RETAIN policy to all resources in a scope
|
|
1259
|
+
RemovalPolicies.of(scope).retain();
|
|
1260
|
+
|
|
1261
|
+
// Apply SNAPSHOT policy to all resources in a scope
|
|
1262
|
+
RemovalPolicies.of(scope).snapshot();
|
|
1263
|
+
|
|
1264
|
+
// Apply RETAIN_ON_UPDATE_OR_DELETE policy to all resources in a scope
|
|
1265
|
+
RemovalPolicies.of(scope).retainOnUpdateOrDelete();
|
|
1266
|
+
|
|
1267
|
+
// Apply RETAIN policy only to specific resource types
|
|
1268
|
+
RemovalPolicies.of(parent).retain({
|
|
1269
|
+
applyToResourceTypes: [
|
|
1270
|
+
'AWS::DynamoDB::Table',
|
|
1271
|
+
bucket.cfnResourceType, // 'AWS::S3::Bucket'
|
|
1272
|
+
rds.CfnDBInstance.CFN_RESOURCE_TYPE_NAME, // 'AWS::RDS::DBInstance'
|
|
1273
|
+
],
|
|
1274
|
+
});
|
|
1275
|
+
|
|
1276
|
+
// Apply SNAPSHOT policy excluding specific resource types
|
|
1277
|
+
RemovalPolicies.of(scope).snapshot({
|
|
1278
|
+
excludeResourceTypes: ['AWS::Test::Resource'],
|
|
1279
|
+
});
|
|
1280
|
+
```
|
|
1281
|
+
|
|
1282
|
+
### RemovalPolicies vs MissingRemovalPolicies
|
|
1283
|
+
|
|
1284
|
+
CDK provides two different classes for managing removal policies:
|
|
1285
|
+
|
|
1286
|
+
- RemovalPolicies: Always applies the specified removal policy, overriding any existing policies.
|
|
1287
|
+
- MissingRemovalPolicies: Applies the removal policy only to resources that don't already have a policy set.
|
|
1288
|
+
|
|
1289
|
+
```typescript
|
|
1290
|
+
// Override any existing policies
|
|
1291
|
+
RemovalPolicies.of(scope).retain();
|
|
1292
|
+
|
|
1293
|
+
// Only apply to resources without existing policies
|
|
1294
|
+
MissingRemovalPolicies.of(scope).retain();
|
|
1295
|
+
```
|
|
1296
|
+
|
|
1297
|
+
### Aspect Priority
|
|
1298
|
+
|
|
1299
|
+
Both RemovalPolicies and MissingRemovalPolicies are implemented as [Aspects](#aspects). You can control the order in which they're applied using the priority parameter:
|
|
1300
|
+
|
|
1301
|
+
```typescript
|
|
1302
|
+
declare const stack: Stack;
|
|
1303
|
+
|
|
1304
|
+
// Apply in a specific order based on priority
|
|
1305
|
+
RemovalPolicies.of(stack).retain({ priority: 100 });
|
|
1306
|
+
RemovalPolicies.of(stack).destroy({ priority: 200 }); // This will override the RETAIN policy
|
|
1307
|
+
```
|
|
1308
|
+
|
|
1309
|
+
For RemovalPolicies, the policies are applied in order of aspect execution, with the last applied policy overriding previous ones. The priority only affects the order in which aspects are applied during synthesis.
|
|
1310
|
+
|
|
1311
|
+
#### Note
|
|
1312
|
+
|
|
1313
|
+
When using MissingRemovalPolicies with priority, a warning will be issued as this can lead to unexpected behavior. This is because MissingRemovalPolicies only applies to resources without existing policies, making priority less relevant.
|
|
1314
|
+
|
|
1149
1315
|
### Template Options & Transform
|
|
1150
1316
|
|
|
1151
1317
|
CloudFormation templates support a number of options, including which Macros or
|
|
@@ -1239,6 +1405,27 @@ const stack = new Stack(app, 'StackName', {
|
|
|
1239
1405
|
});
|
|
1240
1406
|
```
|
|
1241
1407
|
|
|
1408
|
+
### Receiving CloudFormation Stack Events
|
|
1409
|
+
|
|
1410
|
+
You can add one or more SNS Topic ARNs to any Stack:
|
|
1411
|
+
|
|
1412
|
+
```ts
|
|
1413
|
+
const stack = new Stack(app, 'StackName', {
|
|
1414
|
+
notificationArns: ['arn:aws:sns:us-east-1:123456789012:Topic'],
|
|
1415
|
+
});
|
|
1416
|
+
```
|
|
1417
|
+
|
|
1418
|
+
Stack events will be sent to any SNS Topics in this list. These ARNs are added to those specified using
|
|
1419
|
+
the `--notification-arns` command line option.
|
|
1420
|
+
|
|
1421
|
+
Note that in order to do delete notification ARNs entirely, you must pass an empty array ([]) instead of omitting it.
|
|
1422
|
+
If you omit the property, no action on existing ARNs will take place.
|
|
1423
|
+
|
|
1424
|
+
> [!NOTE]
|
|
1425
|
+
> Adding the `notificationArns` property (or using the `--notification-arns` CLI options) will **override**
|
|
1426
|
+
> any existing ARNs configured on the stack. If you have an external system managing notification ARNs,
|
|
1427
|
+
> either migrate to use this mechanism, or avoid specfying notification ARNs with the CDK.
|
|
1428
|
+
|
|
1242
1429
|
### CfnJson
|
|
1243
1430
|
|
|
1244
1431
|
`CfnJson` allows you to postpone the resolution of a JSON blob from
|
|
@@ -1287,16 +1474,16 @@ Set the context key `@aws-cdk/core:stackResourceLimit` with the proper value, be
|
|
|
1287
1474
|
|
|
1288
1475
|
### Template Indentation
|
|
1289
1476
|
|
|
1290
|
-
The AWS CloudFormation templates generated by CDK include indentation by default.
|
|
1291
|
-
Indentation makes the templates more readable, but also increases their size,
|
|
1477
|
+
The AWS CloudFormation templates generated by CDK include indentation by default.
|
|
1478
|
+
Indentation makes the templates more readable, but also increases their size,
|
|
1292
1479
|
and CloudFormation templates cannot exceed 1MB.
|
|
1293
1480
|
|
|
1294
1481
|
It's possible to reduce the size of your templates by suppressing indentation.
|
|
1295
1482
|
|
|
1296
1483
|
To do this for all templates, set the context key `@aws-cdk/core:suppressTemplateIndentation` to `true`.
|
|
1297
1484
|
|
|
1298
|
-
To do this for a specific stack, add a `suppressTemplateIndentation: true` property to the
|
|
1299
|
-
stack's `StackProps` parameter. You can also set this property to `false` to override
|
|
1485
|
+
To do this for a specific stack, add a `suppressTemplateIndentation: true` property to the
|
|
1486
|
+
stack's `StackProps` parameter. You can also set this property to `false` to override
|
|
1300
1487
|
the context key setting.
|
|
1301
1488
|
|
|
1302
1489
|
## App Context
|
|
@@ -1341,7 +1528,7 @@ new App({
|
|
|
1341
1528
|
cdk synth --context @aws-cdk/core:newStyleStackSynthesis=true
|
|
1342
1529
|
```
|
|
1343
1530
|
|
|
1344
|
-
|
|
1531
|
+
#### `cdk.json`
|
|
1345
1532
|
|
|
1346
1533
|
```json
|
|
1347
1534
|
{
|
|
@@ -1351,7 +1538,7 @@ _cdk.json_
|
|
|
1351
1538
|
}
|
|
1352
1539
|
```
|
|
1353
1540
|
|
|
1354
|
-
|
|
1541
|
+
#### `cdk.context.json`
|
|
1355
1542
|
|
|
1356
1543
|
```json
|
|
1357
1544
|
{
|
|
@@ -1359,7 +1546,7 @@ _cdk.context.json_
|
|
|
1359
1546
|
}
|
|
1360
1547
|
```
|
|
1361
1548
|
|
|
1362
|
-
|
|
1549
|
+
#### `~/.cdk.json`
|
|
1363
1550
|
|
|
1364
1551
|
```json
|
|
1365
1552
|
{
|
|
@@ -1398,7 +1585,7 @@ generated CloudFormation templates against your policies immediately after
|
|
|
1398
1585
|
synthesis. If there are any violations, the synthesis will fail and a report
|
|
1399
1586
|
will be printed to the console or to a file (see below).
|
|
1400
1587
|
|
|
1401
|
-
>
|
|
1588
|
+
> [!NOTE]
|
|
1402
1589
|
> This feature is considered experimental, and both the plugin API and the
|
|
1403
1590
|
> format of the validation report are subject to change in the future.
|
|
1404
1591
|
|
|
@@ -1436,7 +1623,7 @@ validation.
|
|
|
1436
1623
|
> etc. It's your responsibility as the consumer of a plugin to verify that it is
|
|
1437
1624
|
> secure to use.
|
|
1438
1625
|
|
|
1439
|
-
By default, the report will be printed in a human
|
|
1626
|
+
By default, the report will be printed in a human-readable format. If you want a
|
|
1440
1627
|
report in JSON format, enable it using the `@aws-cdk/core:validationReportJson`
|
|
1441
1628
|
context passing it directly to the application:
|
|
1442
1629
|
|
|
@@ -1450,6 +1637,18 @@ Alternatively, you can set this context key-value pair using the `cdk.json` or
|
|
|
1450
1637
|
`cdk.context.json` files in your project directory (see
|
|
1451
1638
|
[Runtime context](https://docs.aws.amazon.com/cdk/v2/guide/context.html)).
|
|
1452
1639
|
|
|
1640
|
+
It is also possible to enable both JSON and human-readable formats by setting
|
|
1641
|
+
`@aws-cdk/core:validationReportPrettyPrint` context key explicitly:
|
|
1642
|
+
|
|
1643
|
+
```ts
|
|
1644
|
+
const app = new App({
|
|
1645
|
+
context: {
|
|
1646
|
+
'@aws-cdk/core:validationReportJson': true,
|
|
1647
|
+
'@aws-cdk/core:validationReportPrettyPrint': true,
|
|
1648
|
+
},
|
|
1649
|
+
});
|
|
1650
|
+
```
|
|
1651
|
+
|
|
1453
1652
|
If you choose the JSON format, the CDK will print the policy validation report
|
|
1454
1653
|
to a file called `policy-validation-report.json` in the cloud assembly
|
|
1455
1654
|
directory. For the default, human-readable format, the report will be printed to
|
|
@@ -1546,6 +1745,157 @@ warning by the `id`.
|
|
|
1546
1745
|
Annotations.of(this).acknowledgeWarning('IAM:Group:MaxPoliciesExceeded', 'Account has quota increased to 20');
|
|
1547
1746
|
```
|
|
1548
1747
|
|
|
1748
|
+
### Acknowledging Infos
|
|
1749
|
+
|
|
1750
|
+
Informational messages can also be emitted and acknowledged. Use `addInfoV2()`
|
|
1751
|
+
to add an info message that can later be suppressed with `acknowledgeInfo()`.
|
|
1752
|
+
Unlike warnings, info messages are not affected by the `--strict` mode and will never cause synthesis to fail.
|
|
1753
|
+
|
|
1754
|
+
```ts
|
|
1755
|
+
Annotations.of(this).addInfoV2('my-lib:Construct.someInfo', 'Some message explaining the info');
|
|
1756
|
+
Annotations.of(this).acknowledgeInfo('my-lib:Construct.someInfo', 'This info can be ignored');
|
|
1757
|
+
```
|
|
1758
|
+
|
|
1759
|
+
## Aspects
|
|
1760
|
+
|
|
1761
|
+
[Aspects](https://docs.aws.amazon.com/cdk/v2/guide/aspects.html) is a feature in CDK that allows you to apply operations or transformations across all
|
|
1762
|
+
constructs in a construct tree. Common use cases include tagging resources, enforcing encryption on S3 Buckets, or applying specific security or
|
|
1763
|
+
compliance rules to all resources in a stack.
|
|
1764
|
+
|
|
1765
|
+
Conceptually, there are two types of Aspects:
|
|
1766
|
+
|
|
1767
|
+
- **Read-only aspects** scan the construct tree but do not make changes to the tree. Common use cases of read-only aspects include performing validations
|
|
1768
|
+
(for example, enforcing that all S3 Buckets have versioning enabled) and logging (for example, collecting information about all deployed resources for
|
|
1769
|
+
audits or compliance).
|
|
1770
|
+
- **Mutating aspects** either (1.) add new nodes or (2.) mutate existing nodes of the tree in-place. One commonly used mutating Aspect is adding Tags to
|
|
1771
|
+
resources. An example of an Aspect that adds a node is one that automatically adds a security group to every EC2 instance in the construct tree if
|
|
1772
|
+
no default is specified.
|
|
1773
|
+
|
|
1774
|
+
Here is a simple example of creating and applying an Aspect on a Stack to enable versioning on all S3 Buckets:
|
|
1775
|
+
|
|
1776
|
+
```ts
|
|
1777
|
+
class EnableBucketVersioning implements IAspect {
|
|
1778
|
+
visit(node: IConstruct) {
|
|
1779
|
+
if (node instanceof s3.CfnBucket) {
|
|
1780
|
+
node.versioningConfiguration = {
|
|
1781
|
+
status: 'Enabled'
|
|
1782
|
+
};
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
const app = new App();
|
|
1788
|
+
const stack = new MyStack(app, 'MyStack');
|
|
1789
|
+
|
|
1790
|
+
// Apply the aspect to enable versioning on all S3 Buckets
|
|
1791
|
+
Aspects.of(stack).add(new EnableBucketVersioning());
|
|
1792
|
+
```
|
|
1793
|
+
|
|
1794
|
+
### Aspect Stabilization
|
|
1795
|
+
|
|
1796
|
+
The modern behavior is that Aspects automatically run on newly added nodes to the construct tree. This is controlled by the
|
|
1797
|
+
flag `@aws-cdk/core:aspectStabilization`, which is default for new projects (since version 2.172.0).
|
|
1798
|
+
|
|
1799
|
+
The old behavior of Aspects (without stabilization) was that Aspect invocation runs once on the entire construct
|
|
1800
|
+
tree. This meant that nested Aspects (Aspects that create new Aspects) are not invoked and nodes created by Aspects at a higher level of the construct tree are not visited.
|
|
1801
|
+
|
|
1802
|
+
To enable the stabilization behavior for older versions, use this feature by putting the following into your `cdk.context.json`:
|
|
1803
|
+
|
|
1804
|
+
```json
|
|
1805
|
+
{
|
|
1806
|
+
"@aws-cdk/core:aspectStabilization": true
|
|
1807
|
+
}
|
|
1808
|
+
```
|
|
1809
|
+
|
|
1810
|
+
### Aspect Priorities
|
|
1811
|
+
|
|
1812
|
+
Users can specify the order in which Aspects are applied on a construct by using the optional priority parameter when applying an Aspect. Priority
|
|
1813
|
+
values must be non-negative integers, where a higher number means the Aspect will be applied later, and a lower number means it will be applied sooner.
|
|
1814
|
+
|
|
1815
|
+
By default, newly created nodes always inherit aspects. Priorities are mainly for ordering between mutating aspects on the construct tree.
|
|
1816
|
+
|
|
1817
|
+
CDK provides standard priority values for mutating and readonly aspects to help ensure consistency across different construct libraries.
|
|
1818
|
+
Note that Aspects that have same priority value are not guaranteed to be executed
|
|
1819
|
+
in a consistent order.
|
|
1820
|
+
|
|
1821
|
+
```ts
|
|
1822
|
+
/**
|
|
1823
|
+
* Default Priority values for Aspects.
|
|
1824
|
+
*/
|
|
1825
|
+
class AspectPriority {
|
|
1826
|
+
/**
|
|
1827
|
+
* Suggested priority for Aspects that mutate the construct tree.
|
|
1828
|
+
*/
|
|
1829
|
+
static readonly MUTATING: number = 200;
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* Suggested priority for Aspects that only read the construct tree.
|
|
1833
|
+
*/
|
|
1834
|
+
static readonly READONLY: number = 1000;
|
|
1835
|
+
|
|
1836
|
+
/**
|
|
1837
|
+
* Default priority for Aspects that are applied without a priority.
|
|
1838
|
+
*/
|
|
1839
|
+
static readonly DEFAULT: number = 500;
|
|
1840
|
+
}
|
|
1841
|
+
```
|
|
1842
|
+
|
|
1843
|
+
If no priority is provided, the default value will be 500. This ensures that aspects without a specified priority run after mutating aspects but before
|
|
1844
|
+
any readonly aspects.
|
|
1845
|
+
|
|
1846
|
+
Correctly applying Aspects with priority values ensures that mutating aspects (such as adding tags or resources) run before validation aspects. This allows users to avoid misconfigurations and ensure that the final
|
|
1847
|
+
construct tree is fully validated before being synthesized.
|
|
1848
|
+
|
|
1849
|
+
### Applying Aspects with Priority
|
|
1850
|
+
|
|
1851
|
+
```ts
|
|
1852
|
+
class MutatingAspect implements IAspect {
|
|
1853
|
+
visit(node: IConstruct) {
|
|
1854
|
+
// Modifies a resource in some way
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
class ValidationAspect implements IAspect {
|
|
1859
|
+
visit(node: IConstruct) {
|
|
1860
|
+
// Perform some readonly validation on the cosntruct tree
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
const stack = new Stack();
|
|
1865
|
+
|
|
1866
|
+
Aspects.of(stack).add(new MutatingAspect(), { priority: AspectPriority.MUTATING } ); // Run first (mutating aspects)
|
|
1867
|
+
Aspects.of(stack).add(new ValidationAspect(), { priority: AspectPriority.READONLY } ); // Run later (readonly aspects)
|
|
1868
|
+
```
|
|
1869
|
+
|
|
1870
|
+
### Inspecting applied aspects and changing priorities
|
|
1871
|
+
|
|
1872
|
+
We also give customers the ability to view all of their applied aspects and override the priority on these aspects.
|
|
1873
|
+
The `AspectApplication` class represents an Aspect that is applied to a node of the construct tree with a priority.
|
|
1874
|
+
|
|
1875
|
+
Users can access AspectApplications on a node by calling `applied` from the Aspects class as follows:
|
|
1876
|
+
|
|
1877
|
+
```ts
|
|
1878
|
+
declare const root: Construct;
|
|
1879
|
+
const app = new App();
|
|
1880
|
+
const stack = new MyStack(app, 'MyStack');
|
|
1881
|
+
|
|
1882
|
+
Aspects.of(stack).add(new MyAspect());
|
|
1883
|
+
|
|
1884
|
+
let aspectApplications: AspectApplication[] = Aspects.of(root).applied;
|
|
1885
|
+
|
|
1886
|
+
for (const aspectApplication of aspectApplications) {
|
|
1887
|
+
// The aspect we are applying
|
|
1888
|
+
console.log(aspectApplication.aspect);
|
|
1889
|
+
// The construct we are applying the aspect to
|
|
1890
|
+
console.log(aspectApplication.construct);
|
|
1891
|
+
// The priority it was applied with
|
|
1892
|
+
console.log(aspectApplication.priority);
|
|
1893
|
+
|
|
1894
|
+
// Change the priority
|
|
1895
|
+
aspectApplication.priority = 700;
|
|
1896
|
+
}
|
|
1897
|
+
```
|
|
1898
|
+
|
|
1549
1899
|
## Blueprint Property Injection
|
|
1550
1900
|
|
|
1551
1901
|
The goal of Blueprint Property Injection is to provide builders an automatic way to set default property values.
|
|
@@ -334,6 +334,31 @@ const getMessageIntegration = new apigateway.AwsIntegration({
|
|
|
334
334
|
});
|
|
335
335
|
```
|
|
336
336
|
|
|
337
|
+
### Lambda Integration Permissions
|
|
338
|
+
|
|
339
|
+
By default, creating a `LambdaIntegration` will add a permission for API Gateway to invoke your AWS Lambda function, scoped to the specific method which uses the integration.
|
|
340
|
+
|
|
341
|
+
If you reuse the same AWS Lambda function for many integrations, the AWS Lambda permission policy size can be exceeded by adding a separate policy statement for each method which invokes the AWS Lambda function. To avoid this, you can opt to scope permissions to any method on the API by setting `scopePermissionToMethod` to `false`, and this will ensure only a single policy statement is added to the AWS Lambda permission policy.
|
|
342
|
+
|
|
343
|
+
```ts
|
|
344
|
+
declare const book: apigateway.Resource;
|
|
345
|
+
declare const backend: lambda.Function;
|
|
346
|
+
|
|
347
|
+
const getBookIntegration = new apigateway.LambdaIntegration(backend, {
|
|
348
|
+
scopePermissionToMethod: false,
|
|
349
|
+
});
|
|
350
|
+
const createBookIntegration = new apigateway.LambdaIntegration(backend, {
|
|
351
|
+
scopePermissionToMethod: false,
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
book.addMethod('GET', getBookIntegration);
|
|
355
|
+
book.addMethod('POST', createBookIntegration);
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
In the above example, a single permission is added, shared by both `getBookIntegration` and `createBookIntegration`.
|
|
359
|
+
|
|
360
|
+
Note that setting `scopePermissionToMethod` to `false` will always allow test invocations, no matter the value specified for `allowTestInvoke`.
|
|
361
|
+
|
|
337
362
|
## Usage Plan & API Keys
|
|
338
363
|
|
|
339
364
|
A usage plan specifies who can access one or more deployed API stages and methods, and the rate at which they can be
|
|
@@ -1652,6 +1677,15 @@ const api = new apigateway.SpecRestApi(this, 'books-api', {
|
|
|
1652
1677
|
});
|
|
1653
1678
|
```
|
|
1654
1679
|
|
|
1680
|
+
`SpecRestApi` also supports binary media types, similar to `RestApi`:
|
|
1681
|
+
|
|
1682
|
+
```ts
|
|
1683
|
+
const api = new apigateway.SpecRestApi(this, 'books-api', {
|
|
1684
|
+
apiDefinition: apigateway.ApiDefinition.fromAsset('path-to-file.json'),
|
|
1685
|
+
binaryMediaTypes: ['image/png', 'application/pdf']
|
|
1686
|
+
});
|
|
1687
|
+
```
|
|
1688
|
+
|
|
1655
1689
|
### Endpoint configuration
|
|
1656
1690
|
|
|
1657
1691
|
By default, `SpecRestApi` will create an edge optimized endpoint.
|
|
@@ -42,7 +42,7 @@ const sendResource = root.addResource('InitiateAction');
|
|
|
42
42
|
const myfunc = new lambda.Function(stack, 'lambda-s3', {
|
|
43
43
|
code: lambda.AssetCode.fromAsset(path.join(__dirname, 'assets')),
|
|
44
44
|
handler: 'index.handler',
|
|
45
|
-
runtime: lambda.Runtime.
|
|
45
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
const sendLambdaIntegration = new agw.LambdaIntegration(myfunc);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda';
|
|
2
|
+
import { App, Stack } from 'aws-cdk-lib';
|
|
3
|
+
import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
4
|
+
import { Construct } from 'constructs';
|
|
5
|
+
import { LambdaIntegration, RestApi } from 'aws-cdk-lib/aws-apigateway';
|
|
6
|
+
|
|
7
|
+
class LambdaPermissionConsolidationStack extends Stack {
|
|
8
|
+
public readonly api: RestApi;
|
|
9
|
+
constructor(scope: Construct) {
|
|
10
|
+
super(scope, 'LambdaPermissionConsolidationStack');
|
|
11
|
+
|
|
12
|
+
const fn = new Function(this, 'Handler', {
|
|
13
|
+
code: Code.fromInline(`exports.handler = async function(event) {
|
|
14
|
+
return {
|
|
15
|
+
body: JSON.stringify({
|
|
16
|
+
message: 'Hello from ' + event.httpMethod,
|
|
17
|
+
}),
|
|
18
|
+
statusCode: 200,
|
|
19
|
+
headers: { 'Content-Type': 'application/json' }
|
|
20
|
+
};
|
|
21
|
+
}`),
|
|
22
|
+
runtime: Runtime.NODEJS_18_X,
|
|
23
|
+
handler: 'index.handler',
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
this.api = new RestApi(this, 'Api', {
|
|
27
|
+
cloudWatchRole: true,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const methods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD'];
|
|
31
|
+
methods.forEach(method => {
|
|
32
|
+
this.api.root.addMethod(method, new LambdaIntegration(fn, {
|
|
33
|
+
scopePermissionToMethod: false,
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const app = new App({
|
|
40
|
+
postCliContext: {
|
|
41
|
+
'@aws-cdk/aws-lambda:useCdkManagedLogGroup': false,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
const testCase = new LambdaPermissionConsolidationStack(app);
|
|
45
|
+
const integ = new IntegTest(app, 'lambda-permission-consolidation', {
|
|
46
|
+
testCases: [testCase],
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Test that all methods work after consolidation
|
|
50
|
+
const call = integ.assertions.httpApiCall(testCase.api.deploymentStage.urlForPath('/'), {
|
|
51
|
+
method: 'GET',
|
|
52
|
+
});
|
|
53
|
+
call.expect(ExpectedResult.objectLike({
|
|
54
|
+
body: { message: 'Hello from GET' },
|
|
55
|
+
}));
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.spec-restapi.ts
CHANGED
|
@@ -14,6 +14,7 @@ class Test extends cdk.Stack {
|
|
|
14
14
|
apiDefinition: apigateway.ApiDefinition.fromAsset(path.join(__dirname, 'sample-definition.yaml')),
|
|
15
15
|
disableExecuteApiEndpoint: true,
|
|
16
16
|
minCompressionSize: Size.bytes(1024),
|
|
17
|
+
binaryMediaTypes: ['image/png', 'application/pdf'],
|
|
17
18
|
retainDeployments: true,
|
|
18
19
|
cloudWatchRole: true,
|
|
19
20
|
deployOptions: {
|