konokenj.cdk-api-mcp-server 0.48.0__py3-none-any.whl → 0.57.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cdk_api_mcp_server/__about__.py +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-amplify-alpha/README.md +12 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-agentcore-alpha/README.md +1979 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-alpha/README.md +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/README.md +156 -69
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-imagebuilder-alpha/README.md +656 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-lambda-go-alpha/README.md +102 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-msk-alpha/README.md +38 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-sagemaker-alpha/README.md +32 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/mixins-preview/README.md +182 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/README.md/README.md +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/README.md +34 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.api-with-authorizer-and-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.lambda-api.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.lambda-permission-consolidation.ts +55 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.spec-restapi.ts +1 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/README.md +93 -81
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.stage.ts +20 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.iam.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.lambda.ts +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.user-pool.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/README.md +35 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.add-subroute-integration.ts +7 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.http-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda-connect-disconnect-trigger.ts +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda-permission-consolidation.ts +45 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda.ts +4 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appsync/integ.graphql-lambda-permission.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appsync/integ.js-resolver.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-batch/README.md +15 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-batch/integ.managed-compute-environment-default-instance-class.ts +20 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudformation/integ.core-custom-resources-node-18.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudformation/integ.core-custom-resources-service-timeout.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/README.md +33 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/integ.function-url-origin-ip-address-type.ts +84 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/integ.origin-response-completion-timeout.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudtrail/integ.cloudtrail-data-events-only.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudwatch/README.md +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudwatch/integ.anomaly-detection-alarm.ts +44 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/README.md +0 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codepipeline-actions/integ.pipeline-elastic-beanstalk-deploy.ts +4 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cognito/README.md +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/README.md +125 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/TABLE_V1_API.md +45 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.add-to-resource-policy.ts +97 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.compound.ts +32 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.policy.ts +21 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.table-v2.compound.ts +43 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ec2/README.md +16 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ec2/integ.client-vpn-endpoint-disconnect-on-session-timeout.ts +65 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ec2/integ.vpc-flow-logs.ts +4 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr/README.md +41 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr/integ.tag-mutability-exclusion.ts +30 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/README.md +47 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.managedinstances-capacity-provider.ts +5 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.managedinstances-no-default-capacity-provider.ts +107 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.placement-strategies.ts +32 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs-patterns/integ.alb-fargate-service-public-private-switch.ts +45 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/README.md +103 -83
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.eks-al2023-nodegroup.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.eks-cluster-removal-policy.ts +31 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.fargate-cluster.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/README.md +34 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb-lambda-multi-value-headers.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb.oidc.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.nlb.security-group.ts +70 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2-actions/integ.cognito.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events-targets/README.md +22 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events-targets/integ.firehose-delivery-stream.ts +51 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-iam/integ.managed-policy.ts +9 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-iam/integ.policy.ts +9 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesis/README.md +42 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesis/integ.stream-shard-level-monitoring.ts +47 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/README.md +156 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/integ.cloudwatch-logs-processors.ts +45 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/integ.record-format-conversion-schema.ts +154 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/integ.record-format-conversion.ts +178 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/README.md +39 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.binary-payload.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.logging-config.ts +8 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.multi-tenancy.ts +24 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.params-and-secrets.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime-management.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime.fromasset.ts +19 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime.inlinecode.ts +11 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.dependencies-pnpm.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.function-exclude-smithy-models.ts +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.nodejs.build.images.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/README.md +4 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.metricfilter-apply-on-transformed-logs.ts +29 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.subscriptionfilter.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-opensearchservice/integ.opensearch.ebs.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-opensearchservice/integ.opensearch.min.ts +1 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/README.md +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster-cloudwatch-logs-exports.ts +56 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster-data-api-to-imported-cluster.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster-data-api.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53/README.md +44 -31
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53/integ.private-hosted-zone-from-attributes.ts +41 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-route53/integ.zone-delegation-iam-stack.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/README.md +65 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-big-response.ts +17 -6
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cloudfront.ts +20 -18
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-nested-stack-source.ts +7 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-stack-source.ts +6 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-stack-ssm-source.ts +7 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-data.ts +99 -59
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-deployed-bucket.ts +10 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-large-file.ts +23 -12
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-loggroup.ts +7 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-efs.ts +77 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-empty.ts +69 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-multiple.ts +89 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-single.ts +77 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-signcontent.ts +11 -7
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution-with-destination-key.ts +15 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution-with-role.ts +29 -14
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution.ts +16 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-basic.ts +65 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-config.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-custom-subnets.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-efs.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-security-groups.ts +72 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-subnet-selection.ts +70 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment.ts +47 -69
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-secretsmanager/integ.secret.dynamic-reference-key.ts +38 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions/integ.sm-jsonpath-with-distributed-map-jsonata.ts +105 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/README.md +15 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.call-aws-service-cross-region-lambda.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-arm64.ts +27 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-default.ts +25 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-mixed-arch.ts +35 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-x86.ts +27 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.invoke-json-path.ts +102 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/README.md +17 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/integ.canary-runtime-validation.ts +43 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/integ.canary.ts +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/README.md +56 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.aws-custom-resource.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.custom-resource-config-lambda-node-runtime.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.external-id.ts +80 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.invoke-function-payload.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +71 -10
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/README.md +32 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/interfaces/README.md +33 -0
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/METADATA +2 -2
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/RECORD +151 -106
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events-targets/integ.kinesis-firehose-stream.ts +0 -33
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/WHEEL +0 -0
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/entry_points.txt +0 -0
- {konokenj_cdk_api_mcp_server-0.48.0.dist-info → konokenj_cdk_api_mcp_server-0.57.0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
- [VPC Link](#vpc-link)
|
|
15
15
|
- [Private Integration](#private-integration)
|
|
16
16
|
- [Generating ARN for Execute API](#generating-arn-for-execute-api)
|
|
17
|
-
- [Access Logging](#access-logging)
|
|
18
17
|
- [WebSocket API](#websocket-api)
|
|
19
18
|
- [Manage Connections Permission](#manage-connections-permission)
|
|
20
19
|
- [Managing access to WebSocket APIs](#managing-access-to-websocket-apis)
|
|
21
20
|
- [Usage Plan and API Keys](#usage-plan-and-api-keys)
|
|
21
|
+
- [Common Config](#common-config)
|
|
22
|
+
- [Route Settings](#route-settings)
|
|
23
|
+
- [Access Logging](#access-logging)
|
|
22
24
|
|
|
23
25
|
## Introduction
|
|
24
26
|
|
|
@@ -375,65 +377,6 @@ const arn = api.arnForExecuteApi('GET', '/myApiPath', 'dev');
|
|
|
375
377
|
- The 'ANY' method can be used for matching any HTTP methods not explicitly defined.
|
|
376
378
|
- The function gracefully handles undefined parameters by using wildcards, making it flexible for various API configurations.
|
|
377
379
|
|
|
378
|
-
## Access Logging
|
|
379
|
-
|
|
380
|
-
You can turn on logging to write logs to CloudWatch Logs.
|
|
381
|
-
Read more at [Configure logging for HTTP APIs in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-logging.html)
|
|
382
|
-
|
|
383
|
-
```ts
|
|
384
|
-
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
385
|
-
|
|
386
|
-
declare const api: apigwv2.HttpApi;
|
|
387
|
-
declare const logGroup: logs.LogGroup;
|
|
388
|
-
|
|
389
|
-
const stage = new apigwv2.HttpStage(this, 'Stage', {
|
|
390
|
-
httpApi: api,
|
|
391
|
-
accessLogSettings: {
|
|
392
|
-
destination: new apigwv2.LogGroupLogDestination(logGroup),
|
|
393
|
-
},
|
|
394
|
-
});
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
The following code will generate the access log in the [CLF format](https://en.wikipedia.org/wiki/Common_Log_Format).
|
|
398
|
-
|
|
399
|
-
```ts
|
|
400
|
-
import * as apigw from 'aws-cdk-lib/aws-apigateway';
|
|
401
|
-
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
402
|
-
|
|
403
|
-
declare const api: apigwv2.HttpApi;
|
|
404
|
-
declare const logGroup: logs.LogGroup;
|
|
405
|
-
|
|
406
|
-
const stage = new apigwv2.HttpStage(this, 'Stage', {
|
|
407
|
-
httpApi: api,
|
|
408
|
-
accessLogSettings: {
|
|
409
|
-
destination: new apigwv2.LogGroupLogDestination(logGroup),
|
|
410
|
-
format: apigw.AccessLogFormat.clf(),
|
|
411
|
-
},
|
|
412
|
-
});
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
You can also configure your own access log format by using the `AccessLogFormat.custom()` API.
|
|
416
|
-
`AccessLogField` provides commonly used fields. The following code configures access log to contain.
|
|
417
|
-
|
|
418
|
-
```ts
|
|
419
|
-
import * as apigw from 'aws-cdk-lib/aws-apigateway';
|
|
420
|
-
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
421
|
-
|
|
422
|
-
declare const api: apigwv2.HttpApi;
|
|
423
|
-
declare const logGroup: logs.LogGroup;
|
|
424
|
-
|
|
425
|
-
const stage = new apigwv2.HttpStage(this, 'Stage', {
|
|
426
|
-
httpApi: api,
|
|
427
|
-
accessLogSettings: {
|
|
428
|
-
destination: new apigwv2.LogGroupLogDestination(logGroup),
|
|
429
|
-
format: apigw.AccessLogFormat.custom(
|
|
430
|
-
`${apigw.AccessLogField.contextRequestId()} ${apigw.AccessLogField.contextErrorMessage()} ${apigw.AccessLogField.contextErrorMessageString()}
|
|
431
|
-
${apigw.AccessLogField.contextAuthorizerError()} ${apigw.AccessLogField.contextAuthorizerIntegrationStatus()}`
|
|
432
|
-
),
|
|
433
|
-
},
|
|
434
|
-
});
|
|
435
|
-
```
|
|
436
|
-
|
|
437
380
|
## WebSocket API
|
|
438
381
|
|
|
439
382
|
A WebSocket API in API Gateway is a collection of WebSocket routes that are integrated with backend HTTP endpoints,
|
|
@@ -578,26 +521,6 @@ const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi',{
|
|
|
578
521
|
});
|
|
579
522
|
```
|
|
580
523
|
|
|
581
|
-
## Common Config
|
|
582
|
-
|
|
583
|
-
Common config for both HTTP API and WebSocket API
|
|
584
|
-
|
|
585
|
-
### Route Settings
|
|
586
|
-
|
|
587
|
-
Represents a collection of route settings.
|
|
588
|
-
|
|
589
|
-
```ts
|
|
590
|
-
declare const api: apigwv2.HttpApi;
|
|
591
|
-
|
|
592
|
-
new apigwv2.HttpStage(this, 'Stage', {
|
|
593
|
-
httpApi: api,
|
|
594
|
-
throttle: {
|
|
595
|
-
rateLimit: 1000,
|
|
596
|
-
burstLimit: 1000,
|
|
597
|
-
},
|
|
598
|
-
detailedMetricsEnabled: true,
|
|
599
|
-
});
|
|
600
|
-
```
|
|
601
524
|
## Usage Plan and API Keys
|
|
602
525
|
|
|
603
526
|
A usage plan specifies who can access one or more deployed WebSocket API stages, and the rate at which they can be accessed. The plan uses API keys to
|
|
@@ -740,4 +663,93 @@ const key = new apigwv2.RateLimitedApiKey(this, 'rate-limited-api-key', {
|
|
|
740
663
|
burstLimit: 200
|
|
741
664
|
}
|
|
742
665
|
});
|
|
743
|
-
```
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
## Common Config
|
|
669
|
+
|
|
670
|
+
Common config for both HTTP API and WebSocket API
|
|
671
|
+
|
|
672
|
+
### Route Settings
|
|
673
|
+
|
|
674
|
+
Represents a collection of route settings.
|
|
675
|
+
|
|
676
|
+
```ts
|
|
677
|
+
declare const api: apigwv2.HttpApi;
|
|
678
|
+
|
|
679
|
+
new apigwv2.HttpStage(this, 'Stage', {
|
|
680
|
+
httpApi: api,
|
|
681
|
+
throttle: {
|
|
682
|
+
rateLimit: 1000,
|
|
683
|
+
burstLimit: 1000,
|
|
684
|
+
},
|
|
685
|
+
detailedMetricsEnabled: true,
|
|
686
|
+
});
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
### Access Logging
|
|
690
|
+
|
|
691
|
+
You can turn on logging to write logs to CloudWatch Logs.
|
|
692
|
+
Read more at Configure logging for [HTTP APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-logging.html) or [WebSocket APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-logging.html)
|
|
693
|
+
|
|
694
|
+
```ts
|
|
695
|
+
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
696
|
+
|
|
697
|
+
declare const httpApi: apigwv2.HttpApi;
|
|
698
|
+
declare const webSocketApi : apigwv2.WebSocketApi;
|
|
699
|
+
declare const logGroup: logs.LogGroup;
|
|
700
|
+
|
|
701
|
+
new apigwv2.HttpStage(this, 'HttpStage', {
|
|
702
|
+
httpApi,
|
|
703
|
+
accessLogSettings: {
|
|
704
|
+
destination: new apigwv2.LogGroupLogDestination(logGroup),
|
|
705
|
+
},
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
new apigwv2.WebSocketStage(this, 'WebSocketStage', {
|
|
709
|
+
webSocketApi,
|
|
710
|
+
stageName: 'dev',
|
|
711
|
+
accessLogSettings: {
|
|
712
|
+
destination: new apigwv2.LogGroupLogDestination(logGroup),
|
|
713
|
+
},
|
|
714
|
+
});
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
The following code will generate the access log in the [CLF format](https://en.wikipedia.org/wiki/Common_Log_Format).
|
|
718
|
+
|
|
719
|
+
```ts
|
|
720
|
+
import * as apigw from 'aws-cdk-lib/aws-apigateway';
|
|
721
|
+
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
722
|
+
|
|
723
|
+
declare const api: apigwv2.HttpApi;
|
|
724
|
+
declare const logGroup: logs.LogGroup;
|
|
725
|
+
|
|
726
|
+
const stage = new apigwv2.HttpStage(this, 'Stage', {
|
|
727
|
+
httpApi: api,
|
|
728
|
+
accessLogSettings: {
|
|
729
|
+
destination: new apigwv2.LogGroupLogDestination(logGroup),
|
|
730
|
+
format: apigw.AccessLogFormat.clf(),
|
|
731
|
+
},
|
|
732
|
+
});
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
You can also configure your own access log format by using the `AccessLogFormat.custom()` API.
|
|
736
|
+
`AccessLogField` provides commonly used fields. The following code configures access log to contain.
|
|
737
|
+
|
|
738
|
+
```ts
|
|
739
|
+
import * as apigw from 'aws-cdk-lib/aws-apigateway';
|
|
740
|
+
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
741
|
+
|
|
742
|
+
declare const api: apigwv2.HttpApi;
|
|
743
|
+
declare const logGroup: logs.LogGroup;
|
|
744
|
+
|
|
745
|
+
const stage = new apigwv2.HttpStage(this, 'Stage', {
|
|
746
|
+
httpApi: api,
|
|
747
|
+
accessLogSettings: {
|
|
748
|
+
destination: new apigwv2.LogGroupLogDestination(logGroup),
|
|
749
|
+
format: apigw.AccessLogFormat.custom(
|
|
750
|
+
`${apigw.AccessLogField.contextRequestId()} ${apigw.AccessLogField.contextErrorMessage()} ${apigw.AccessLogField.contextErrorMessageString()}
|
|
751
|
+
${apigw.AccessLogField.contextAuthorizerError()} ${apigw.AccessLogField.contextAuthorizerIntegrationStatus()}`
|
|
752
|
+
),
|
|
753
|
+
},
|
|
754
|
+
});
|
|
755
|
+
```
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
2
3
|
import * as cdk from 'aws-cdk-lib';
|
|
3
|
-
import * as
|
|
4
|
+
import * as apigwv2 from 'aws-cdk-lib/aws-apigatewayv2';
|
|
5
|
+
import * as apigw from 'aws-cdk-lib/aws-apigateway';
|
|
6
|
+
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
4
7
|
|
|
5
8
|
const app = new cdk.App();
|
|
6
9
|
const stack = new cdk.Stack(app, 'aws-cdk-aws-apigatewayv2-websocket-stage');
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
|
|
11
|
+
const logGroup = new logs.LogGroup(stack, 'MyLogGroup', {
|
|
12
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const webSocketApi = new apigwv2.WebSocketApi(stack, 'WebSocketApi');
|
|
16
|
+
new apigwv2.WebSocketStage(stack, 'WebSocketStage', {
|
|
10
17
|
webSocketApi,
|
|
11
18
|
stageName: 'dev',
|
|
12
19
|
throttle: {
|
|
@@ -15,6 +22,15 @@ new apigw.WebSocketStage(stack, 'WebSocketStage', {
|
|
|
15
22
|
},
|
|
16
23
|
detailedMetricsEnabled: true,
|
|
17
24
|
description: 'My Stage',
|
|
25
|
+
accessLogSettings: {
|
|
26
|
+
destination: new apigwv2.LogGroupLogDestination(logGroup),
|
|
27
|
+
format: apigw.AccessLogFormat.custom(JSON.stringify({
|
|
28
|
+
extendedRequestId: apigw.AccessLogField.contextExtendedRequestId(),
|
|
29
|
+
requestTime: apigw.AccessLogField.contextRequestTime(),
|
|
30
|
+
})),
|
|
31
|
+
},
|
|
18
32
|
});
|
|
19
33
|
|
|
20
|
-
app
|
|
34
|
+
new IntegTest(app, 'aws-cdk-aws-apigatewayv2-websocket-stage-test', {
|
|
35
|
+
testCases: [stack],
|
|
36
|
+
});
|
|
@@ -19,7 +19,7 @@ const userAccessKey = new iam.AccessKey(stack, 'UserAccess', {
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
const handler = new Function(stack, 'auth-function', {
|
|
22
|
-
runtime: Runtime.
|
|
22
|
+
runtime: Runtime.NODEJS_20_X,
|
|
23
23
|
code: Code.fromInline('exports.handler = () => {return true}'),
|
|
24
24
|
handler: 'index.handler',
|
|
25
25
|
});
|
|
@@ -20,7 +20,7 @@ const app = new App({
|
|
|
20
20
|
const stack = new Stack(app, 'AuthorizerInteg');
|
|
21
21
|
|
|
22
22
|
const authHandler = new lambda.Function(stack, 'auth-function', {
|
|
23
|
-
runtime: lambda.Runtime.
|
|
23
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
24
24
|
handler: 'index.handler',
|
|
25
25
|
code: lambda.Code.fromAsset(path.join(__dirname, '..', 'auth-handler'), { exclude: ['*.ts'] }),
|
|
26
26
|
});
|
|
@@ -43,7 +43,7 @@ const httpApiWithDefaultAuthorizer = new HttpApi(stack, 'MyHttpApiWithDefaultAut
|
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
const handler = new lambda.Function(stack, 'lambda', {
|
|
46
|
-
runtime: lambda.Runtime.
|
|
46
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
47
47
|
handler: 'index.handler',
|
|
48
48
|
code: lambda.AssetCode.fromAsset(path.join(__dirname, '..', 'integ.lambda.handler'), { exclude: ['*.ts'] }),
|
|
49
49
|
});
|
|
@@ -33,7 +33,7 @@ const httpApiWithDefaultAuthorizer = new HttpApi(stack, 'MyHttpApiWithDefaultAut
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
const handler = new lambda.Function(stack, 'lambda', {
|
|
36
|
-
runtime: lambda.Runtime.
|
|
36
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
37
37
|
handler: 'index.handler',
|
|
38
38
|
code: lambda.AssetCode.fromAsset(path.join(__dirname, '..', 'integ.user-pool.handler'), { exclude: ['*.ts'] }),
|
|
39
39
|
});
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/README.md
CHANGED
|
@@ -47,6 +47,41 @@ httpApi.addRoutes({
|
|
|
47
47
|
});
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
#### Lambda Integration Permissions
|
|
51
|
+
|
|
52
|
+
By default, creating a `HttpLambdaIntegration` will add a permission for API Gateway to invoke your AWS Lambda function, scoped to the specific route which uses the integration.
|
|
53
|
+
|
|
54
|
+
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 route which invokes the AWS Lambda function. To avoid this, you can opt to scope permissions to any route on the API by setting `scopePermissionToRoute` to `false`, and this will ensure only a single policy statement is added to the AWS Lambda permission policy.
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
|
58
|
+
|
|
59
|
+
declare const booksDefaultFn: lambda.Function;
|
|
60
|
+
|
|
61
|
+
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
|
|
62
|
+
|
|
63
|
+
const getBooksIntegration = new HttpLambdaIntegration('GetBooksIntegration', booksDefaultFn, {
|
|
64
|
+
scopePermissionToRoute: false,
|
|
65
|
+
});
|
|
66
|
+
const createBookIntegration = new HttpLambdaIntegration('CreateBookIntegration', booksDefaultFn, {
|
|
67
|
+
scopePermissionToRoute: false,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
httpApi.addRoutes({
|
|
71
|
+
path: '/books',
|
|
72
|
+
methods: [ apigwv2.HttpMethod.GET ],
|
|
73
|
+
integration: getBooksIntegration,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
httpApi.addRoutes({
|
|
77
|
+
path: '/books',
|
|
78
|
+
methods: [ apigwv2.HttpMethod.POST ],
|
|
79
|
+
integration: createBookIntegration,
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
In the above example, a single permission is added, shared by both `getBookIntegration` and `createBookIntegration`.
|
|
84
|
+
|
|
50
85
|
### HTTP Proxy
|
|
51
86
|
|
|
52
87
|
HTTP Proxy integrations enables connecting an HTTP API route to a publicly routable HTTP endpoint. When a client
|
|
@@ -15,7 +15,7 @@ const httpApi = new HttpApi(stack, 'test-apigwv2-add-subroute-integration');
|
|
|
15
15
|
|
|
16
16
|
// Regular Lambda Function
|
|
17
17
|
const lambdaHandler = new lambda.Function(stack, 'first-lambda-function', {
|
|
18
|
-
runtime: lambda.Runtime.
|
|
18
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
19
19
|
handler: 'index.handler',
|
|
20
20
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: \'success-hit-first-lambda\' }; };'),
|
|
21
21
|
});
|
|
@@ -23,7 +23,7 @@ const lambdaHandlerIntegration = new HttpLambdaIntegration('my-lambda-integratio
|
|
|
23
23
|
|
|
24
24
|
// Lambda created with Function.fromFunctionAttributes()
|
|
25
25
|
const secondLambdaHandler = new lambda.Function(stack, 'second-lambda-function', {
|
|
26
|
-
runtime: lambda.Runtime.
|
|
26
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
27
27
|
handler: 'index.handler',
|
|
28
28
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: \'success-hit-second-lambda\' }; };'),
|
|
29
29
|
});
|
|
@@ -35,8 +35,8 @@ const lambdaFromFunctionAttributesIntegration = new HttpLambdaIntegration('my-re
|
|
|
35
35
|
|
|
36
36
|
// Lambda created with Function.fromFunctionName()
|
|
37
37
|
const thirdLambdaName = 'third-lambda-function';
|
|
38
|
-
new lambda.Function(stack, thirdLambdaName, {
|
|
39
|
-
runtime: lambda.Runtime.
|
|
38
|
+
const thirdLambdaFunction = new lambda.Function(stack, thirdLambdaName, {
|
|
39
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
40
40
|
handler: 'index.handler',
|
|
41
41
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: \'success-hit-third-lambda\' }; };'),
|
|
42
42
|
functionName: thirdLambdaName,
|
|
@@ -83,6 +83,9 @@ httpApi.addRoutes({
|
|
|
83
83
|
integration: lambdaFromFunctionNameIntegration,
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
+
httpApi.node.addDependency(secondLambdaHandler);
|
|
87
|
+
httpApi.node.addDependency(thirdLambdaFunction);
|
|
88
|
+
|
|
86
89
|
// Integ Test Assertions
|
|
87
90
|
const integ = new IntegTest(app, 'Integ', { testCases: [stack] });
|
|
88
91
|
|
|
@@ -29,7 +29,7 @@ new CfnOutput(stack, 'Endpoint', {
|
|
|
29
29
|
|
|
30
30
|
function lambdaProxyEndpoint(s: Stack): HttpApi {
|
|
31
31
|
const handler = new lambda.Function(s, 'AlwaysSuccess', {
|
|
32
|
-
runtime: lambda.Runtime.
|
|
32
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
33
33
|
handler: 'index.handler',
|
|
34
34
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: "success" }; };'),
|
|
35
35
|
});
|
|
@@ -17,7 +17,7 @@ const webSocketTableName = 'WebSocketConnections';
|
|
|
17
17
|
|
|
18
18
|
const connectFunction = new lambda.Function(stack, 'Connect Function', {
|
|
19
19
|
functionName: 'process_connect_requests',
|
|
20
|
-
runtime: lambda.Runtime.
|
|
20
|
+
runtime: lambda.Runtime.NODEJS_22_X,
|
|
21
21
|
handler: 'index.handler',
|
|
22
22
|
code: lambda.Code.fromAsset(path.join(__dirname, 'lambdas', 'connect')),
|
|
23
23
|
timeout: cdk.Duration.seconds(5),
|
|
@@ -31,7 +31,7 @@ const disconnectFunction = new lambda.Function(
|
|
|
31
31
|
'Disconnect Function',
|
|
32
32
|
{
|
|
33
33
|
functionName: 'process_disconnect_requests',
|
|
34
|
-
runtime: lambda.Runtime.
|
|
34
|
+
runtime: lambda.Runtime.NODEJS_22_X,
|
|
35
35
|
handler: 'index.handler',
|
|
36
36
|
code: lambda.Code.fromAsset(
|
|
37
37
|
path.join(__dirname, 'lambdas', 'disconnect'),
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey } from 'aws-cdk-lib/aws-apigatewayv2';
|
|
2
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
3
|
+
import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
4
|
+
import { App, Stack } from 'aws-cdk-lib';
|
|
5
|
+
import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
|
6
|
+
|
|
7
|
+
const app = new App({
|
|
8
|
+
postCliContext: {
|
|
9
|
+
'@aws-cdk/aws-lambda:useCdkManagedLogGroup': false,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
const stack = new Stack(app, 'integ-lambda-permission-consolidation');
|
|
13
|
+
|
|
14
|
+
const httpApi = new HttpApi(stack, 'HttpApi');
|
|
15
|
+
|
|
16
|
+
const lambdaHandler = new lambda.Function(stack, 'Handler', {
|
|
17
|
+
runtime: lambda.Runtime.NODEJS_18_X,
|
|
18
|
+
handler: 'index.handler',
|
|
19
|
+
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: JSON.stringify({ message: \'Hello from \' + event.requestContext.http.path }) }; };'),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Add several routes
|
|
23
|
+
for (let i = 1; i <= 10; i++) {
|
|
24
|
+
new HttpRoute(stack, `Route${i}`, {
|
|
25
|
+
httpApi: httpApi,
|
|
26
|
+
integration: new HttpLambdaIntegration(`Integration${i}`, lambdaHandler, {
|
|
27
|
+
scopePermissionToRoute: false,
|
|
28
|
+
}),
|
|
29
|
+
routeKey: HttpRouteKey.with(`/path${i}`, HttpMethod.GET),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Integ Test Assertions
|
|
34
|
+
const integ = new IntegTest(app, 'Integ', { testCases: [stack] });
|
|
35
|
+
|
|
36
|
+
// Test that routes work after consolidation
|
|
37
|
+
integ.assertions.httpApiCall(httpApi.apiEndpoint + '/path1').expect(ExpectedResult.objectLike({
|
|
38
|
+
body: { message: 'Hello from /path1' },
|
|
39
|
+
status: 200,
|
|
40
|
+
}));
|
|
41
|
+
|
|
42
|
+
integ.assertions.httpApiCall(httpApi.apiEndpoint + '/path12').expect(ExpectedResult.objectLike({
|
|
43
|
+
body: { message: 'Hello from /path10' },
|
|
44
|
+
status: 200,
|
|
45
|
+
}));
|
|
@@ -17,7 +17,7 @@ const app = new App({
|
|
|
17
17
|
const stack = new Stack(app, 'integ-lambda-proxy');
|
|
18
18
|
|
|
19
19
|
const handler = new lambda.Function(stack, 'AlwaysSuccess', {
|
|
20
|
-
runtime: lambda.Runtime.
|
|
20
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
21
21
|
handler: 'index.handler',
|
|
22
22
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: "success" }; };'),
|
|
23
23
|
});
|
|
@@ -19,25 +19,25 @@ const app = new App({
|
|
|
19
19
|
const stack = new Stack(app, 'WebSocketApiInteg');
|
|
20
20
|
|
|
21
21
|
const connectHandler = new lambda.Function(stack, 'ConnectHandler', {
|
|
22
|
-
runtime: lambda.Runtime.
|
|
22
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
23
23
|
handler: 'index.handler',
|
|
24
24
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: "connected" }; };'),
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
const disconnetHandler = new lambda.Function(stack, 'DisconnectHandler', {
|
|
28
|
-
runtime: lambda.Runtime.
|
|
28
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
29
29
|
handler: 'index.handler',
|
|
30
30
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: "disconnected" }; };'),
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const defaultHandler = new lambda.Function(stack, 'DefaultHandler', {
|
|
34
|
-
runtime: lambda.Runtime.
|
|
34
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
35
35
|
handler: 'index.handler',
|
|
36
36
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: "default" }; };'),
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
const messageHandler = new lambda.Function(stack, 'MessageHandler', {
|
|
40
|
-
runtime: lambda.Runtime.
|
|
40
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
41
41
|
handler: 'index.handler',
|
|
42
42
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: "received" }; };'),
|
|
43
43
|
});
|
|
@@ -16,7 +16,7 @@ const app = new cdk.App({
|
|
|
16
16
|
const stack = new cdk.Stack(app, 'aws-graphql-lambda-permissions');
|
|
17
17
|
|
|
18
18
|
const authorizer = new lambda.Function(stack, 'AuthorizerFunction', {
|
|
19
|
-
runtime: lambda.Runtime.
|
|
19
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
20
20
|
code: lambda.Code.fromInline(`
|
|
21
21
|
exports.handler = async (event) => {
|
|
22
22
|
console.log("Authorization event:", JSON.stringify(event));
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appsync/integ.js-resolver.ts
CHANGED
|
@@ -64,7 +64,7 @@ const integ = new IntegTest(app, 'JsResolverIntegTest', { testCases: [stack] });
|
|
|
64
64
|
const invoke = new lambda.Function(stack, 'InvokeApi', {
|
|
65
65
|
code: lambda.Code.fromAsset(path.join(__dirname, 'integ-assets', 'js-resolver-assertion')),
|
|
66
66
|
handler: 'index.handler',
|
|
67
|
-
runtime: lambda.Runtime.
|
|
67
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
const addTestInvoke = integ.assertions.invokeFunction({
|
|
@@ -65,7 +65,18 @@ For stateful or otherwise non-interruption-tolerant workflows, omit `spot` or se
|
|
|
65
65
|
|
|
66
66
|
#### Choosing Your Instance Types
|
|
67
67
|
|
|
68
|
-
Batch allows you to choose
|
|
68
|
+
Batch allows you to choose most up-to-date instance classes based on your region.
|
|
69
|
+
This example configures your `ComputeEnvironment` to use only ARM64 instance:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
const vpc = new ec2.Vpc(this, 'VPC');
|
|
73
|
+
|
|
74
|
+
new batch.ManagedEc2EcsComputeEnvironment(this, 'myEc2ComputeEnv', {
|
|
75
|
+
vpc,
|
|
76
|
+
defaultInstanceClasses: [batch.DefaultInstanceClass.ARM64],
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
69
80
|
This example configures your `ComputeEnvironment` to use only the `M5AD.large` instance:
|
|
70
81
|
|
|
71
82
|
```ts
|
|
@@ -91,6 +102,9 @@ new batch.ManagedEc2EcsComputeEnvironment(this, 'myEc2ComputeEnv', {
|
|
|
91
102
|
});
|
|
92
103
|
```
|
|
93
104
|
|
|
105
|
+
> [!WARNING]
|
|
106
|
+
> `useOptimalInstanceClasses` is deprecated! Use `defaultInstanceClasses` instead.
|
|
107
|
+
|
|
94
108
|
Unless you explicitly specify `useOptimalInstanceClasses: false`, this compute environment will use `'optimal'` instances,
|
|
95
109
|
which tells Batch to pick an instance from the C4, M4, and R4 instance families.
|
|
96
110
|
*Note*: Batch does not allow specifying instance types or classes with different architectures.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
|
2
|
+
import { App, Stack } from 'aws-cdk-lib';
|
|
3
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
4
|
+
import { ManagedEc2EcsComputeEnvironment, EcsMachineImageType, DefaultInstanceClass } from 'aws-cdk-lib/aws-batch';
|
|
5
|
+
|
|
6
|
+
const app = new App();
|
|
7
|
+
const stack = new Stack(app, 'managed-compute-environment-default-instance-class');
|
|
8
|
+
const vpc = new ec2.Vpc(stack, 'vpc', { restrictDefaultSecurityGroup: false });
|
|
9
|
+
|
|
10
|
+
new ManagedEc2EcsComputeEnvironment(stack, 'ECS', {
|
|
11
|
+
vpc,
|
|
12
|
+
images: [{
|
|
13
|
+
imageType: EcsMachineImageType.ECS_AL2023,
|
|
14
|
+
}],
|
|
15
|
+
defaultInstanceClasses: [DefaultInstanceClass.ARM64],
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
new integ.IntegTest(app, 'integ-managed-compute-environment-default-instance-class', {
|
|
19
|
+
testCases: [stack],
|
|
20
|
+
});
|
|
@@ -21,7 +21,7 @@ class TestStack extends Stack {
|
|
|
21
21
|
|
|
22
22
|
const serviceToken = CustomResourceProvider.getOrCreate(this, resourceType, {
|
|
23
23
|
codeDirectory: `${__dirname}/core-custom-resource-provider-fixture`,
|
|
24
|
-
runtime: CustomResourceProviderRuntime.
|
|
24
|
+
runtime: CustomResourceProviderRuntime.NODEJS_20_X,
|
|
25
25
|
description: 'veni vidi vici',
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -16,7 +16,7 @@ class TestStack extends Stack {
|
|
|
16
16
|
|
|
17
17
|
const serviceToken = CustomResourceProvider.getOrCreate(this, resourceType, {
|
|
18
18
|
codeDirectory: `${__dirname}/core-custom-resource-provider-fixture`,
|
|
19
|
-
runtime: CustomResourceProviderRuntime.
|
|
19
|
+
runtime: CustomResourceProviderRuntime.NODEJS_20_X,
|
|
20
20
|
description: 'veni vidi vici',
|
|
21
21
|
});
|
|
22
22
|
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/README.md
CHANGED
|
@@ -851,6 +851,39 @@ new cloudfront.Distribution(this, 'Distribution', {
|
|
|
851
851
|
});
|
|
852
852
|
```
|
|
853
853
|
|
|
854
|
+
### Configuring IP Address Type
|
|
855
|
+
|
|
856
|
+
You can specify which IP protocol CloudFront uses when connecting to your Lambda Function URL origin. By default, CloudFront uses IPv4 only.
|
|
857
|
+
|
|
858
|
+
```ts
|
|
859
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
860
|
+
import { OriginIpAddressType } from 'aws-cdk-lib/aws-cloudfront';
|
|
861
|
+
|
|
862
|
+
declare const fn: lambda.Function;
|
|
863
|
+
const fnUrl = fn.addFunctionUrl({ authType: lambda.FunctionUrlAuthType.NONE });
|
|
864
|
+
|
|
865
|
+
// Uses default IPv4 only
|
|
866
|
+
new cloudfront.Distribution(this, 'Distribution', {
|
|
867
|
+
defaultBehavior: {
|
|
868
|
+
origin: new origins.FunctionUrlOrigin(fnUrl)
|
|
869
|
+
},
|
|
870
|
+
});
|
|
871
|
+
|
|
872
|
+
// Explicitly specify IP address type
|
|
873
|
+
new cloudfront.Distribution(this, 'Distribution', {
|
|
874
|
+
defaultBehavior: {
|
|
875
|
+
origin: new origins.FunctionUrlOrigin(fnUrl, {
|
|
876
|
+
ipAddressType: OriginIpAddressType.DUALSTACK, // Use both IPv4 and IPv6
|
|
877
|
+
})
|
|
878
|
+
},
|
|
879
|
+
});
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
Supported values for `ipAddressType`:
|
|
883
|
+
- `OriginIpAddressType.IPV4` - CloudFront uses IPv4 only to connect to the origin (default)
|
|
884
|
+
- `OriginIpAddressType.IPV6` - CloudFront uses IPv6 only to connect to the origin
|
|
885
|
+
- `OriginIpAddressType.DUALSTACK` - CloudFront uses both IPv4 and IPv6 to connect to the origin
|
|
886
|
+
|
|
854
887
|
### Lambda Function URL with Origin Access Control (OAC)
|
|
855
888
|
You can configure the Lambda Function URL with Origin Access Control (OAC) for enhanced security. When using OAC with Signing SIGV4_ALWAYS, it is recommended to set the Lambda Function URL authType to AWS_IAM to ensure proper authorization.
|
|
856
889
|
|