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
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.table-v2-global.ts
CHANGED
|
@@ -19,7 +19,9 @@ class TestStack extends Stack {
|
|
|
19
19
|
writeCapacity: Capacity.autoscaled({ maxCapacity: 20, targetUtilizationPercent: 60, seedCapacity: 10 }),
|
|
20
20
|
}),
|
|
21
21
|
encryption: TableEncryptionV2.awsManagedKey(),
|
|
22
|
-
|
|
22
|
+
contributorInsightsSpecification: {
|
|
23
|
+
enabled: true,
|
|
24
|
+
},
|
|
23
25
|
pointInTimeRecovery: true,
|
|
24
26
|
tableClass: TableClass.STANDARD_INFREQUENT_ACCESS,
|
|
25
27
|
timeToLiveAttribute: 'attr',
|
|
@@ -49,7 +51,9 @@ class TestStack extends Stack {
|
|
|
49
51
|
readCapacity: Capacity.autoscaled({ minCapacity: 5, maxCapacity: 25 }),
|
|
50
52
|
globalSecondaryIndexOptions: {
|
|
51
53
|
gsi2: {
|
|
52
|
-
|
|
54
|
+
contributorInsightsSpecification: {
|
|
55
|
+
enabled: false,
|
|
56
|
+
},
|
|
53
57
|
},
|
|
54
58
|
},
|
|
55
59
|
tags: [{ key: 'USE2ReplicaTagKey', value: 'USE2ReplicaTagValue' }],
|
|
@@ -57,7 +61,9 @@ class TestStack extends Stack {
|
|
|
57
61
|
{
|
|
58
62
|
region: 'us-west-2',
|
|
59
63
|
tableClass: TableClass.STANDARD,
|
|
60
|
-
|
|
64
|
+
contributorInsightsSpecification: {
|
|
65
|
+
enabled: false,
|
|
66
|
+
},
|
|
61
67
|
globalSecondaryIndexOptions: {
|
|
62
68
|
gsi1: {
|
|
63
69
|
readCapacity: Capacity.fixed(15),
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.table-v2-mrsc.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
2
|
+
import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
|
|
3
|
+
import { AttributeType, MultiRegionConsistency, TableV2 } from 'aws-cdk-lib/aws-dynamodb';
|
|
4
|
+
import { Construct } from 'constructs';
|
|
5
|
+
|
|
6
|
+
class TestStack extends Stack {
|
|
7
|
+
public constructor(scope: Construct, id: string, props: StackProps) {
|
|
8
|
+
super(scope, id, props);
|
|
9
|
+
|
|
10
|
+
new TableV2(this, 'GlobalTable', {
|
|
11
|
+
tableName: 'my-global-table',
|
|
12
|
+
partitionKey: { name: 'pk', type: AttributeType.STRING },
|
|
13
|
+
sortKey: { name: 'sk', type: AttributeType.NUMBER },
|
|
14
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
15
|
+
multiRegionConsistency: MultiRegionConsistency.STRONG,
|
|
16
|
+
witnessRegion: 'us-west-2',
|
|
17
|
+
replicas: [
|
|
18
|
+
{
|
|
19
|
+
region: 'us-east-2',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const app = new App();
|
|
27
|
+
new IntegTest(app, 'aws-cdk-global-table-integ', {
|
|
28
|
+
testCases: [new TestStack(app, 'aws-cdk-global-table-mrsc', { env: { region: 'us-east-1' } })],
|
|
29
|
+
regions: ['us-east-1'],
|
|
30
|
+
stackUpdateWorkflow: false,
|
|
31
|
+
});
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.table-v2.compound.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
2
|
+
import { App, RemovalPolicy, Stack } from 'aws-cdk-lib';
|
|
3
|
+
import { AttributeType, ProjectionType, TableV2 } from 'aws-cdk-lib/aws-dynamodb';
|
|
4
|
+
|
|
5
|
+
const app = new App();
|
|
6
|
+
const stack = new Stack(app, 'aws-cdk-dynamodb-v2-compound-keys');
|
|
7
|
+
|
|
8
|
+
const table = new TableV2(stack, 'Table', {
|
|
9
|
+
tableName: 'cdk-test-tableV2-compound',
|
|
10
|
+
partitionKey: { name: 'pkey', type: AttributeType.NUMBER },
|
|
11
|
+
globalSecondaryIndexes: [{
|
|
12
|
+
indexName: 'IndexA',
|
|
13
|
+
partitionKeys: [{ name: 'GSIAPK1', type: AttributeType.STRING }, { name: 'GSIAPK2', type: AttributeType.STRING }],
|
|
14
|
+
sortKeys: [{ name: 'GSIASK1', type: AttributeType.STRING }, { name: 'GSIASK2', type: AttributeType.NUMBER }],
|
|
15
|
+
}],
|
|
16
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
table.addGlobalSecondaryIndex({
|
|
20
|
+
indexName: 'IndexB',
|
|
21
|
+
partitionKeys: [{ name: 'PK1', type: AttributeType.STRING }, { name: 'PK2', type: AttributeType.NUMBER }],
|
|
22
|
+
sortKeys: [{ name: 'SK1', type: AttributeType.STRING }, { name: 'SK2', type: AttributeType.NUMBER }],
|
|
23
|
+
projectionType: ProjectionType.INCLUDE,
|
|
24
|
+
nonKeyAttributes: ['bar'],
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
table.addGlobalSecondaryIndex({
|
|
28
|
+
indexName: 'IndexC',
|
|
29
|
+
partitionKey: { name: 'baz', type: AttributeType.STRING },
|
|
30
|
+
sortKeys: [{ name: 'bar', type: AttributeType.STRING }],
|
|
31
|
+
projectionType: ProjectionType.INCLUDE,
|
|
32
|
+
nonKeyAttributes: ['blah'],
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
table.addGlobalSecondaryIndex({
|
|
36
|
+
indexName: 'IndexD',
|
|
37
|
+
partitionKeys: [{ name: 'PK3', type: AttributeType.STRING }, { name: 'PK4', type: AttributeType.NUMBER }],
|
|
38
|
+
sortKeys: [{ name: 'SK3', type: AttributeType.STRING }, { name: 'SK4', type: AttributeType.NUMBER }],
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
new IntegTest(app, 'aws-cdk-dynamodbv2-compound-key-gsi', {
|
|
42
|
+
testCases: [stack],
|
|
43
|
+
});
|
|
@@ -1104,6 +1104,18 @@ new ec2.InterfaceVpcEndpoint(this, 'VPC Endpoint', {
|
|
|
1104
1104
|
});
|
|
1105
1105
|
```
|
|
1106
1106
|
|
|
1107
|
+
For cross-region VPC endpoints, specify the `serviceRegion` parameter:
|
|
1108
|
+
|
|
1109
|
+
```ts
|
|
1110
|
+
declare const vpc: ec2.Vpc;
|
|
1111
|
+
|
|
1112
|
+
new ec2.InterfaceVpcEndpoint(this, 'CrossRegionEndpoint', {
|
|
1113
|
+
vpc,
|
|
1114
|
+
service: new ec2.InterfaceVpcEndpointService('com.amazonaws.vpce.us-east-1.vpce-svc-123456', 443),
|
|
1115
|
+
serviceRegion: 'us-east-1', // Same region as the service endpoint above
|
|
1116
|
+
});
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1107
1119
|
#### Security groups for interface VPC endpoints
|
|
1108
1120
|
|
|
1109
1121
|
By default, interface VPC endpoints create a new security group and all traffic to the endpoint from within the VPC will be automatically allowed.
|
|
@@ -1294,6 +1306,21 @@ const endpoint = vpc.addClientVpnEndpoint('Endpoint', {
|
|
|
1294
1306
|
});
|
|
1295
1307
|
```
|
|
1296
1308
|
|
|
1309
|
+
To control whether clients are automatically disconnected when the maximum session duration is reached, use the `disconnectOnSessionTimeout` prop.
|
|
1310
|
+
By default (`true`), clients are disconnected and must manually reconnect.
|
|
1311
|
+
Set to `false` to allow automatic reconnection attempts:
|
|
1312
|
+
|
|
1313
|
+
```ts fixture=client-vpn
|
|
1314
|
+
const endpoint = vpc.addClientVpnEndpoint('Endpoint', {
|
|
1315
|
+
cidr: '10.100.0.0/16',
|
|
1316
|
+
serverCertificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/server-certificate-id',
|
|
1317
|
+
clientCertificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/client-certificate-id',
|
|
1318
|
+
disconnectOnSessionTimeout: false, // Allow automatic reconnection attempts
|
|
1319
|
+
});
|
|
1320
|
+
```
|
|
1321
|
+
|
|
1322
|
+
Detail information about maximum VPN session duration timeout can be found in the [AWS documentation](https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-max-duration.html).
|
|
1323
|
+
|
|
1297
1324
|
## Instances
|
|
1298
1325
|
|
|
1299
1326
|
You can use the `Instance` class to start up a single EC2 instance. For production setups, we recommend
|
|
@@ -1880,7 +1907,7 @@ You can configure [tag propagation on volume creation](https://docs.aws.amazon.c
|
|
|
1880
1907
|
|
|
1881
1908
|
#### Throughput on GP3 Volumes
|
|
1882
1909
|
|
|
1883
|
-
You can specify the `throughput` of a GP3 volume from 125 (default) to
|
|
1910
|
+
You can specify the `throughput` of a GP3 volume from 125 (default) to 2000.
|
|
1884
1911
|
|
|
1885
1912
|
```ts
|
|
1886
1913
|
new ec2.Volume(this, 'Volume', {
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { App, RemovalPolicy, Stack, StackProps, UnscopedValidationError } from 'aws-cdk-lib';
|
|
2
|
+
import * as acm from 'aws-cdk-lib/aws-certificatemanager';
|
|
3
|
+
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
|
4
|
+
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
5
|
+
import * as route53 from 'aws-cdk-lib/aws-route53';
|
|
6
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
7
|
+
import { Construct } from 'constructs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* In order to test this you need to have a valid public hosted zone that you can use
|
|
11
|
+
* to validate the domain identity.
|
|
12
|
+
*/
|
|
13
|
+
const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID;
|
|
14
|
+
if (!hostedZoneId) throw new UnscopedValidationError('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID". See framework-integ/README.md for details.');
|
|
15
|
+
const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME;
|
|
16
|
+
if (!hostedZoneName) throw new UnscopedValidationError('For this test you must provide your own HostedZoneName as an env var "HOSTED_ZONE_NAME". See framework-integ/README.md for details.');
|
|
17
|
+
|
|
18
|
+
interface TestStackProps extends StackProps {
|
|
19
|
+
hostedZoneId: string;
|
|
20
|
+
hostedZoneName: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
class TestStack extends Stack {
|
|
24
|
+
constructor(scope: Construct, id: string, props: TestStackProps) {
|
|
25
|
+
super(scope, id, props);
|
|
26
|
+
|
|
27
|
+
const hostedZone = route53.PublicHostedZone.fromHostedZoneAttributes(this, 'HostedZone', {
|
|
28
|
+
hostedZoneId: props.hostedZoneId,
|
|
29
|
+
zoneName: props.hostedZoneName,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const serverCertificate = new acm.Certificate(this, 'Certificate', {
|
|
33
|
+
domainName: `server.${props.hostedZoneName}`,
|
|
34
|
+
validation: acm.CertificateValidation.fromDns(hostedZone),
|
|
35
|
+
});
|
|
36
|
+
const clientCertificate = new acm.Certificate(this, 'ClientCertificate', {
|
|
37
|
+
domainName: `client.${props.hostedZoneName}`,
|
|
38
|
+
validation: acm.CertificateValidation.fromDns(hostedZone),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 2, natGateways: 0 });
|
|
42
|
+
|
|
43
|
+
const logGroup = new logs.LogGroup(this, 'LogGroup', {
|
|
44
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
vpc.addClientVpnEndpoint('Endpoint', {
|
|
48
|
+
cidr: '10.100.0.0/16',
|
|
49
|
+
serverCertificateArn: serverCertificate.certificateArn,
|
|
50
|
+
clientCertificateArn: clientCertificate.certificateArn,
|
|
51
|
+
logGroup,
|
|
52
|
+
disconnectOnSessionTimeout: false,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const app = new App();
|
|
58
|
+
new IntegTest(app, 'client-vpn-endpoint-integ', {
|
|
59
|
+
testCases: [
|
|
60
|
+
new TestStack(app, 'client-vpn-endpoint-stack', {
|
|
61
|
+
hostedZoneId,
|
|
62
|
+
hostedZoneName,
|
|
63
|
+
}),
|
|
64
|
+
],
|
|
65
|
+
});
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ec2/integ.vpc-endpoint.lit.ts
CHANGED
|
@@ -55,6 +55,12 @@ class VpcEndpointStack extends cdk.Stack {
|
|
|
55
55
|
ipAddressType: ec2.VpcEndpointIpAddressType.IPV4,
|
|
56
56
|
dnsRecordIpType: ec2.VpcEndpointDnsRecordIpType.IPV4,
|
|
57
57
|
});
|
|
58
|
+
|
|
59
|
+
// Add a cross-region interface endpoint
|
|
60
|
+
vpc.addInterfaceEndpoint('CrossRegionEndpoint', {
|
|
61
|
+
service: new ec2.InterfaceVpcEndpointService('com.amazonaws.vpce.us-east-1.vpce-svc-123456', 443),
|
|
62
|
+
serviceRegion: 'us-east-1', // Cross-region service
|
|
63
|
+
});
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
|
|
@@ -72,6 +72,10 @@ class TestStack extends Stack {
|
|
|
72
72
|
destination: FlowLogDestination.toS3(),
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
+
vpc.addFlowLog('FlowLogsCloudwatch', {
|
|
76
|
+
destination: FlowLogDestination.toCloudWatchLogs(),
|
|
77
|
+
});
|
|
78
|
+
|
|
75
79
|
const bucket = new s3.Bucket(this, 'Bucket', {
|
|
76
80
|
removalPolicy: RemovalPolicy.DESTROY,
|
|
77
81
|
autoDeleteObjects: true,
|
|
@@ -121,12 +121,51 @@ By using these methods, you can grant specific operational permissions on the EC
|
|
|
121
121
|
|
|
122
122
|
### Image tag immutability
|
|
123
123
|
|
|
124
|
-
You can set tag immutability on images in
|
|
124
|
+
You can set tag immutability on images in your repository using the `imageTagMutability` construct prop.
|
|
125
125
|
|
|
126
126
|
```ts
|
|
127
127
|
new ecr.Repository(this, 'Repo', { imageTagMutability: ecr.TagMutability.IMMUTABLE });
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
+
#### Image tag mutability with exclusion filters
|
|
131
|
+
|
|
132
|
+
ECR supports more granular control over image tag mutability by allowing you to specify exclusion filters. This enables you to make your repository immutable while allowing specific tag patterns to remain mutable (or vice versa).
|
|
133
|
+
|
|
134
|
+
There are two new mutability options that work with exclusion filters:
|
|
135
|
+
|
|
136
|
+
- `MUTABLE_WITH_EXCLUSION`: Tags are mutable by default, except those matching the exclusion filters
|
|
137
|
+
- `IMMUTABLE_WITH_EXCLUSION`: Tags are immutable by default, except those matching the exclusion filters
|
|
138
|
+
|
|
139
|
+
Use `ImageTagMutabilityExclusionFilter.wildcard()` to create filters with wildcard patterns:
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
// Make all tags immutable except for those starting with 'dev-' or 'test-'
|
|
143
|
+
new ecr.Repository(this, 'Repo', {
|
|
144
|
+
imageTagMutability: ecr.TagMutability.IMMUTABLE_WITH_EXCLUSION,
|
|
145
|
+
imageTagMutabilityExclusionFilters: [
|
|
146
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('dev-*'),
|
|
147
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('test-*'),
|
|
148
|
+
],
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
// Make all tags mutable except for production releases
|
|
154
|
+
new ecr.Repository(this, 'Repo', {
|
|
155
|
+
imageTagMutability: ecr.TagMutability.MUTABLE_WITH_EXCLUSION,
|
|
156
|
+
imageTagMutabilityExclusionFilters: [
|
|
157
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('prod-*'),
|
|
158
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('release-v*'),
|
|
159
|
+
],
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
##### Exclusion filter pattern rules
|
|
164
|
+
|
|
165
|
+
- Patterns can contain alphanumeric characters, dots (.), underscores (_), hyphens (-), and asterisks (*) as wildcards
|
|
166
|
+
- Maximum pattern length is 128 characters
|
|
167
|
+
- You can specify up to 5 exclusion filters per repository
|
|
168
|
+
|
|
130
169
|
### Encryption
|
|
131
170
|
|
|
132
171
|
By default, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts your data at rest using an AES-256 encryption algorithm. For more control over the encryption for your Amazon ECR repositories, you can use server-side encryption with KMS keys stored in AWS Key Management Service (AWS KMS). Read more about this feature in the [ECR Developer Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/encryption-at-rest.html).
|
|
@@ -209,7 +248,7 @@ repository.addToResourcePolicy(new iam.PolicyStatement({
|
|
|
209
248
|
}));
|
|
210
249
|
```
|
|
211
250
|
|
|
212
|
-
##
|
|
251
|
+
## Import existing repository
|
|
213
252
|
|
|
214
253
|
You can import an existing repository into your CDK app using the `Repository.fromRepositoryArn`, `Repository.fromRepositoryName` or `Repository.fromLookup` method.
|
|
215
254
|
These methods take the ARN or the name of the repository and returns an `IRepository` object.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as cdk from 'aws-cdk-lib';
|
|
2
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
3
|
+
import * as ecr from 'aws-cdk-lib/aws-ecr';
|
|
4
|
+
|
|
5
|
+
const app = new cdk.App();
|
|
6
|
+
const stack = new cdk.Stack(app, 'aws-ecr-tag-mutability-exclusion-stack');
|
|
7
|
+
|
|
8
|
+
new ecr.Repository(stack, 'ImmutableRepoWithExclusions', {
|
|
9
|
+
imageTagMutability: ecr.TagMutability.IMMUTABLE_WITH_EXCLUSION,
|
|
10
|
+
imageTagMutabilityExclusionFilters: [
|
|
11
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('dev-*'),
|
|
12
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('test-*'),
|
|
13
|
+
],
|
|
14
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
15
|
+
emptyOnDelete: true,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
new ecr.Repository(stack, 'MutableRepoWithExclusions', {
|
|
19
|
+
imageTagMutability: ecr.TagMutability.MUTABLE_WITH_EXCLUSION,
|
|
20
|
+
imageTagMutabilityExclusionFilters: [
|
|
21
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('prod-*'),
|
|
22
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('release-v*'),
|
|
23
|
+
],
|
|
24
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
25
|
+
emptyOnDelete: true,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
new IntegTest(app, 'cdk-ecr-tag-mutability-exclusion-test', {
|
|
29
|
+
testCases: [stack],
|
|
30
|
+
});
|
|
@@ -163,6 +163,10 @@ This will instruct the toolkit to add the tarball as a file asset. During deploy
|
|
|
163
163
|
from `local-image.tar`, push it to an Amazon ECR repository and wire the name of the repository as CloudFormation parameters
|
|
164
164
|
to your stack.
|
|
165
165
|
|
|
166
|
+
Similar to `DockerImageAsset`, you can set the `CDK_DOCKER` environment variable to provide a custom Docker executable
|
|
167
|
+
command or path. This may be needed when building in environments where the standard docker cannot be executed or when
|
|
168
|
+
using alternative container runtimes like Finch.
|
|
169
|
+
|
|
166
170
|
## Publishing images to ECR repositories
|
|
167
171
|
|
|
168
172
|
`DockerImageAsset` is designed for seamless build & consumption of image assets by CDK code deployed to multiple environments
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr-assets/integ.assets-docker.ts
CHANGED
|
@@ -46,6 +46,10 @@ const asset8 = new assets.DockerImageAsset(stack, 'DockerImage8', {
|
|
|
46
46
|
cacheDisabled: true,
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
+
const asset9 = new assets.DockerImageAsset(stack, 'DockerImage9', {
|
|
50
|
+
directory: path.join(__dirname, 'demo-image-dockerignore'),
|
|
51
|
+
});
|
|
52
|
+
|
|
49
53
|
const user = new iam.User(stack, 'MyUser');
|
|
50
54
|
asset.repository.grantPull(user);
|
|
51
55
|
asset2.repository.grantPull(user);
|
|
@@ -55,6 +59,7 @@ asset5.repository.grantPull(user);
|
|
|
55
59
|
asset6.repository.grantPull(user);
|
|
56
60
|
asset7.repository.grantPull(user);
|
|
57
61
|
asset8.repository.grantPull(user);
|
|
62
|
+
asset9.repository.grantPull(user);
|
|
58
63
|
|
|
59
64
|
new cdk.CfnOutput(stack, 'ImageUri', { value: asset.imageUri });
|
|
60
65
|
new cdk.CfnOutput(stack, 'ImageUri2', { value: asset2.imageUri });
|
|
@@ -64,5 +69,6 @@ new cdk.CfnOutput(stack, 'ImageUri5', { value: asset5.imageUri });
|
|
|
64
69
|
new cdk.CfnOutput(stack, 'ImageUri6', { value: asset6.imageUri });
|
|
65
70
|
new cdk.CfnOutput(stack, 'ImageUri7', { value: asset7.imageUri });
|
|
66
71
|
new cdk.CfnOutput(stack, 'ImageUri8', { value: asset8.imageUri });
|
|
72
|
+
new cdk.CfnOutput(stack, 'ImageUri9', { value: asset9.imageUri });
|
|
67
73
|
|
|
68
74
|
app.synth();
|
|
@@ -1591,6 +1591,8 @@ it in the constructor. Then add the Capacity Provider to the cluster. Finally,
|
|
|
1591
1591
|
you can refer to the Provider by its name in your service's or task's Capacity
|
|
1592
1592
|
Provider strategy.
|
|
1593
1593
|
|
|
1594
|
+
> **Note**: Cross-stack capacity provider registration is not supported. The ECS cluster and its capacity providers must be created in the same stack to avoid circular dependency issues.
|
|
1595
|
+
|
|
1594
1596
|
By default, Auto Scaling Group Capacity Providers will manage the scale-in and
|
|
1595
1597
|
scale-out behavior of the auto scaling group based on the load your tasks put on
|
|
1596
1598
|
the cluster, this is called [Managed Scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling). If you'd
|
|
@@ -1657,6 +1659,150 @@ new ecs.Ec2Service(this, 'EC2Service', {
|
|
|
1657
1659
|
});
|
|
1658
1660
|
```
|
|
1659
1661
|
|
|
1662
|
+
### Managed Instances Capacity Providers
|
|
1663
|
+
|
|
1664
|
+
Managed Instances Capacity Providers allow you to use AWS-managed EC2 instances for your ECS tasks while providing more control over instance selection than standard Fargate. AWS handles the instance lifecycle, patching, and maintenance while you can specify detailed instance requirements. You can define detailed instance requirements to control which types of instances are used for your workloads.
|
|
1665
|
+
|
|
1666
|
+
See [ECS documentation for Managed Instances Capacity Provider](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/managed-instances-capacity-providers-concept.html) for more documentation.
|
|
1667
|
+
|
|
1668
|
+
```ts
|
|
1669
|
+
declare const vpc: ec2.Vpc;
|
|
1670
|
+
declare const infrastructureRole: iam.Role;
|
|
1671
|
+
declare const instanceProfile: iam.InstanceProfile;
|
|
1672
|
+
|
|
1673
|
+
const cluster = new ecs.Cluster(this, 'Cluster', { vpc });
|
|
1674
|
+
|
|
1675
|
+
// Create a Managed Instances Capacity Provider
|
|
1676
|
+
const miCapacityProvider = new ecs.ManagedInstancesCapacityProvider(this, 'MICapacityProvider', {
|
|
1677
|
+
infrastructureRole,
|
|
1678
|
+
ec2InstanceProfile: instanceProfile,
|
|
1679
|
+
subnets: vpc.privateSubnets,
|
|
1680
|
+
securityGroups: [new ec2.SecurityGroup(this, 'MISecurityGroup', { vpc })],
|
|
1681
|
+
instanceRequirements: {
|
|
1682
|
+
vCpuCountMin: 1,
|
|
1683
|
+
memoryMin: Size.gibibytes(2),
|
|
1684
|
+
cpuManufacturers: [ec2.CpuManufacturer.INTEL],
|
|
1685
|
+
acceleratorManufacturers: [ec2.AcceleratorManufacturer.NVIDIA],
|
|
1686
|
+
},
|
|
1687
|
+
propagateTags: ecs.PropagateManagedInstancesTags.CAPACITY_PROVIDER,
|
|
1688
|
+
});
|
|
1689
|
+
|
|
1690
|
+
// Optionally configure security group rules using IConnectable interface
|
|
1691
|
+
miCapacityProvider.connections.allowFrom(ec2.Peer.ipv4(vpc.vpcCidrBlock), ec2.Port.tcp(80));
|
|
1692
|
+
|
|
1693
|
+
// Add the capacity provider to the cluster
|
|
1694
|
+
cluster.addManagedInstancesCapacityProvider(miCapacityProvider);
|
|
1695
|
+
|
|
1696
|
+
const taskDefinition = new ecs.TaskDefinition(this, 'TaskDef', {
|
|
1697
|
+
memoryMiB: '512',
|
|
1698
|
+
cpu: '256',
|
|
1699
|
+
networkMode: ecs.NetworkMode.AWS_VPC,
|
|
1700
|
+
compatibility: ecs.Compatibility.MANAGED_INSTANCES,
|
|
1701
|
+
});
|
|
1702
|
+
|
|
1703
|
+
taskDefinition.addContainer('web', {
|
|
1704
|
+
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
|
|
1705
|
+
memoryReservationMiB: 256,
|
|
1706
|
+
});
|
|
1707
|
+
|
|
1708
|
+
new ecs.FargateService(this, 'FargateService', {
|
|
1709
|
+
cluster,
|
|
1710
|
+
taskDefinition,
|
|
1711
|
+
minHealthyPercent: 100,
|
|
1712
|
+
capacityProviderStrategies: [
|
|
1713
|
+
{
|
|
1714
|
+
capacityProvider: miCapacityProvider.capacityProviderName,
|
|
1715
|
+
weight: 1,
|
|
1716
|
+
},
|
|
1717
|
+
],
|
|
1718
|
+
});
|
|
1719
|
+
```
|
|
1720
|
+
|
|
1721
|
+
You can specify detailed instance requirements to control which types of instances are used:
|
|
1722
|
+
|
|
1723
|
+
```ts
|
|
1724
|
+
declare const infrastructureRole: iam.Role;
|
|
1725
|
+
declare const instanceProfile: iam.InstanceProfile;
|
|
1726
|
+
declare const vpc: ec2.Vpc;
|
|
1727
|
+
|
|
1728
|
+
const miCapacityProvider = new ecs.ManagedInstancesCapacityProvider(this, 'MICapacityProvider', {
|
|
1729
|
+
infrastructureRole,
|
|
1730
|
+
ec2InstanceProfile: instanceProfile,
|
|
1731
|
+
subnets: vpc.privateSubnets,
|
|
1732
|
+
instanceRequirements: {
|
|
1733
|
+
// Required: CPU and memory constraints
|
|
1734
|
+
vCpuCountMin: 2,
|
|
1735
|
+
vCpuCountMax: 8,
|
|
1736
|
+
memoryMin: Size.gibibytes(4),
|
|
1737
|
+
memoryMax: Size.gibibytes(32),
|
|
1738
|
+
|
|
1739
|
+
// CPU preferences
|
|
1740
|
+
cpuManufacturers: [ec2.CpuManufacturer.INTEL, ec2.CpuManufacturer.AMD],
|
|
1741
|
+
instanceGenerations: [ec2.InstanceGeneration.CURRENT],
|
|
1742
|
+
|
|
1743
|
+
// Instance type filtering
|
|
1744
|
+
allowedInstanceTypes: ['m5.*', 'c5.*'],
|
|
1745
|
+
|
|
1746
|
+
// Performance characteristics
|
|
1747
|
+
burstablePerformance: ec2.BurstablePerformance.EXCLUDED,
|
|
1748
|
+
bareMetal: ec2.BareMetal.EXCLUDED,
|
|
1749
|
+
|
|
1750
|
+
// Accelerator requirements (for ML/AI workloads)
|
|
1751
|
+
acceleratorTypes: [ec2.AcceleratorType.GPU],
|
|
1752
|
+
acceleratorManufacturers: [ec2.AcceleratorManufacturer.NVIDIA],
|
|
1753
|
+
acceleratorNames: [ec2.AcceleratorName.T4, ec2.AcceleratorName.V100],
|
|
1754
|
+
acceleratorCountMin: 1,
|
|
1755
|
+
|
|
1756
|
+
// Storage requirements
|
|
1757
|
+
localStorage: ec2.LocalStorage.REQUIRED,
|
|
1758
|
+
localStorageTypes: [ec2.LocalStorageType.SSD],
|
|
1759
|
+
totalLocalStorageGBMin: 100,
|
|
1760
|
+
|
|
1761
|
+
// Network requirements
|
|
1762
|
+
networkInterfaceCountMin: 2,
|
|
1763
|
+
networkBandwidthGbpsMin: 10,
|
|
1764
|
+
|
|
1765
|
+
// Cost optimization
|
|
1766
|
+
onDemandMaxPricePercentageOverLowestPrice: 10,
|
|
1767
|
+
},
|
|
1768
|
+
});
|
|
1769
|
+
|
|
1770
|
+
```
|
|
1771
|
+
#### Note: Service Replacement When Migrating from LaunchType to CapacityProviderStrategy
|
|
1772
|
+
|
|
1773
|
+
**Understanding the Limitation**
|
|
1774
|
+
|
|
1775
|
+
The ECS [CreateService API](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html#ECS-CreateService-request-launchType) does not allow specifying both `launchType` and `capacityProviderStrategies` simultaneously. When you specify `capacityProviderStrategies`, the CDK uses those capacity providers instead of a launch type. This is a limitation of the ECS API and CloudFormation, not a CDK bug.
|
|
1776
|
+
|
|
1777
|
+
**Impact on Updates**
|
|
1778
|
+
|
|
1779
|
+
Because `launchType` is immutable during updates, switching from `launchType` to `capacityProviderStrategies` requires CloudFormation to replace the service. This means your existing service will be deleted and recreated with the new configuration. This behavior is expected and reflects the underlying API constraints.
|
|
1780
|
+
|
|
1781
|
+
**Workaround**
|
|
1782
|
+
|
|
1783
|
+
While we work on a long-term solution, you can use the following [escape hatch](https://docs.aws.amazon.com/cdk/v2/guide/cfn-layer.html) to preserve your service during the migration:
|
|
1784
|
+
|
|
1785
|
+
```ts
|
|
1786
|
+
declare const cluster: ecs.Cluster;
|
|
1787
|
+
declare const taskDefinition: ecs.TaskDefinition;
|
|
1788
|
+
declare const miCapacityProvider: ecs.ManagedInstancesCapacityProvider;
|
|
1789
|
+
|
|
1790
|
+
const service = new ecs.FargateService(this, 'Service', {
|
|
1791
|
+
cluster,
|
|
1792
|
+
taskDefinition,
|
|
1793
|
+
capacityProviderStrategies: [
|
|
1794
|
+
{
|
|
1795
|
+
capacityProvider: miCapacityProvider.capacityProviderName,
|
|
1796
|
+
weight: 1,
|
|
1797
|
+
},
|
|
1798
|
+
],
|
|
1799
|
+
});
|
|
1800
|
+
|
|
1801
|
+
// Escape hatch: Force launchType at the CloudFormation level to prevent service replacement
|
|
1802
|
+
const cfnService = service.node.defaultChild as ecs.CfnService;
|
|
1803
|
+
cfnService.launchType = 'FARGATE'; // or 'FARGATE_SPOT' depending on your capacity provider
|
|
1804
|
+
```
|
|
1805
|
+
|
|
1660
1806
|
### Cluster Default Provider Strategy
|
|
1661
1807
|
|
|
1662
1808
|
A capacity provider strategy determines whether ECS tasks are launched on EC2 instances or Fargate/Fargate Spot. It can be specified at the cluster, service, or task level, and consists of one or more capacity providers. You can specify an optional base and weight value for finer control of how tasks are launched. The `base` specifies a minimum number of tasks on one capacity provider, and the `weight`s of each capacity provider determine how tasks are distributed after `base` is satisfied.
|
|
@@ -1970,6 +2116,9 @@ const volumeFromSnapshot = new ecs.ServiceManagedVolume(this, 'EBSVolume', {
|
|
|
1970
2116
|
snapShotId: 'snap-066877671789bd71b',
|
|
1971
2117
|
volumeType: ec2.EbsDeviceVolumeType.GP3,
|
|
1972
2118
|
fileSystemType: ecs.FileSystemType.XFS,
|
|
2119
|
+
// Specifies the Amazon EBS Provisioned Rate for Volume Initialization.
|
|
2120
|
+
// Valid range is between 100 and 300 MiB/s.
|
|
2121
|
+
volumeInitializationRate: Size.mebibytes(200),
|
|
1973
2122
|
},
|
|
1974
2123
|
});
|
|
1975
2124
|
|
|
@@ -2070,7 +2219,46 @@ const service = new ecs.FargateService(this, 'FargateService', {
|
|
|
2070
2219
|
});
|
|
2071
2220
|
```
|
|
2072
2221
|
|
|
2073
|
-
##
|
|
2222
|
+
## ECS Native Blue/Green Deployment
|
|
2223
|
+
|
|
2224
|
+
Amazon ECS supports native blue/green deployments that allow you to deploy new versions of your services with zero downtime. This deployment strategy creates a new set of tasks (green) alongside the existing tasks (blue), then shifts traffic from the old version to the new version.
|
|
2225
|
+
|
|
2226
|
+
[Amazon ECS blue/green deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-blue-green.html)
|
|
2227
|
+
|
|
2228
|
+
```ts
|
|
2229
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
2230
|
+
|
|
2231
|
+
declare const cluster: ecs.Cluster;
|
|
2232
|
+
declare const taskDefinition: ecs.TaskDefinition;
|
|
2233
|
+
declare const lambdaHook: lambda.Function;
|
|
2234
|
+
declare const blueTargetGroup: elbv2.ApplicationTargetGroup;
|
|
2235
|
+
declare const greenTargetGroup: elbv2.ApplicationTargetGroup;
|
|
2236
|
+
declare const prodListenerRule: elbv2.ApplicationListenerRule;
|
|
2237
|
+
|
|
2238
|
+
const service = new ecs.FargateService(this, 'Service', {
|
|
2239
|
+
cluster,
|
|
2240
|
+
taskDefinition,
|
|
2241
|
+
deploymentStrategy: ecs.DeploymentStrategy.BLUE_GREEN,
|
|
2242
|
+
});
|
|
2243
|
+
|
|
2244
|
+
service.addLifecycleHook(new ecs.DeploymentLifecycleLambdaTarget(lambdaHook, 'PreScaleHook', {
|
|
2245
|
+
lifecycleStages: [ecs.DeploymentLifecycleStage.PRE_SCALE_UP],
|
|
2246
|
+
}));
|
|
2247
|
+
|
|
2248
|
+
const target = service.loadBalancerTarget({
|
|
2249
|
+
containerName: 'nginx',
|
|
2250
|
+
containerPort: 80,
|
|
2251
|
+
protocol: ecs.Protocol.TCP,
|
|
2252
|
+
alternateTarget: new ecs.AlternateTarget('AlternateTarget', {
|
|
2253
|
+
alternateTargetGroup: greenTargetGroup,
|
|
2254
|
+
productionListener: ecs.ListenerRuleConfiguration.applicationListenerRule(prodListenerRule),
|
|
2255
|
+
}),
|
|
2256
|
+
});
|
|
2257
|
+
|
|
2258
|
+
target.attachToApplicationTargetGroup(blueTargetGroup);
|
|
2259
|
+
```
|
|
2260
|
+
|
|
2261
|
+
## Daemon Scheduling Strategy
|
|
2074
2262
|
You can specify whether service use Daemon scheduling strategy by specifying `daemon` option in Service constructs. See [differences between Daemon and Replica scheduling strategy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html)
|
|
2075
2263
|
|
|
2076
2264
|
```ts
|
|
@@ -3,20 +3,30 @@ import * as cdk from 'aws-cdk-lib';
|
|
|
3
3
|
import * as ecs from 'aws-cdk-lib/aws-ecs';
|
|
4
4
|
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
5
5
|
|
|
6
|
-
const app = new cdk.App(
|
|
6
|
+
const app = new cdk.App({
|
|
7
|
+
postCliContext: {
|
|
8
|
+
'@aws-cdk/aws-lambda:useCdkManagedLogGroup': false,
|
|
9
|
+
'@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy': false,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
7
12
|
const stack = new cdk.Stack(app, 'aws-ecs-integ-availability-zone-rebalancing');
|
|
8
13
|
|
|
9
14
|
const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2, restrictDefaultSecurityGroup: false });
|
|
10
15
|
|
|
11
|
-
const cluster = new ecs.Cluster(stack, '
|
|
16
|
+
const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc });
|
|
17
|
+
|
|
18
|
+
cluster.addCapacity('DefaultAutoScalingGroup', {
|
|
19
|
+
instanceType: new ec2.InstanceType('t2.micro'),
|
|
20
|
+
});
|
|
12
21
|
|
|
13
|
-
const taskDefinition = new ecs.
|
|
22
|
+
const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef');
|
|
14
23
|
|
|
15
24
|
taskDefinition.addContainer('web', {
|
|
16
25
|
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
|
|
26
|
+
memoryLimitMiB: 256,
|
|
17
27
|
});
|
|
18
28
|
|
|
19
|
-
new ecs.
|
|
29
|
+
new ecs.Ec2Service(stack, 'FrontendService', {
|
|
20
30
|
cluster,
|
|
21
31
|
taskDefinition,
|
|
22
32
|
availabilityZoneRebalancing: ecs.AvailabilityZoneRebalancing.ENABLED,
|