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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
|
-
import * as ec2 from 'aws-cdk-lib/aws-ec2';
|
|
3
2
|
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
4
3
|
import * as cdk from 'aws-cdk-lib';
|
|
5
4
|
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
@@ -7,115 +6,93 @@ import { Match } from '@aws-cdk/integ-tests-alpha';
|
|
|
7
6
|
import { Construct } from 'constructs';
|
|
8
7
|
import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment';
|
|
9
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Integration test for core bucket deployment features:
|
|
11
|
+
* - Basic deployment functionality
|
|
12
|
+
* - Prune behavior (deleting files not in source)
|
|
13
|
+
* - Exclude filters
|
|
14
|
+
* - Extract behavior (extracting vs keeping zip files)
|
|
15
|
+
* - addSource() method for dynamically adding sources
|
|
16
|
+
* - objectKeys output property and outputObjectKeys flag
|
|
17
|
+
*/
|
|
10
18
|
class TestBucketDeployment extends cdk.Stack {
|
|
11
|
-
public readonly
|
|
19
|
+
public readonly bucketWithAddSource: s3.IBucket;
|
|
12
20
|
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
|
|
13
21
|
super(scope, id, props);
|
|
14
22
|
|
|
15
|
-
const
|
|
16
|
-
websiteIndexDocument: 'index.html',
|
|
17
|
-
publicReadAccess: false,
|
|
23
|
+
const commonBucketProps = {
|
|
18
24
|
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
19
25
|
autoDeleteObjects: true, // needed for integration test cleanup
|
|
20
|
-
}
|
|
26
|
+
};
|
|
21
27
|
|
|
22
|
-
new
|
|
23
|
-
|
|
24
|
-
destinationBucket,
|
|
25
|
-
retainOnDelete: false, // default is true, which will block the integration test cleanup
|
|
28
|
+
const destinationBucket = new s3.Bucket(this, 'Destination', {
|
|
29
|
+
...commonBucketProps,
|
|
26
30
|
});
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
// Test basic deployment functionality
|
|
33
|
+
new s3deploy.BucketDeployment(this, 'DeployWithBasic', {
|
|
29
34
|
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website'))],
|
|
30
35
|
destinationBucket,
|
|
31
|
-
|
|
32
|
-
useEfs: true,
|
|
33
|
-
vpc: new ec2.Vpc(this, 'InlineVpc', { restrictDefaultSecurityGroup: false }),
|
|
34
|
-
retainOnDelete: false, // default is true, which will block the integration test cleanup
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const bucket2 = new s3.Bucket(this, 'Destination2', {
|
|
38
|
-
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
39
|
-
autoDeleteObjects: true, // needed for integration test cleanup
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
new s3deploy.BucketDeployment(this, 'DeployWithPrefix', {
|
|
43
|
-
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website'))],
|
|
44
|
-
destinationBucket: bucket2,
|
|
45
|
-
destinationKeyPrefix: 'deploy/here/',
|
|
46
|
-
retainOnDelete: false, // default is true, which will block the integration test cleanup
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const bucket3 = new s3.Bucket(this, 'Destination3', {
|
|
50
|
-
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
51
|
-
autoDeleteObjects: true, // needed for integration test cleanup
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
new s3deploy.BucketDeployment(this, 'DeployWithMetadata', {
|
|
55
|
-
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website'))],
|
|
56
|
-
destinationBucket: bucket3,
|
|
57
|
-
retainOnDelete: false, // default is true, which will block the integration test cleanup
|
|
58
|
-
cacheControl: [s3deploy.CacheControl.setPublic(), s3deploy.CacheControl.maxAge(cdk.Duration.minutes(1))],
|
|
59
|
-
contentType: 'text/html',
|
|
60
|
-
metadata: { A: 'aaa', B: 'bbb', C: 'ccc' },
|
|
36
|
+
retainOnDelete: false,
|
|
61
37
|
});
|
|
62
38
|
|
|
63
|
-
|
|
39
|
+
// Test that files not in source are preserved when prune is disabled
|
|
40
|
+
new s3deploy.BucketDeployment(this, 'DeployWithPruneDisabled', {
|
|
64
41
|
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website'))],
|
|
65
42
|
destinationBucket,
|
|
66
43
|
prune: false,
|
|
67
44
|
retainOnDelete: false,
|
|
68
45
|
});
|
|
69
46
|
|
|
70
|
-
|
|
47
|
+
// Test exclude filters to skip certain files from deployment
|
|
48
|
+
new s3deploy.BucketDeployment(this, 'DeployWithExclude', {
|
|
71
49
|
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website'))],
|
|
72
50
|
destinationBucket,
|
|
73
51
|
exclude: ['*.gif'],
|
|
74
52
|
retainOnDelete: false,
|
|
75
53
|
});
|
|
76
54
|
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
80
|
-
autoDeleteObjects: true, // needed for integration test cleanup
|
|
55
|
+
const bucketWithoutExtract = new s3.Bucket(this, 'BucketWithoutExtract', {
|
|
56
|
+
...commonBucketProps,
|
|
81
57
|
});
|
|
82
58
|
|
|
83
|
-
|
|
59
|
+
// Test that zip files are uploaded as-is when extract is disabled
|
|
60
|
+
new s3deploy.BucketDeployment(this, 'DeployWithoutExtract', {
|
|
84
61
|
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website'))],
|
|
85
|
-
destinationBucket:
|
|
62
|
+
destinationBucket: bucketWithoutExtract,
|
|
86
63
|
extract: false,
|
|
87
64
|
retainOnDelete: false,
|
|
88
65
|
});
|
|
89
66
|
|
|
90
|
-
this.
|
|
91
|
-
|
|
92
|
-
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
93
|
-
autoDeleteObjects: true, // needed for integration test cleanup
|
|
67
|
+
this.bucketWithAddSource = new s3.Bucket(this, 'BucketWithAddSource', {
|
|
68
|
+
...commonBucketProps,
|
|
94
69
|
});
|
|
95
70
|
|
|
96
|
-
|
|
71
|
+
// Test addSource() method for dynamically adding sources after construction
|
|
72
|
+
// and validate objectKeys output property returns both asset files and added sources
|
|
73
|
+
const deployWithAddSource = new s3deploy.BucketDeployment(this, 'DeployWithAddSource', {
|
|
97
74
|
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website-second'))],
|
|
98
|
-
destinationBucket: this.
|
|
99
|
-
retainOnDelete: false,
|
|
75
|
+
destinationBucket: this.bucketWithAddSource,
|
|
76
|
+
retainOnDelete: false,
|
|
100
77
|
});
|
|
101
|
-
|
|
78
|
+
deployWithAddSource.addSource(s3deploy.Source.data('some-key', 'helloworld'));
|
|
102
79
|
|
|
80
|
+
// Output objectKeys to validate they are returned in CloudFormation outputs
|
|
103
81
|
new cdk.CfnOutput(this, 'customResourceData', {
|
|
104
82
|
value: cdk.Fn.sub('Object Keys are ${keys}', {
|
|
105
|
-
keys: cdk.Fn.join(',',
|
|
83
|
+
keys: cdk.Fn.join(',', deployWithAddSource.objectKeys),
|
|
106
84
|
}),
|
|
107
85
|
});
|
|
108
86
|
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
112
|
-
autoDeleteObjects: true, // needed for integration test cleanup
|
|
87
|
+
const bucketWithoutObjectKeys = new s3.Bucket(this, 'BucketWithoutObjectKeys', {
|
|
88
|
+
...commonBucketProps,
|
|
113
89
|
});
|
|
114
90
|
|
|
115
|
-
|
|
91
|
+
// Test that objectKeys are not returned when outputObjectKeys is disabled
|
|
92
|
+
new s3deploy.BucketDeployment(this, 'DeployWithoutObjectKeys', {
|
|
116
93
|
sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website-second'))],
|
|
117
|
-
destinationBucket:
|
|
118
|
-
retainOnDelete: false,
|
|
94
|
+
destinationBucket: bucketWithoutObjectKeys,
|
|
95
|
+
retainOnDelete: false,
|
|
119
96
|
outputObjectKeys: false,
|
|
120
97
|
});
|
|
121
98
|
}
|
|
@@ -128,13 +105,14 @@ const app = new cdk.App({
|
|
|
128
105
|
});
|
|
129
106
|
const testCase = new TestBucketDeployment(app, 'test-bucket-deployments');
|
|
130
107
|
|
|
131
|
-
// Assert that DeployMeWithoutExtractingFilesOnDestination deploys a zip file to bucket4
|
|
132
108
|
const integTest = new integ.IntegTest(app, 'integ-test-bucket-deployments', {
|
|
133
109
|
testCases: [testCase],
|
|
134
110
|
diffAssets: true,
|
|
135
111
|
});
|
|
112
|
+
|
|
113
|
+
// Assert that addSource() successfully adds the data source alongside the asset source
|
|
136
114
|
const listObjectsCall = integTest.assertions.awsApiCall('S3', 'listObjects', {
|
|
137
|
-
Bucket: testCase.
|
|
115
|
+
Bucket: testCase.bucketWithAddSource.bucketName,
|
|
138
116
|
});
|
|
139
117
|
listObjectsCall.provider.addToRolePolicy({
|
|
140
118
|
Effect: 'Allow',
|
|
@@ -154,12 +132,12 @@ listObjectsCall.expect(integ.ExpectedResult.objectLike({
|
|
|
154
132
|
),
|
|
155
133
|
}));
|
|
156
134
|
|
|
157
|
-
// Assert that
|
|
135
|
+
// Assert that objectKeys output contains the deployed object keys when outputObjectKeys is enabled (default)
|
|
158
136
|
const describe = integTest.assertions.awsApiCall('CloudFormation', 'describeStacks', {
|
|
159
137
|
StackName: 'test-bucket-deployments',
|
|
160
138
|
});
|
|
161
139
|
|
|
162
140
|
describe.assertAtPath('Stacks.0.Outputs.0.OutputKey', integ.ExpectedResult.stringLikeRegexp('customResourceData'));
|
|
163
|
-
describe.assertAtPath('Stacks.0.Outputs.0.OutputValue', integ.ExpectedResult.stringLikeRegexp('Object Keys are ([0-9a-f])
|
|
141
|
+
describe.assertAtPath('Stacks.0.Outputs.0.OutputValue', integ.ExpectedResult.stringLikeRegexp('Object Keys are ([0-9a-f])+\\.zip(,([0-9a-f])+\\.zip)*'));
|
|
164
142
|
|
|
165
143
|
app.synth();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as cdk from 'aws-cdk-lib';
|
|
2
|
+
import { SecretValue } from 'aws-cdk-lib';
|
|
3
|
+
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
|
|
4
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
5
|
+
|
|
6
|
+
class TestStack extends cdk.Stack {
|
|
7
|
+
constructor(scope: cdk.App, id: string) {
|
|
8
|
+
super(scope, id);
|
|
9
|
+
|
|
10
|
+
// Create a default secret
|
|
11
|
+
const secret = new secretsmanager.Secret(this, 'Secret');
|
|
12
|
+
|
|
13
|
+
// Create a JSON secret containing cfnDynamicReferenceKey values extracted from the default secret
|
|
14
|
+
new secretsmanager.Secret(this, 'JSONSecret', {
|
|
15
|
+
secretObjectValue: {
|
|
16
|
+
cfnDynamicReferenceKeyWithDefaults: SecretValue.unsafePlainText(secret.cfnDynamicReferenceKey()),
|
|
17
|
+
cfnDynamicReferenceKeyWithJsonFieldAndVersionStage: SecretValue.unsafePlainText(secret.cfnDynamicReferenceKey({
|
|
18
|
+
jsonField: 'json-key',
|
|
19
|
+
versionStage: 'version-stage',
|
|
20
|
+
})),
|
|
21
|
+
cfnDynamicReferenceKeyWithJsonFieldAndVersionId: SecretValue.unsafePlainText(secret.cfnDynamicReferenceKey({
|
|
22
|
+
jsonField: 'json-key',
|
|
23
|
+
versionId: 'version-id',
|
|
24
|
+
})),
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const app = new cdk.App();
|
|
31
|
+
|
|
32
|
+
const stack = new TestStack(app, 'cdk-integ-secrets-dynamic-reference-key');
|
|
33
|
+
|
|
34
|
+
new integ.IntegTest(app, 'cdk-integ-secrets-dynamic-reference-key-test', {
|
|
35
|
+
testCases: [stack],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
app.synth();
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as cdk from 'aws-cdk-lib/core';
|
|
2
|
+
import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
3
|
+
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
|
|
4
|
+
import * as s3 from 'aws-cdk-lib/aws-s3';
|
|
5
|
+
import { STEPFUNCTIONS_USE_DISTRIBUTED_MAP_RESULT_WRITER_V2 } from 'aws-cdk-lib/cx-api';
|
|
6
|
+
|
|
7
|
+
const CSV_KEY = 'my-key.csv';
|
|
8
|
+
const RESULT_BUCKET_PREFIX = 'my-prefix';
|
|
9
|
+
|
|
10
|
+
class DistributedMapStack extends cdk.Stack {
|
|
11
|
+
readonly stateMachine: sfn.StateMachine;
|
|
12
|
+
readonly bucket: s3.Bucket;
|
|
13
|
+
|
|
14
|
+
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
|
|
15
|
+
super(scope, id, props);
|
|
16
|
+
|
|
17
|
+
this.bucket = new s3.Bucket(this, 'Bucket', {
|
|
18
|
+
autoDeleteObjects: true,
|
|
19
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const distributedMap = sfn.DistributedMap.jsonata(this, 'DistributedMap', {
|
|
23
|
+
itemReader: new sfn.S3CsvItemReader({
|
|
24
|
+
bucket: this.bucket,
|
|
25
|
+
key: CSV_KEY,
|
|
26
|
+
csvHeaders: sfn.CsvHeaders.useFirstRow(),
|
|
27
|
+
}),
|
|
28
|
+
resultWriterV2: new sfn.ResultWriterV2({
|
|
29
|
+
bucket: this.bucket,
|
|
30
|
+
prefix: RESULT_BUCKET_PREFIX,
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
distributedMap.itemProcessor(sfn.Pass.jsonata(this, 'Pass'), {
|
|
35
|
+
mode: sfn.ProcessorMode.DISTRIBUTED,
|
|
36
|
+
executionType: sfn.ProcessorType.STANDARD,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
this.stateMachine = new sfn.StateMachine(this, 'StateMachine', {
|
|
40
|
+
definition: distributedMap,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const app = new cdk.App({
|
|
46
|
+
context: {
|
|
47
|
+
[STEPFUNCTIONS_USE_DISTRIBUTED_MAP_RESULT_WRITER_V2]: true,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
const stack = new DistributedMapStack(app, 'sm-jsonpath-with-distributed-map-jsonata');
|
|
51
|
+
|
|
52
|
+
const testCase = new IntegTest(app, 'integ-sm-jsonpath-with-distributed-map-jsonata', {
|
|
53
|
+
testCases: [stack],
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
testCase.assertions
|
|
57
|
+
.awsApiCall('StepFunctions', 'describeStateMachine', {
|
|
58
|
+
stateMachineArn: stack.stateMachine.stateMachineArn,
|
|
59
|
+
})
|
|
60
|
+
.expect(ExpectedResult.objectLike({ status: 'ACTIVE' }))
|
|
61
|
+
.waitForAssertions({
|
|
62
|
+
interval: cdk.Duration.seconds(10),
|
|
63
|
+
totalTimeout: cdk.Duration.minutes(5),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// Put an object in the bucket
|
|
67
|
+
const putObject = testCase.assertions.awsApiCall('S3', 'putObject', {
|
|
68
|
+
Bucket: stack.bucket.bucketName,
|
|
69
|
+
Key: CSV_KEY,
|
|
70
|
+
Body: 'a,b,c\n1,2,3\n4,5,6',
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// Start an execution
|
|
74
|
+
const start = testCase.assertions.awsApiCall('StepFunctions', 'startExecution', {
|
|
75
|
+
stateMachineArn: stack.stateMachine.stateMachineArn,
|
|
76
|
+
});
|
|
77
|
+
putObject.next(start);
|
|
78
|
+
|
|
79
|
+
// describe the results of the execution
|
|
80
|
+
const describe = testCase.assertions.awsApiCall('StepFunctions', 'describeExecution', {
|
|
81
|
+
executionArn: start.getAttString('executionArn'),
|
|
82
|
+
});
|
|
83
|
+
start.next(describe);
|
|
84
|
+
|
|
85
|
+
// assert the results
|
|
86
|
+
const describeExecution = describe.expect(ExpectedResult.objectLike({
|
|
87
|
+
status: 'SUCCEEDED',
|
|
88
|
+
})).waitForAssertions({
|
|
89
|
+
interval: cdk.Duration.seconds(10),
|
|
90
|
+
totalTimeout: cdk.Duration.minutes(5),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
const s3ApiCall = testCase.assertions.awsApiCall('S3', 'listObjectsV2', {
|
|
94
|
+
Bucket: stack.bucket.bucketName,
|
|
95
|
+
MaxKeys: 2,
|
|
96
|
+
Prefix: RESULT_BUCKET_PREFIX,
|
|
97
|
+
}).expect(ExpectedResult.objectLike({
|
|
98
|
+
KeyCount: 2,
|
|
99
|
+
}));
|
|
100
|
+
s3ApiCall.provider.addToRolePolicy({
|
|
101
|
+
Effect: 'Allow',
|
|
102
|
+
Action: ['s3:GetObject', 's3:ListBucket'],
|
|
103
|
+
Resource: ['*'],
|
|
104
|
+
});
|
|
105
|
+
describeExecution.next(s3ApiCall);
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/README.md
CHANGED
|
@@ -141,6 +141,17 @@ The `EvaluateExpression` supports a `runtime` prop to specify the Lambda
|
|
|
141
141
|
runtime to use to evaluate the expression. Currently, only runtimes
|
|
142
142
|
of the Node.js family are supported.
|
|
143
143
|
|
|
144
|
+
The `EvaluateExpression` also supports an `architecture` prop to specify the Lambda
|
|
145
|
+
architecture. This can be useful when migrating to ARM64 or when running integration
|
|
146
|
+
tests on ARM64 systems.
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
const convertToSecondsArm64 = new tasks.EvaluateExpression(this, 'Convert to seconds', {
|
|
150
|
+
expression: '$.waitMilliseconds / 1000',
|
|
151
|
+
architecture: lambda.Architecture.ARM_64,
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
144
155
|
## API Gateway
|
|
145
156
|
|
|
146
157
|
Step Functions supports [API Gateway](https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html) through the service integration pattern.
|
|
@@ -1374,12 +1385,12 @@ The following code snippet includes a Task state that uses eks:call to list the
|
|
|
1374
1385
|
|
|
1375
1386
|
```ts
|
|
1376
1387
|
import * as eks from 'aws-cdk-lib/aws-eks';
|
|
1377
|
-
import {
|
|
1388
|
+
import { KubectlV34Layer } from '@aws-cdk/lambda-layer-kubectl-v34';
|
|
1378
1389
|
|
|
1379
1390
|
const myEksCluster = new eks.Cluster(this, 'my sample cluster', {
|
|
1380
|
-
version: eks.KubernetesVersion.
|
|
1391
|
+
version: eks.KubernetesVersion.V1_34,
|
|
1381
1392
|
clusterName: 'myEksCluster',
|
|
1382
|
-
kubectlLayer: new
|
|
1393
|
+
kubectlLayer: new KubectlV34Layer(this, 'kubectl'),
|
|
1383
1394
|
});
|
|
1384
1395
|
|
|
1385
1396
|
new tasks.EksCall(this, 'Call a EKS Endpoint', {
|
|
@@ -1582,7 +1593,7 @@ const connection = new events.Connection(this, 'Connection', {
|
|
|
1582
1593
|
|
|
1583
1594
|
new tasks.HttpInvoke(this, 'Invoke HTTP API', {
|
|
1584
1595
|
apiRoot: 'https://api.example.com',
|
|
1585
|
-
apiEndpoint: sfn.TaskInput.fromText('
|
|
1596
|
+
apiEndpoint: sfn.TaskInput.fromText(sfn.JsonPath.format('resource/{}/details', sfn.JsonPath.stringAt('$.resourceId'))),
|
|
1586
1597
|
body: sfn.TaskInput.fromObject({ foo: 'bar' }),
|
|
1587
1598
|
connection,
|
|
1588
1599
|
headers: sfn.TaskInput.fromObject({ 'Content-Type': 'application/json' }),
|
|
@@ -10,7 +10,7 @@ class TestStack extends cdk.Stack {
|
|
|
10
10
|
super(scope, id, props);
|
|
11
11
|
// Create a target Lambda function that returns JSON response
|
|
12
12
|
const targetLambda = new lambda.Function(this, 'TargetLambda', {
|
|
13
|
-
runtime: lambda.Runtime.
|
|
13
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
14
14
|
handler: 'index.handler',
|
|
15
15
|
code: lambda.Code.fromInline(`
|
|
16
16
|
exports.handler = async (event) => {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { App, Stack } from 'aws-cdk-lib';
|
|
2
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
3
|
+
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
|
|
4
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
5
|
+
import * as cdk from 'aws-cdk-lib';
|
|
6
|
+
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';
|
|
7
|
+
|
|
8
|
+
const app = new App();
|
|
9
|
+
const stack = new Stack(app, 'aws-cdk-sfn-evaluate-expression-arm64-integ');
|
|
10
|
+
|
|
11
|
+
const evaluateExpression = new tasks.EvaluateExpression(stack, 'EvaluateExpression', {
|
|
12
|
+
expression: '$.a + $.b',
|
|
13
|
+
architecture: lambda.Architecture.ARM_64,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const sm = new sfn.StateMachine(stack, 'StateMachine', {
|
|
17
|
+
definitionBody: sfn.DefinitionBody.fromChainable(evaluateExpression),
|
|
18
|
+
timeout: cdk.Duration.seconds(30),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
new cdk.CfnOutput(stack, 'stateMachineArn', {
|
|
22
|
+
value: sm.stateMachineArn,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
new integ.IntegTest(app, 'EvaluateExpressionArm64Test', {
|
|
26
|
+
testCases: [stack],
|
|
27
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { App, Stack } from 'aws-cdk-lib';
|
|
2
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
3
|
+
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
|
|
4
|
+
import * as cdk from 'aws-cdk-lib';
|
|
5
|
+
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';
|
|
6
|
+
|
|
7
|
+
const app = new App();
|
|
8
|
+
const stack = new Stack(app, 'aws-cdk-sfn-evaluate-expression-default-integ');
|
|
9
|
+
|
|
10
|
+
const evaluateExpression = new tasks.EvaluateExpression(stack, 'EvaluateExpression', {
|
|
11
|
+
expression: '$.a + $.b',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const sm = new sfn.StateMachine(stack, 'StateMachine', {
|
|
15
|
+
definitionBody: sfn.DefinitionBody.fromChainable(evaluateExpression),
|
|
16
|
+
timeout: cdk.Duration.seconds(30),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
new cdk.CfnOutput(stack, 'stateMachineArn', {
|
|
20
|
+
value: sm.stateMachineArn,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
new integ.IntegTest(app, 'EvaluateExpressionDefaultTest', {
|
|
24
|
+
testCases: [stack],
|
|
25
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
2
|
+
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
|
|
3
|
+
import * as cdk from 'aws-cdk-lib';
|
|
4
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
5
|
+
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';
|
|
6
|
+
|
|
7
|
+
const app = new cdk.App();
|
|
8
|
+
const stack = new cdk.Stack(app, 'aws-cdk-sfn-evaluate-expression-mixed-arch-integ');
|
|
9
|
+
|
|
10
|
+
const evalTaskArm = new tasks.EvaluateExpression(stack, 'EvalExpressionArm', {
|
|
11
|
+
expression: '$.a + $.b',
|
|
12
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
13
|
+
architecture: lambda.Architecture.ARM_64,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const evalTaskX86 = new tasks.EvaluateExpression(stack, 'EvalExpressionX86', {
|
|
17
|
+
expression: '$.a * $.b',
|
|
18
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
19
|
+
architecture: lambda.Architecture.X86_64,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const definition = new sfn.Pass(stack, 'Start', {
|
|
23
|
+
result: sfn.Result.fromObject({ a: 3, b: 4 }),
|
|
24
|
+
}).next(new sfn.Parallel(stack, 'ParallelEval')
|
|
25
|
+
.branch(evalTaskArm)
|
|
26
|
+
.branch(evalTaskX86),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
new sfn.StateMachine(stack, 'StateMachine', {
|
|
30
|
+
definitionBody: sfn.DefinitionBody.fromChainable(definition),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
new integ.IntegTest(app, 'EvaluateExpressionMixedArchTest', {
|
|
34
|
+
testCases: [stack],
|
|
35
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { App, Stack } from 'aws-cdk-lib';
|
|
2
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
3
|
+
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
|
|
4
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
5
|
+
import * as cdk from 'aws-cdk-lib';
|
|
6
|
+
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';
|
|
7
|
+
|
|
8
|
+
const app = new App();
|
|
9
|
+
const stack = new Stack(app, 'aws-cdk-sfn-evaluate-expression-x86-integ');
|
|
10
|
+
|
|
11
|
+
const evaluateExpression = new tasks.EvaluateExpression(stack, 'EvaluateExpression', {
|
|
12
|
+
expression: '$.a + $.b',
|
|
13
|
+
architecture: lambda.Architecture.X86_64,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const sm = new sfn.StateMachine(stack, 'StateMachine', {
|
|
17
|
+
definitionBody: sfn.DefinitionBody.fromChainable(evaluateExpression),
|
|
18
|
+
timeout: cdk.Duration.seconds(30),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
new cdk.CfnOutput(stack, 'stateMachineArn', {
|
|
22
|
+
value: sm.stateMachineArn,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
new integ.IntegTest(app, 'EvaluateExpressionX86Test', {
|
|
26
|
+
testCases: [stack],
|
|
27
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/// !cdk-integ aws-stepfunctions-tasks-http-invoke-json-path-integ
|
|
2
|
+
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import { IntegTest, ExpectedResult } from '@aws-cdk/integ-tests-alpha';
|
|
5
|
+
import * as cdk from 'aws-cdk-lib';
|
|
6
|
+
import * as apigateway from 'aws-cdk-lib/aws-apigateway';
|
|
7
|
+
import * as events from 'aws-cdk-lib/aws-events';
|
|
8
|
+
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
|
|
9
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda-nodejs';
|
|
10
|
+
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';
|
|
11
|
+
import { password, username } from './my-lambda-handler';
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Creates an API Gateway instance with a GET method and mock integration,
|
|
15
|
+
* secured with basic auth. It then creates a matching Connection and uses it
|
|
16
|
+
* in a state machine with a task state to invoke the endpoint.
|
|
17
|
+
*
|
|
18
|
+
* Stack verification steps :
|
|
19
|
+
* * aws stepfunctions start-execution --state-machine-arn <deployed state machine arn> : should return execution arn
|
|
20
|
+
* * aws stepfunctions describe-execution --execution-arn <execution-arn generated before> : should return status as SUCCEEDED
|
|
21
|
+
*/
|
|
22
|
+
const app = new cdk.App();
|
|
23
|
+
const stack = new cdk.Stack(app, 'aws-stepfunctions-tasks-http-invoke-json-path-integ');
|
|
24
|
+
|
|
25
|
+
const authorizerHandler = new lambda.NodejsFunction(stack, 'AuthorizerHandler', {
|
|
26
|
+
entry: path.resolve(__dirname, 'my-lambda-handler', 'index.ts'),
|
|
27
|
+
handler: 'handler',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const authorizer = new apigateway.TokenAuthorizer(stack, 'Authorizer', {
|
|
31
|
+
handler: authorizerHandler,
|
|
32
|
+
identitySource: 'method.request.header.Authorization',
|
|
33
|
+
resultsCacheTtl: cdk.Duration.seconds(0),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const api = new apigateway.RestApi(stack, 'IntegRestApi');
|
|
37
|
+
|
|
38
|
+
api.root.addResource('test-json-path').addMethod(
|
|
39
|
+
'GET',
|
|
40
|
+
new apigateway.MockIntegration({
|
|
41
|
+
integrationResponses: [
|
|
42
|
+
{
|
|
43
|
+
statusCode: '200',
|
|
44
|
+
responseTemplates: {
|
|
45
|
+
'application/json': JSON.stringify({ message: 'Hello, tester!' }),
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
passthroughBehavior: apigateway.PassthroughBehavior.NEVER,
|
|
50
|
+
requestTemplates: {
|
|
51
|
+
'application/json': '{ "statusCode": 200 }',
|
|
52
|
+
},
|
|
53
|
+
}),
|
|
54
|
+
{
|
|
55
|
+
authorizer,
|
|
56
|
+
methodResponses: [
|
|
57
|
+
{
|
|
58
|
+
statusCode: '200',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const connection = new events.Connection(stack, 'Connection', {
|
|
65
|
+
authorization: events.Authorization.basic(username, cdk.SecretValue.unsafePlainText(password)),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const httpInvokeTask = new tasks.HttpInvoke(stack, 'Invoke HTTP Endpoint', {
|
|
69
|
+
apiRoot: api.urlForPath('/'),
|
|
70
|
+
apiEndpoint: sfn.TaskInput.fromJsonPathAt('$.endpointPath'),
|
|
71
|
+
connection,
|
|
72
|
+
method: sfn.TaskInput.fromText('GET'),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const sm = new sfn.StateMachine(stack, 'StateMachine', {
|
|
76
|
+
definition: httpInvokeTask,
|
|
77
|
+
timeout: cdk.Duration.seconds(30),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const testCase = new IntegTest(app, 'HttpInvokeTest', {
|
|
81
|
+
testCases: [stack],
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// Start an execution
|
|
85
|
+
const start = testCase.assertions.awsApiCall('StepFunctions', 'startExecution', {
|
|
86
|
+
stateMachineArn: sm.stateMachineArn,
|
|
87
|
+
input: JSON.stringify({
|
|
88
|
+
endpointPath: 'test-json-path',
|
|
89
|
+
}),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// describe the results of the execution
|
|
93
|
+
const describe = testCase.assertions.awsApiCall('StepFunctions', 'describeExecution', {
|
|
94
|
+
executionArn: start.getAttString('executionArn'),
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// assert the results
|
|
98
|
+
describe.expect(ExpectedResult.objectLike({
|
|
99
|
+
status: 'SUCCEEDED',
|
|
100
|
+
}));
|
|
101
|
+
|
|
102
|
+
app.synth();
|
|
@@ -267,7 +267,7 @@ new synthetics.Canary(this, 'Bucket Canary', {
|
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
> **Note:** Synthetics have a specified folder structure for canaries.
|
|
270
|
-
> For Node with puppeteer scripts supplied via `code.fromAsset()` or `code.fromBucket()`, the canary resource requires the following folder structure
|
|
270
|
+
> For Node with puppeteer scripts supplied via `code.fromAsset()` or `code.fromBucket()`, the canary resource requires the following folder structure for runtime versions older than `syn-nodejs-puppeteer-11.0`:
|
|
271
271
|
>
|
|
272
272
|
> ```plaintext
|
|
273
273
|
> canary/
|
|
@@ -276,6 +276,22 @@ new synthetics.Canary(this, 'Bucket Canary', {
|
|
|
276
276
|
> ├── <filename>.js
|
|
277
277
|
> ```
|
|
278
278
|
>
|
|
279
|
+
> For puppeteer based runtime versions newer than or equal to `syn-nodejs-puppeteer-11.0`, `nodjs/node_modules` is not necessary but supported.
|
|
280
|
+
>
|
|
281
|
+
> Both
|
|
282
|
+
> ```plaintext
|
|
283
|
+
> canary/
|
|
284
|
+
> ├── nodejs/
|
|
285
|
+
> ├── node_modules/
|
|
286
|
+
> ├── <filename>.js
|
|
287
|
+
> ```
|
|
288
|
+
> And
|
|
289
|
+
> ```plaintext
|
|
290
|
+
> canary/
|
|
291
|
+
> ├── <filename>.js
|
|
292
|
+
> ```
|
|
293
|
+
> are supported.
|
|
294
|
+
>
|
|
279
295
|
> For Node with playwright scripts supplied via `code.fromAsset()` or `code.fromBucket()`, the canary resource requires the following folder structure:
|
|
280
296
|
>
|
|
281
297
|
> ```plaintext
|