diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.assets.json index b04cc5523b4d4..a6f6f3d8a1551 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.assets.json @@ -14,7 +14,7 @@ } } }, - "08c0deb6fdb13c835fe0f54322d6bdde0901e993bc64e652a703876f29219bdc": { + "698655886b311069cc4723da4d98c34000ef73e14961d87a69b33dec07d0b008": { "source": { "path": "aws-cdk-sdk-js-v3.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "08c0deb6fdb13c835fe0f54322d6bdde0901e993bc64e652a703876f29219bdc.json", + "objectKey": "698655886b311069cc4723da4d98c34000ef73e14961d87a69b33dec07d0b008.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.template.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.template.json index da8e0e44a0a1b..1eeaf5d4d2820 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js-v3.template.json @@ -16,7 +16,7 @@ "Fn::Join": [ "", [ - "{\"service\":\"SNS\",\"action\":\"publish\",\"parameters\":{\"Message\":\"hello\",\"TopicArn\":\"", + "{\"service\":\"@aws-sdk/client-sns\",\"action\":\"PublishCommand\",\"parameters\":{\"Message\":\"hello\",\"TopicArn\":\"", { "Ref": "TopicBFC7AF6E" }, @@ -32,7 +32,7 @@ "Fn::Join": [ "", [ - "{\"service\":\"SNS\",\"action\":\"publish\",\"parameters\":{\"Message\":\"hello\",\"TopicArn\":\"", + "{\"service\":\"@aws-sdk/client-sns\",\"action\":\"PublishCommand\",\"parameters\":{\"Message\":\"hello\",\"TopicArn\":\"", { "Ref": "TopicBFC7AF6E" }, @@ -44,7 +44,7 @@ ] ] }, - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "PublishCustomResourcePolicyDF696FCA" @@ -136,9 +136,9 @@ "Arn" ] }, - "Create": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", - "Update": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", - "InstallLatestAwsSdk": false + "Create": "{\"service\":\"@aws-sdk/client-sns\",\"action\":\"ListTopicsCommand\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", + "Update": "{\"service\":\"@aws-sdk/client-sns\",\"action\":\"ListTopicsCommand\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "ListTopicsCustomResourcePolicy31A8396A", @@ -191,7 +191,7 @@ "Fn::Join": [ "", [ - "{\"service\":\"SSM\",\"action\":\"getParameter\",\"parameters\":{\"Name\":\"", + "{\"service\":\"@aws-sdk/client-ssm\",\"action\":\"GetParameterCommand\",\"parameters\":{\"Name\":\"", { "Ref": "Utf8Parameter6C885A19" }, @@ -203,7 +203,7 @@ "Fn::Join": [ "", [ - "{\"service\":\"SSM\",\"action\":\"getParameter\",\"parameters\":{\"Name\":\"", + "{\"service\":\"@aws-sdk/client-ssm\",\"action\":\"GetParameterCommand\",\"parameters\":{\"Name\":\"", { "Ref": "Utf8Parameter6C885A19" }, @@ -211,7 +211,7 @@ ] ] }, - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "GetParameterCustomResourcePolicyD8E5D455" @@ -291,7 +291,7 @@ "Fn::Join": [ "", [ - "{\"service\":\"SSM\",\"action\":\"getParameter\",\"parameters\":{\"Name\":\"", + "{\"service\":\"@aws-sdk/client-ssm\",\"action\":\"GetParameterCommand\",\"parameters\":{\"Name\":\"", { "Ref": "Utf8Parameter6C885A19" }, @@ -303,7 +303,7 @@ "Fn::Join": [ "", [ - "{\"service\":\"SSM\",\"action\":\"getParameter\",\"parameters\":{\"Name\":\"", + "{\"service\":\"@aws-sdk/client-ssm\",\"action\":\"GetParameterCommand\",\"parameters\":{\"Name\":\"", { "Ref": "Utf8Parameter6C885A19" }, @@ -311,7 +311,7 @@ ] ] }, - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -325,9 +325,9 @@ "Arn" ] }, - "Create": "{\"service\":\"EKS\",\"action\":\"describeCluster\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "Update": "{\"service\":\"EKS\",\"action\":\"describeCluster\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": false + "Create": "{\"service\":\"@aws-sdk/client-eks\",\"action\":\"DescribeClusterCommand\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", + "Update": "{\"service\":\"@aws-sdk/client-eks\",\"action\":\"DescribeClusterCommand\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "DescribeClusterCustomResourcePolicyD7730CF4" diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.assets.json index a04b3cae63a98..f7cf8d0676ae2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.assets.json @@ -14,7 +14,7 @@ } } }, - "08c0deb6fdb13c835fe0f54322d6bdde0901e993bc64e652a703876f29219bdc": { + "1caa897f3fe91f1716814e12ff9edf1d1104a424e88397a71049a7d22f783a47": { "source": { "path": "aws-cdk-sdk-js.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "08c0deb6fdb13c835fe0f54322d6bdde0901e993bc64e652a703876f29219bdc.json", + "objectKey": "1caa897f3fe91f1716814e12ff9edf1d1104a424e88397a71049a7d22f783a47.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.template.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.template.json index da8e0e44a0a1b..87ce600fd5713 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/aws-cdk-sdk-js.template.json @@ -44,7 +44,7 @@ ] ] }, - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "PublishCustomResourcePolicyDF696FCA" @@ -138,7 +138,7 @@ }, "Create": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", "Update": "{\"service\":\"SNS\",\"action\":\"listTopics\",\"physicalResourceId\":{\"responsePath\":\"Topics.0.TopicArn\"}}", - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "ListTopicsCustomResourcePolicy31A8396A", @@ -211,7 +211,7 @@ ] ] }, - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "GetParameterCustomResourcePolicyD8E5D455" @@ -311,7 +311,7 @@ ] ] }, - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -327,7 +327,7 @@ }, "Create": "{\"service\":\"EKS\",\"action\":\"describeCluster\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", "Update": "{\"service\":\"EKS\",\"action\":\"describeCluster\",\"parameters\":{\"name\":\"fake-cluster\"},\"physicalResourceId\":{\"id\":\"fake-cluster\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "DescribeClusterCustomResourcePolicyD7730CF4" diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/manifest.json index 24009867b85ee..2afee25190d53 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.js.snapshot/manifest.json @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-cdk-sdk-js.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08c0deb6fdb13c835fe0f54322d6bdde0901e993bc64e652a703876f29219bdc.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1caa897f3fe91f1716814e12ff9edf1d1104a424e88397a71049a7d22f783a47.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -39,6 +40,12 @@ "data": "TopicBFC7AF6E" } ], + "/aws-cdk-sdk-js/Publish": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js/Publish/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -63,6 +70,12 @@ "data": "AWS679f53fac002430cb0da5b7982bd22872D164C4C" } ], + "/aws-cdk-sdk-js/ListTopics": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js/ListTopics/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -81,6 +94,12 @@ "data": "Utf8Parameter6C885A19" } ], + "/aws-cdk-sdk-js/GetParameter": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js/GetParameter/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -105,12 +124,24 @@ "data": "CustomRoleDefaultPolicyC5C189DF" } ], + "/aws-cdk-sdk-js/GetParameterNoPolicy": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js/GetParameterNoPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", "data": "GetParameterNoPolicyFCF7AA3B" } ], + "/aws-cdk-sdk-js/DescribeCluster": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js/DescribeCluster/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -175,10 +206,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-cdk-sdk-js-v3.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08c0deb6fdb13c835fe0f54322d6bdde0901e993bc64e652a703876f29219bdc.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/698655886b311069cc4723da4d98c34000ef73e14961d87a69b33dec07d0b008.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -200,6 +232,12 @@ "data": "TopicBFC7AF6E" } ], + "/aws-cdk-sdk-js-v3/Publish": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js-v3/Publish/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -224,6 +262,12 @@ "data": "AWS679f53fac002430cb0da5b7982bd22872D164C4C" } ], + "/aws-cdk-sdk-js-v3/ListTopics": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js-v3/ListTopics/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -242,6 +286,12 @@ "data": "Utf8Parameter6C885A19" } ], + "/aws-cdk-sdk-js-v3/GetParameter": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js-v3/GetParameter/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -266,12 +316,24 @@ "data": "CustomRoleDefaultPolicyC5C189DF" } ], + "/aws-cdk-sdk-js-v3/GetParameterNoPolicy": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js-v3/GetParameterNoPolicy/Resource/Default": [ { "type": "aws:cdk:logicalId", "data": "GetParameterNoPolicyFCF7AA3B" } ], + "/aws-cdk-sdk-js-v3/DescribeCluster": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/aws-cdk-sdk-js-v3/DescribeCluster/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -336,6 +398,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "AwsCustomResourceTestDefaultTestDeployAssert289A7DC5.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.ts b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.ts index deb2ab807616c..e1da3311c963a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/aws-custom-resource/integ.aws-custom-resource.ts @@ -2,14 +2,13 @@ import * as iam from 'aws-cdk-lib/aws-iam'; import * as sns from 'aws-cdk-lib/aws-sns'; import * as ssm from 'aws-cdk-lib/aws-ssm'; -import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as cdk from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from 'aws-cdk-lib/custom-resources'; import { Construct } from 'constructs'; interface AwsCdkSdkJsStackProps { - readonly runtime?: lambda.Runtime; + readonly v3Format?: boolean; } class AwsCdkSdkJsStack extends cdk.Stack { @@ -20,8 +19,8 @@ class AwsCdkSdkJsStack extends cdk.Stack { const snsPublish = new AwsCustomResource(this, 'Publish', { resourceType: 'Custom::SNSPublisher', onUpdate: { - service: 'SNS', - action: 'publish', + service: props?.v3Format ? '@aws-sdk/client-sns' : 'SNS', + action: props?.v3Format ? 'PublishCommand' : 'publish', parameters: { Message: 'hello', TopicArn: topic.topicArn, @@ -33,8 +32,8 @@ class AwsCdkSdkJsStack extends cdk.Stack { const listTopics = new AwsCustomResource(this, 'ListTopics', { onUpdate: { - service: 'SNS', - action: 'listTopics', + service: props?.v3Format ? '@aws-sdk/client-sns' : 'SNS', + action: props?.v3Format ? 'ListTopicsCommand' : 'listTopics', physicalResourceId: PhysicalResourceId.fromResponse('Topics.0.TopicArn'), }, policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }), @@ -47,8 +46,8 @@ class AwsCdkSdkJsStack extends cdk.Stack { const getParameter = new AwsCustomResource(this, 'GetParameter', { resourceType: 'Custom::SSMParameter', onUpdate: { - service: 'SSM', - action: 'getParameter', + service: props?.v3Format ? '@aws-sdk/client-ssm' : 'SSM', + action: props?.v3Format ? 'GetParameterCommand' : 'getParameter', parameters: { Name: ssmParameter.parameterName, WithDecryption: true, @@ -73,8 +72,8 @@ class AwsCdkSdkJsStack extends cdk.Stack { const getParameterNoPolicy = new AwsCustomResource(this, 'GetParameterNoPolicy', { resourceType: 'Custom::SSMParameter', onUpdate: { - service: 'SSM', - action: 'getParameter', + service: props?.v3Format ? '@aws-sdk/client-ssm' : 'SSM', + action: props?.v3Format ? 'GetParameterCommand' : 'getParameter', parameters: { Name: ssmParameter.parameterName, WithDecryption: true, @@ -87,8 +86,8 @@ class AwsCdkSdkJsStack extends cdk.Stack { new AwsCustomResource(this, 'DescribeCluster', { resourceType: 'Custom::EKSClusterDescription', onUpdate: { - service: 'EKS', - action: 'describeCluster', + service: props?.v3Format ? '@aws-sdk/client-eks' : 'EKS', + action: props?.v3Format ? 'DescribeClusterCommand' : 'describeCluster', parameters: { name: 'fake-cluster', }, @@ -102,12 +101,6 @@ class AwsCdkSdkJsStack extends cdk.Stack { new cdk.CfnOutput(this, 'TopicArn', { value: listTopics.getResponseField('Topics.0.TopicArn') }); new cdk.CfnOutput(this, 'ParameterValue', { value: getParameter.getResponseField('Parameter.Value') }); new cdk.CfnOutput(this, 'ParameterValueNoPolicy', { value: getParameterNoPolicy.getResponseField('Parameter.Value') }); - - if (props?.runtime) { - const awsCustomResourceProviderId ='AWS679f53fac002430cb0da5b7982bd2287'; - const provider = this.node.findChild(awsCustomResourceProviderId).node.defaultChild as lambda.CfnFunction; - provider.runtime = props.runtime.name; - } } } @@ -117,7 +110,7 @@ new integ.IntegTest(app, 'AwsCustomResourceTest', { testCases: [ new AwsCdkSdkJsStack(app, 'aws-cdk-sdk-js'), new AwsCdkSdkJsStack(app, 'aws-cdk-sdk-js-v3', { - runtime: lambda.Runtime.NODEJS_18_X, + v3Format: true, }), ], diffAssets: true, diff --git a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES index cbae80964d512..0b6dbf80ab305 100644 --- a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES +++ b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES @@ -264,7 +264,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE ---------------- -** aws-sdk@2.1451.0 - https://www.npmjs.com/package/aws-sdk/v/2.1451.0 | Apache-2.0 +** aws-sdk@2.1461.0 - https://www.npmjs.com/package/aws-sdk/v/2.1461.0 | Apache-2.0 AWS SDK for JavaScript Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts b/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts index bb23492eee40b..7ed282639ba6c 100644 --- a/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts +++ b/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts @@ -487,8 +487,10 @@ export class AwsCustomResource extends Construct implements iam.IGrantable { // Derive statements from AWS SDK calls for (const call of [props.onCreate, props.onUpdate, props.onDelete]) { if (call && call.assumedRoleArn == null) { + const action = call.service.startsWith('@aws-sdk/client-') ? awsSdkV3ToIamAction(call.service, call.action) + : awsSdkV2ToIamAction(call.service, call.action); const statement = new iam.PolicyStatement({ - actions: [awsSdkToIamAction(call.service, call.action)], + actions: [action], resources: props.policy.resources, }); statements.push(statement); @@ -603,10 +605,23 @@ function includesPhysicalResourceIdRef(obj: any | undefined) { * * TODO: is this mapping correct for all services? */ -function awsSdkToIamAction(service: string, action: string): string { +function awsSdkV2ToIamAction(service: string, action: string): string { const srv = service.toLowerCase(); const awsSdkMetadata = getAwsSdkMetadata(); const iamService = (awsSdkMetadata[srv] && awsSdkMetadata[srv].prefix) || srv; const iamAction = action.charAt(0).toUpperCase() + action.slice(1); return `${iamService}:${iamAction}`; } + +/** + * Transform SDK V3 packageName/command to IAM action using metadata from @aws-sdk/client module. + * Example: @aws-sdk/client-cloudwatch-logs with PutRetentionPolicyCommand => logs:PutRetentionPolicy + * + * TODO: is this mapping correct for all services? + */ +function awsSdkV3ToIamAction(packageName: string, command: string): string { + const awsSdkMetadata = getAwsSdkMetadata(); + const iamService = (awsSdkMetadata[packageName] && awsSdkMetadata[packageName].prefix) || packageName.split('@aws-sdk/client-')[1]; + const iamAction = command.split('Command')[0]; + return `${iamService}:${iamAction}`; +} \ No newline at end of file diff --git a/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/sdk-api-metadata.json b/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/sdk-api-metadata.json index 6a5f3cdb3e9aa..aa5254051c35c 100644 --- a/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/sdk-api-metadata.json +++ b/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/sdk-api-metadata.json @@ -3,38 +3,74 @@ "name": "ACM", "cors": true }, + "@aws-sdk/client-acm": { + "name": "ACM", + "cors": true + }, "apigateway": { "name": "APIGateway", "cors": true }, + "@aws-sdk/client-api-gateway": { + "name": "APIGateway", + "cors": true + }, "applicationautoscaling": { "prefix": "application-autoscaling", "name": "ApplicationAutoScaling", "cors": true }, + "@aws-sdk/client-application-auto-scaling": { + "prefix": "application-autoscaling", + "name": "ApplicationAutoScaling", + "cors": true + }, "appstream": { "name": "AppStream" }, + "@aws-sdk/client-appstream": { + "name": "AppStream" + }, "autoscaling": { "name": "AutoScaling", "cors": true }, + "@aws-sdk/client-auto-scaling": { + "name": "AutoScaling", + "cors": true + }, "batch": { "name": "Batch" }, + "@aws-sdk/client-batch": { + "name": "Batch" + }, "budgets": { "name": "Budgets" }, + "@aws-sdk/client-budgets": { + "name": "Budgets" + }, "clouddirectory": { "name": "CloudDirectory", "versions": [ "2016-05-10*" ] }, + "@aws-sdk/client-clouddirectory": { + "name": "CloudDirectory", + "versions": [ + "2016-05-10*" + ] + }, "cloudformation": { "name": "CloudFormation", "cors": true }, + "@aws-sdk/client-cloudformation": { + "name": "CloudFormation", + "cors": true + }, "cloudfront": { "name": "CloudFront", "versions": [ @@ -61,25 +97,70 @@ ], "cors": true }, + "@aws-sdk/client-cloudfront": { + "name": "CloudFront", + "versions": [ + "2013-05-12*", + "2013-11-11*", + "2014-05-31*", + "2014-10-21*", + "2014-11-06*", + "2015-04-17*", + "2015-07-27*", + "2015-09-17*", + "2016-01-13*", + "2016-01-28*", + "2016-08-01*", + "2016-08-20*", + "2016-09-07*", + "2016-09-29*", + "2016-11-25*", + "2017-03-25*", + "2017-10-30*", + "2018-06-18*", + "2018-11-05*", + "2019-03-26*" + ], + "cors": true + }, "cloudhsm": { "name": "CloudHSM", "cors": true }, + "@aws-sdk/client-cloudhsm": { + "name": "CloudHSM", + "cors": true + }, "cloudsearch": { "name": "CloudSearch" }, + "@aws-sdk/client-cloudsearch": { + "name": "CloudSearch" + }, "cloudsearchdomain": { "name": "CloudSearchDomain" }, + "@aws-sdk/client-cloudsearch-domain": { + "name": "CloudSearchDomain" + }, "cloudtrail": { "name": "CloudTrail", "cors": true }, + "@aws-sdk/client-cloudtrail": { + "name": "CloudTrail", + "cors": true + }, "cloudwatch": { "prefix": "monitoring", "name": "CloudWatch", "cors": true }, + "@aws-sdk/client-cloudwatch": { + "prefix": "monitoring", + "name": "CloudWatch", + "cors": true + }, "cloudwatchevents": { "prefix": "events", "name": "CloudWatchEvents", @@ -88,81 +169,164 @@ ], "cors": true }, + "@aws-sdk/client-cloudwatch-events": { + "prefix": "events", + "name": "CloudWatchEvents", + "versions": [ + "2014-02-03*" + ], + "cors": true + }, "cloudwatchlogs": { "prefix": "logs", "name": "CloudWatchLogs", "cors": true }, + "@aws-sdk/client-cloudwatch-logs": { + "prefix": "logs", + "name": "CloudWatchLogs", + "cors": true + }, "codebuild": { "name": "CodeBuild", "cors": true }, + "@aws-sdk/client-codebuild": { + "name": "CodeBuild", + "cors": true + }, "codecommit": { "name": "CodeCommit", "cors": true }, + "@aws-sdk/client-codecommit": { + "name": "CodeCommit", + "cors": true + }, "codedeploy": { "name": "CodeDeploy", "cors": true }, + "@aws-sdk/client-codedeploy": { + "name": "CodeDeploy", + "cors": true + }, "codepipeline": { "name": "CodePipeline", "cors": true }, + "@aws-sdk/client-codepipeline": { + "name": "CodePipeline", + "cors": true + }, "cognitoidentity": { "prefix": "cognito-identity", "name": "CognitoIdentity", "cors": true }, + "@aws-sdk/client-cognito-identity": { + "prefix": "cognito-identity", + "name": "CognitoIdentity", + "cors": true + }, "cognitoidentityserviceprovider": { "prefix": "cognito-idp", "name": "CognitoIdentityServiceProvider", "cors": true }, + "@aws-sdk/client-cognito-identity-provider": { + "prefix": "cognito-idp", + "name": "CognitoIdentityServiceProvider", + "cors": true + }, "cognitosync": { "prefix": "cognito-sync", "name": "CognitoSync", "cors": true }, + "@aws-sdk/client-cognito-sync": { + "prefix": "cognito-sync", + "name": "CognitoSync", + "cors": true + }, "configservice": { "prefix": "config", "name": "ConfigService", "cors": true }, + "@aws-sdk/client-config-service": { + "prefix": "config", + "name": "ConfigService", + "cors": true + }, "cur": { "name": "CUR", "cors": true }, + "@aws-sdk/client-cost-and-usage-report-service": { + "name": "CUR", + "cors": true + }, "datapipeline": { "name": "DataPipeline" }, + "@aws-sdk/client-data-pipeline": { + "name": "DataPipeline" + }, "devicefarm": { "name": "DeviceFarm", "cors": true }, + "@aws-sdk/client-device-farm": { + "name": "DeviceFarm", + "cors": true + }, "directconnect": { "name": "DirectConnect", "cors": true }, + "@aws-sdk/client-direct-connect": { + "name": "DirectConnect", + "cors": true + }, "directoryservice": { "prefix": "ds", "name": "DirectoryService" }, + "@aws-sdk/client-directory-service": { + "prefix": "ds", + "name": "DirectoryService" + }, "discovery": { "name": "Discovery" }, + "@aws-sdk/client-application-discovery-service": { + "name": "Discovery" + }, "dms": { "name": "DMS" }, + "@aws-sdk/client-database-migration-service": { + "name": "DMS" + }, "dynamodb": { "name": "DynamoDB", "cors": true }, + "@aws-sdk/client-dynamodb": { + "name": "DynamoDB", + "cors": true + }, "dynamodbstreams": { "prefix": "streams.dynamodb", "name": "DynamoDBStreams", "cors": true }, + "@aws-sdk/client-dynamodb-streams": { + "prefix": "streams.dynamodb", + "name": "DynamoDBStreams", + "cors": true + }, "ec2": { "name": "EC2", "versions": [ @@ -181,19 +345,50 @@ ], "cors": true }, + "@aws-sdk/client-ec2": { + "name": "EC2", + "versions": [ + "2013-06-15*", + "2013-10-15*", + "2014-02-01*", + "2014-05-01*", + "2014-06-15*", + "2014-09-01*", + "2014-10-01*", + "2015-03-01*", + "2015-04-15*", + "2015-10-01*", + "2016-04-01*", + "2016-09-15*" + ], + "cors": true + }, "ecr": { "name": "ECR", "cors": true }, + "@aws-sdk/client-ecr": { + "name": "ECR", + "cors": true + }, "ecs": { "name": "ECS", "cors": true }, + "@aws-sdk/client-ecs": { + "name": "ECS", + "cors": true + }, "efs": { "prefix": "elasticfilesystem", "name": "EFS", "cors": true }, + "@aws-sdk/client-efs": { + "prefix": "elasticfilesystem", + "name": "EFS", + "cors": true + }, "elasticache": { "name": "ElastiCache", "versions": [ @@ -204,50 +399,104 @@ ], "cors": true }, + "@aws-sdk/client-elasticache": { + "name": "ElastiCache", + "versions": [ + "2012-11-15*", + "2014-03-24*", + "2014-07-15*", + "2014-09-30*" + ], + "cors": true + }, "elasticbeanstalk": { "name": "ElasticBeanstalk", "cors": true }, + "@aws-sdk/client-elastic-beanstalk": { + "name": "ElasticBeanstalk", + "cors": true + }, "elb": { "prefix": "elasticloadbalancing", "name": "ELB", "cors": true }, + "@aws-sdk/client-elastic-load-balancing": { + "prefix": "elasticloadbalancing", + "name": "ELB", + "cors": true + }, "elbv2": { "prefix": "elasticloadbalancingv2", "name": "ELBv2", "cors": true }, + "@aws-sdk/client-elastic-load-balancing-v2": { + "prefix": "elasticloadbalancingv2", + "name": "ELBv2", + "cors": true + }, "emr": { "prefix": "elasticmapreduce", "name": "EMR", "cors": true }, + "@aws-sdk/client-emr": { + "prefix": "elasticmapreduce", + "name": "EMR", + "cors": true + }, "es": { "name": "ES" }, + "@aws-sdk/client-elasticsearch-service": { + "name": "ES" + }, "elastictranscoder": { "name": "ElasticTranscoder", "cors": true }, + "@aws-sdk/client-elastic-transcoder": { + "name": "ElasticTranscoder", + "cors": true + }, "firehose": { "name": "Firehose", "cors": true }, + "@aws-sdk/client-firehose": { + "name": "Firehose", + "cors": true + }, "gamelift": { "name": "GameLift", "cors": true }, + "@aws-sdk/client-gamelift": { + "name": "GameLift", + "cors": true + }, "glacier": { "name": "Glacier" }, + "@aws-sdk/client-glacier": { + "name": "Glacier" + }, "health": { "name": "Health" }, + "@aws-sdk/client-health": { + "name": "Health" + }, "iam": { "name": "IAM", "cors": true }, + "@aws-sdk/client-iam": { + "name": "IAM", + "cors": true + }, "importexport": { "name": "ImportExport" }, @@ -258,55 +507,111 @@ ], "cors": true }, + "@aws-sdk/client-inspector": { + "name": "Inspector", + "versions": [ + "2015-08-18*" + ], + "cors": true + }, "iot": { "name": "Iot", "cors": true }, + "@aws-sdk/client-iot": { + "name": "Iot", + "cors": true + }, "iotdata": { "prefix": "iot-data", "name": "IotData", "cors": true }, + "@aws-sdk/client-iot-data-plane": { + "prefix": "iot-data", + "name": "IotData", + "cors": true + }, "kinesis": { "name": "Kinesis", "cors": true }, + "@aws-sdk/client-kinesis": { + "name": "Kinesis", + "cors": true + }, "kinesisanalytics": { "name": "KinesisAnalytics" }, + "@aws-sdk/client-kinesis-analytics": { + "name": "KinesisAnalytics" + }, "kms": { "name": "KMS", "cors": true }, + "@aws-sdk/client-kms": { + "name": "KMS", + "cors": true + }, "lambda": { "name": "Lambda", "cors": true }, + "@aws-sdk/client-lambda": { + "name": "Lambda", + "cors": true + }, "lexruntime": { "prefix": "runtime.lex", "name": "LexRuntime", "cors": true }, + "@aws-sdk/client-lex-runtime-service": { + "prefix": "runtime.lex", + "name": "LexRuntime", + "cors": true + }, "lightsail": { "name": "Lightsail" }, + "@aws-sdk/client-lightsail": { + "name": "Lightsail" + }, "machinelearning": { "name": "MachineLearning", "cors": true }, + "@aws-sdk/client-machine-learning": { + "name": "MachineLearning", + "cors": true + }, "marketplacecommerceanalytics": { "name": "MarketplaceCommerceAnalytics", "cors": true }, + "@aws-sdk/client-marketplace-commerce-analytics": { + "name": "MarketplaceCommerceAnalytics", + "cors": true + }, "marketplacemetering": { "prefix": "meteringmarketplace", "name": "MarketplaceMetering" }, + "@aws-sdk/client-marketplace-metering": { + "prefix": "meteringmarketplace", + "name": "MarketplaceMetering" + }, "mturk": { "prefix": "mturk-requester", "name": "MTurk", "cors": true }, + "@aws-sdk/client-mturk": { + "prefix": "mturk-requester", + "name": "MTurk", + "cors": true + }, "mobileanalytics": { "name": "MobileAnalytics", "cors": true @@ -315,19 +620,36 @@ "name": "OpsWorks", "cors": true }, + "@aws-sdk/client-opsworks": { + "name": "OpsWorks", + "cors": true + }, "opsworkscm": { "name": "OpsWorksCM" }, + "@aws-sdk/client-opsworkscm": { + "name": "OpsWorksCM" + }, "organizations": { "name": "Organizations" }, + "@aws-sdk/client-organizations": { + "name": "Organizations" + }, "pinpoint": { "name": "Pinpoint" }, + "@aws-sdk/client-pinpoint": { + "name": "Pinpoint" + }, "polly": { "name": "Polly", "cors": true }, + "@aws-sdk/client-polly": { + "name": "Polly", + "cors": true + }, "rds": { "name": "RDS", "versions": [ @@ -335,47 +657,95 @@ ], "cors": true }, + "@aws-sdk/client-rds": { + "name": "RDS", + "versions": [ + "2014-09-01*" + ], + "cors": true + }, "redshift": { "name": "Redshift", "cors": true }, + "@aws-sdk/client-redshift": { + "name": "Redshift", + "cors": true + }, "rekognition": { "name": "Rekognition", "cors": true }, + "@aws-sdk/client-rekognition": { + "name": "Rekognition", + "cors": true + }, "resourcegroupstaggingapi": { "name": "ResourceGroupsTaggingAPI" }, + "@aws-sdk/client-resource-groups-tagging-api": { + "name": "ResourceGroupsTaggingAPI" + }, "route53": { "name": "Route53", "cors": true }, + "@aws-sdk/client-route-53": { + "name": "Route53", + "cors": true + }, "route53domains": { "name": "Route53Domains", "cors": true }, + "@aws-sdk/client-route-53-domains": { + "name": "Route53Domains", + "cors": true + }, "s3": { "name": "S3", "dualstackAvailable": true, "cors": true }, + "@aws-sdk/client-s3": { + "name": "S3", + "dualstackAvailable": true, + "cors": true + }, "s3control": { "name": "S3Control", "dualstackAvailable": true, "xmlNoDefaultLists": true }, + "@aws-sdk/client-s3-control": { + "name": "S3Control", + "dualstackAvailable": true, + "xmlNoDefaultLists": true + }, "servicecatalog": { "name": "ServiceCatalog", "cors": true }, + "@aws-sdk/client-service-catalog": { + "name": "ServiceCatalog", + "cors": true + }, "ses": { "prefix": "email", "name": "SES", "cors": true }, + "@aws-sdk/client-ses": { + "prefix": "email", + "name": "SES", + "cors": true + }, "shield": { "name": "Shield" }, + "@aws-sdk/client-shield": { + "name": "Shield" + }, "simpledb": { "prefix": "sdb", "name": "SimpleDB" @@ -383,529 +753,1058 @@ "sms": { "name": "SMS" }, + "@aws-sdk/client-sms": { + "name": "SMS" + }, "snowball": { "name": "Snowball" }, + "@aws-sdk/client-snowball": { + "name": "Snowball" + }, "sns": { "name": "SNS", "cors": true }, + "@aws-sdk/client-sns": { + "name": "SNS", + "cors": true + }, "sqs": { "name": "SQS", "cors": true }, + "@aws-sdk/client-sqs": { + "name": "SQS", + "cors": true + }, "ssm": { "name": "SSM", "cors": true }, + "@aws-sdk/client-ssm": { + "name": "SSM", + "cors": true + }, "storagegateway": { "name": "StorageGateway", "cors": true }, + "@aws-sdk/client-storage-gateway": { + "name": "StorageGateway", + "cors": true + }, "stepfunctions": { "prefix": "states", "name": "StepFunctions" }, + "@aws-sdk/client-sfn": { + "prefix": "states", + "name": "StepFunctions" + }, "sts": { "name": "STS", "cors": true }, + "@aws-sdk/client-sts": { + "name": "STS", + "cors": true + }, "support": { "name": "Support" }, + "@aws-sdk/client-support": { + "name": "Support" + }, "swf": { "name": "SWF" }, + "@aws-sdk/client-swf": { + "name": "SWF" + }, "xray": { "name": "XRay", "cors": true }, + "@aws-sdk/client-xray": { + "name": "XRay", + "cors": true + }, "waf": { "name": "WAF", "cors": true }, + "@aws-sdk/client-waf": { + "name": "WAF", + "cors": true + }, "wafregional": { "prefix": "waf-regional", "name": "WAFRegional" }, + "@aws-sdk/client-waf-regional": { + "prefix": "waf-regional", + "name": "WAFRegional" + }, "workdocs": { "name": "WorkDocs", "cors": true }, + "@aws-sdk/client-workdocs": { + "name": "WorkDocs", + "cors": true + }, "workspaces": { "name": "WorkSpaces" }, + "@aws-sdk/client-workspaces": { + "name": "WorkSpaces" + }, "codestar": { "name": "CodeStar" }, + "@aws-sdk/client-codestar": { + "name": "CodeStar" + }, "lexmodelbuildingservice": { "prefix": "lex-models", "name": "LexModelBuildingService", "cors": true }, + "@aws-sdk/client-lex-model-building-service": { + "prefix": "lex-models", + "name": "LexModelBuildingService", + "cors": true + }, "marketplaceentitlementservice": { "prefix": "entitlement.marketplace", "name": "MarketplaceEntitlementService" }, + "@aws-sdk/client-marketplace-entitlement-service": { + "prefix": "entitlement.marketplace", + "name": "MarketplaceEntitlementService" + }, "athena": { "name": "Athena", "cors": true }, + "@aws-sdk/client-athena": { + "name": "Athena", + "cors": true + }, "greengrass": { "name": "Greengrass" }, + "@aws-sdk/client-greengrass": { + "name": "Greengrass" + }, "dax": { "name": "DAX" }, + "@aws-sdk/client-dax": { + "name": "DAX" + }, "migrationhub": { "prefix": "AWSMigrationHub", "name": "MigrationHub" }, + "@aws-sdk/client-migration-hub": { + "prefix": "AWSMigrationHub", + "name": "MigrationHub" + }, "cloudhsmv2": { "name": "CloudHSMV2", "cors": true }, + "@aws-sdk/client-cloudhsm-v2": { + "name": "CloudHSMV2", + "cors": true + }, "glue": { "name": "Glue" }, + "@aws-sdk/client-glue": { + "name": "Glue" + }, "mobile": { "name": "Mobile" }, + "@aws-sdk/client-mobile": { + "name": "Mobile" + }, "pricing": { "name": "Pricing", "cors": true }, + "@aws-sdk/client-pricing": { + "name": "Pricing", + "cors": true + }, "costexplorer": { "prefix": "ce", "name": "CostExplorer", "cors": true }, + "@aws-sdk/client-cost-explorer": { + "prefix": "ce", + "name": "CostExplorer", + "cors": true + }, "mediaconvert": { "name": "MediaConvert" }, + "@aws-sdk/client-mediaconvert": { + "name": "MediaConvert" + }, "medialive": { "name": "MediaLive" }, + "@aws-sdk/client-medialive": { + "name": "MediaLive" + }, "mediapackage": { "name": "MediaPackage" }, + "@aws-sdk/client-mediapackage": { + "name": "MediaPackage" + }, "mediastore": { "name": "MediaStore" }, + "@aws-sdk/client-mediastore": { + "name": "MediaStore" + }, "mediastoredata": { "prefix": "mediastore-data", "name": "MediaStoreData", "cors": true }, + "@aws-sdk/client-mediastore-data": { + "prefix": "mediastore-data", + "name": "MediaStoreData", + "cors": true + }, "appsync": { "name": "AppSync" }, + "@aws-sdk/client-appsync": { + "name": "AppSync" + }, "guardduty": { "name": "GuardDuty" }, + "@aws-sdk/client-guardduty": { + "name": "GuardDuty" + }, "mq": { "name": "MQ" }, + "@aws-sdk/client-mq": { + "name": "MQ" + }, "comprehend": { "name": "Comprehend", "cors": true }, + "@aws-sdk/client-comprehend": { + "name": "Comprehend", + "cors": true + }, "iotjobsdataplane": { "prefix": "iot-jobs-data", "name": "IoTJobsDataPlane" }, + "@aws-sdk/client-iot-jobs-data-plane": { + "prefix": "iot-jobs-data", + "name": "IoTJobsDataPlane" + }, "kinesisvideoarchivedmedia": { "prefix": "kinesis-video-archived-media", "name": "KinesisVideoArchivedMedia", "cors": true }, + "@aws-sdk/client-kinesis-video-archived-media": { + "prefix": "kinesis-video-archived-media", + "name": "KinesisVideoArchivedMedia", + "cors": true + }, "kinesisvideomedia": { "prefix": "kinesis-video-media", "name": "KinesisVideoMedia", "cors": true }, + "@aws-sdk/client-kinesis-video-media": { + "prefix": "kinesis-video-media", + "name": "KinesisVideoMedia", + "cors": true + }, "kinesisvideo": { "name": "KinesisVideo", "cors": true }, + "@aws-sdk/client-kinesis-video": { + "name": "KinesisVideo", + "cors": true + }, "sagemakerruntime": { "prefix": "runtime.sagemaker", "name": "SageMakerRuntime" }, + "@aws-sdk/client-sagemaker-runtime": { + "prefix": "runtime.sagemaker", + "name": "SageMakerRuntime" + }, "sagemaker": { "name": "SageMaker" }, + "@aws-sdk/client-sagemaker": { + "name": "SageMaker" + }, "translate": { "name": "Translate", "cors": true }, + "@aws-sdk/client-translate": { + "name": "Translate", + "cors": true + }, "resourcegroups": { "prefix": "resource-groups", "name": "ResourceGroups", "cors": true }, + "@aws-sdk/client-resource-groups": { + "prefix": "resource-groups", + "name": "ResourceGroups", + "cors": true + }, "alexaforbusiness": { "name": "AlexaForBusiness" }, + "@aws-sdk/client-alexa-for-business": { + "name": "AlexaForBusiness" + }, "cloud9": { "name": "Cloud9" }, + "@aws-sdk/client-cloud9": { + "name": "Cloud9" + }, "serverlessapplicationrepository": { "prefix": "serverlessrepo", "name": "ServerlessApplicationRepository" }, + "@aws-sdk/client-serverlessapplicationrepository": { + "prefix": "serverlessrepo", + "name": "ServerlessApplicationRepository" + }, "servicediscovery": { "name": "ServiceDiscovery" }, + "@aws-sdk/client-servicediscovery": { + "name": "ServiceDiscovery" + }, "workmail": { "name": "WorkMail" }, + "@aws-sdk/client-workmail": { + "name": "WorkMail" + }, "autoscalingplans": { "prefix": "autoscaling-plans", "name": "AutoScalingPlans" }, + "@aws-sdk/client-auto-scaling-plans": { + "prefix": "autoscaling-plans", + "name": "AutoScalingPlans" + }, "transcribeservice": { "prefix": "transcribe", "name": "TranscribeService" }, + "@aws-sdk/client-transcribe": { + "prefix": "transcribe", + "name": "TranscribeService" + }, "connect": { "name": "Connect", "cors": true }, + "@aws-sdk/client-connect": { + "name": "Connect", + "cors": true + }, "acmpca": { "prefix": "acm-pca", "name": "ACMPCA" }, + "@aws-sdk/client-acm-pca": { + "prefix": "acm-pca", + "name": "ACMPCA" + }, "fms": { "name": "FMS" }, + "@aws-sdk/client-fms": { + "name": "FMS" + }, "secretsmanager": { "name": "SecretsManager", "cors": true }, + "@aws-sdk/client-secrets-manager": { + "name": "SecretsManager", + "cors": true + }, "iotanalytics": { "name": "IoTAnalytics", "cors": true }, + "@aws-sdk/client-iotanalytics": { + "name": "IoTAnalytics", + "cors": true + }, "iot1clickdevicesservice": { "prefix": "iot1click-devices", "name": "IoT1ClickDevicesService" }, + "@aws-sdk/client-iot-1click-devices-service": { + "prefix": "iot1click-devices", + "name": "IoT1ClickDevicesService" + }, "iot1clickprojects": { "prefix": "iot1click-projects", "name": "IoT1ClickProjects" }, + "@aws-sdk/client-iot-1click-projects": { + "prefix": "iot1click-projects", + "name": "IoT1ClickProjects" + }, "pi": { "name": "PI" }, + "@aws-sdk/client-pi": { + "name": "PI" + }, "neptune": { "name": "Neptune" }, + "@aws-sdk/client-neptune": { + "name": "Neptune" + }, "mediatailor": { "name": "MediaTailor" }, + "@aws-sdk/client-mediatailor": { + "name": "MediaTailor" + }, "eks": { "name": "EKS" }, + "@aws-sdk/client-eks": { + "name": "EKS" + }, "macie": { "name": "Macie" }, + "@aws-sdk/client-macie": { + "name": "Macie" + }, "dlm": { "name": "DLM" }, + "@aws-sdk/client-dlm": { + "name": "DLM" + }, "signer": { "name": "Signer" }, + "@aws-sdk/client-signer": { + "name": "Signer" + }, "chime": { "name": "Chime" }, + "@aws-sdk/client-chime": { + "name": "Chime" + }, "pinpointemail": { "prefix": "pinpoint-email", "name": "PinpointEmail" }, + "@aws-sdk/client-pinpoint-email": { + "prefix": "pinpoint-email", + "name": "PinpointEmail" + }, "ram": { "name": "RAM" }, + "@aws-sdk/client-ram": { + "name": "RAM" + }, "route53resolver": { "name": "Route53Resolver" }, + "@aws-sdk/client-route53resolver": { + "name": "Route53Resolver" + }, "pinpointsmsvoice": { "prefix": "sms-voice", "name": "PinpointSMSVoice" }, + "@aws-sdk/client-pinpoint-sms-voice": { + "prefix": "sms-voice", + "name": "PinpointSMSVoice" + }, "quicksight": { "name": "QuickSight" }, + "@aws-sdk/client-quicksight": { + "name": "QuickSight" + }, "rdsdataservice": { "prefix": "rds-data", "name": "RDSDataService" }, + "@aws-sdk/client-rds-data": { + "prefix": "rds-data", + "name": "RDSDataService" + }, "amplify": { "name": "Amplify" }, + "@aws-sdk/client-amplify": { + "name": "Amplify" + }, "datasync": { "name": "DataSync" }, + "@aws-sdk/client-datasync": { + "name": "DataSync" + }, "robomaker": { "name": "RoboMaker" }, + "@aws-sdk/client-robomaker": { + "name": "RoboMaker" + }, "transfer": { "name": "Transfer" }, + "@aws-sdk/client-transfer": { + "name": "Transfer" + }, "globalaccelerator": { "name": "GlobalAccelerator" }, + "@aws-sdk/client-global-accelerator": { + "name": "GlobalAccelerator" + }, "comprehendmedical": { "name": "ComprehendMedical", "cors": true }, + "@aws-sdk/client-comprehendmedical": { + "name": "ComprehendMedical", + "cors": true + }, "kinesisanalyticsv2": { "name": "KinesisAnalyticsV2" }, + "@aws-sdk/client-kinesis-analytics-v2": { + "name": "KinesisAnalyticsV2" + }, "mediaconnect": { "name": "MediaConnect" }, + "@aws-sdk/client-mediaconnect": { + "name": "MediaConnect" + }, "fsx": { "name": "FSx" }, + "@aws-sdk/client-fsx": { + "name": "FSx" + }, "securityhub": { "name": "SecurityHub" }, + "@aws-sdk/client-securityhub": { + "name": "SecurityHub" + }, "appmesh": { "name": "AppMesh", "versions": [ "2018-10-01*" ] }, + "@aws-sdk/client-app-mesh": { + "name": "AppMesh", + "versions": [ + "2018-10-01*" + ] + }, "licensemanager": { "prefix": "license-manager", "name": "LicenseManager" }, + "@aws-sdk/client-license-manager": { + "prefix": "license-manager", + "name": "LicenseManager" + }, "kafka": { "name": "Kafka" }, + "@aws-sdk/client-kafka": { + "name": "Kafka" + }, "apigatewaymanagementapi": { "name": "ApiGatewayManagementApi" }, + "@aws-sdk/client-apigatewaymanagementapi": { + "name": "ApiGatewayManagementApi" + }, "apigatewayv2": { "name": "ApiGatewayV2" }, + "@aws-sdk/client-apigatewayv2": { + "name": "ApiGatewayV2" + }, "docdb": { "name": "DocDB" }, + "@aws-sdk/client-docdb": { + "name": "DocDB" + }, "backup": { "name": "Backup" }, + "@aws-sdk/client-backup": { + "name": "Backup" + }, "worklink": { "name": "WorkLink" }, + "@aws-sdk/client-worklink": { + "name": "WorkLink" + }, "textract": { "name": "Textract" }, + "@aws-sdk/client-textract": { + "name": "Textract" + }, "managedblockchain": { "name": "ManagedBlockchain" }, + "@aws-sdk/client-managedblockchain": { + "name": "ManagedBlockchain" + }, "mediapackagevod": { "prefix": "mediapackage-vod", "name": "MediaPackageVod" }, + "@aws-sdk/client-mediapackage-vod": { + "prefix": "mediapackage-vod", + "name": "MediaPackageVod" + }, "groundstation": { "name": "GroundStation" }, + "@aws-sdk/client-groundstation": { + "name": "GroundStation" + }, "iotthingsgraph": { "name": "IoTThingsGraph" }, + "@aws-sdk/client-iotthingsgraph": { + "name": "IoTThingsGraph" + }, "iotevents": { "name": "IoTEvents" }, + "@aws-sdk/client-iot-events": { + "name": "IoTEvents" + }, "ioteventsdata": { "prefix": "iotevents-data", "name": "IoTEventsData" }, + "@aws-sdk/client-iot-events-data": { + "prefix": "iotevents-data", + "name": "IoTEventsData" + }, "personalize": { "name": "Personalize", "cors": true }, + "@aws-sdk/client-personalize": { + "name": "Personalize", + "cors": true + }, "personalizeevents": { "prefix": "personalize-events", "name": "PersonalizeEvents", "cors": true }, + "@aws-sdk/client-personalize-events": { + "prefix": "personalize-events", + "name": "PersonalizeEvents", + "cors": true + }, "personalizeruntime": { "prefix": "personalize-runtime", "name": "PersonalizeRuntime", "cors": true }, + "@aws-sdk/client-personalize-runtime": { + "prefix": "personalize-runtime", + "name": "PersonalizeRuntime", + "cors": true + }, "applicationinsights": { "prefix": "application-insights", "name": "ApplicationInsights" }, + "@aws-sdk/client-application-insights": { + "prefix": "application-insights", + "name": "ApplicationInsights" + }, "servicequotas": { "prefix": "service-quotas", "name": "ServiceQuotas" }, + "@aws-sdk/client-service-quotas": { + "prefix": "service-quotas", + "name": "ServiceQuotas" + }, "ec2instanceconnect": { "prefix": "ec2-instance-connect", "name": "EC2InstanceConnect" }, + "@aws-sdk/client-ec2-instance-connect": { + "prefix": "ec2-instance-connect", + "name": "EC2InstanceConnect" + }, "eventbridge": { "name": "EventBridge" }, + "@aws-sdk/client-eventbridge": { + "name": "EventBridge" + }, "lakeformation": { "name": "LakeFormation" }, + "@aws-sdk/client-lakeformation": { + "name": "LakeFormation" + }, "forecastservice": { "prefix": "forecast", "name": "ForecastService", "cors": true }, + "@aws-sdk/client-forecast": { + "prefix": "forecast", + "name": "ForecastService", + "cors": true + }, "forecastqueryservice": { "prefix": "forecastquery", "name": "ForecastQueryService", "cors": true }, + "@aws-sdk/client-forecastquery": { + "prefix": "forecastquery", + "name": "ForecastQueryService", + "cors": true + }, "qldb": { "name": "QLDB" }, + "@aws-sdk/client-qldb": { + "name": "QLDB" + }, "qldbsession": { "prefix": "qldb-session", "name": "QLDBSession" }, + "@aws-sdk/client-qldb-session": { + "prefix": "qldb-session", + "name": "QLDBSession" + }, "workmailmessageflow": { "name": "WorkMailMessageFlow" }, + "@aws-sdk/client-workmailmessageflow": { + "name": "WorkMailMessageFlow" + }, "codestarnotifications": { "prefix": "codestar-notifications", "name": "CodeStarNotifications" }, + "@aws-sdk/client-codestar-notifications": { + "prefix": "codestar-notifications", + "name": "CodeStarNotifications" + }, "savingsplans": { "name": "SavingsPlans" }, + "@aws-sdk/client-savingsplans": { + "name": "SavingsPlans" + }, "sso": { "name": "SSO" }, + "@aws-sdk/client-sso": { + "name": "SSO" + }, "ssooidc": { "prefix": "sso-oidc", "name": "SSOOIDC" }, + "@aws-sdk/client-sso-oidc": { + "prefix": "sso-oidc", + "name": "SSOOIDC" + }, "marketplacecatalog": { "prefix": "marketplace-catalog", "name": "MarketplaceCatalog", "cors": true }, + "@aws-sdk/client-marketplace-catalog": { + "prefix": "marketplace-catalog", + "name": "MarketplaceCatalog", + "cors": true + }, "dataexchange": { "name": "DataExchange" }, + "@aws-sdk/client-dataexchange": { + "name": "DataExchange" + }, "sesv2": { "name": "SESV2" }, + "@aws-sdk/client-sesv2": { + "name": "SESV2" + }, "migrationhubconfig": { "prefix": "migrationhub-config", "name": "MigrationHubConfig" }, + "@aws-sdk/client-migrationhub-config": { + "prefix": "migrationhub-config", + "name": "MigrationHubConfig" + }, "connectparticipant": { "name": "ConnectParticipant" }, + "@aws-sdk/client-connectparticipant": { + "name": "ConnectParticipant" + }, "appconfig": { "name": "AppConfig" }, + "@aws-sdk/client-appconfig": { + "name": "AppConfig" + }, "iotsecuretunneling": { "name": "IoTSecureTunneling" }, + "@aws-sdk/client-iotsecuretunneling": { + "name": "IoTSecureTunneling" + }, "wafv2": { "name": "WAFV2" }, + "@aws-sdk/client-wafv2": { + "name": "WAFV2" + }, "elasticinference": { "prefix": "elastic-inference", "name": "ElasticInference" }, + "@aws-sdk/client-elastic-inference": { + "prefix": "elastic-inference", + "name": "ElasticInference" + }, "imagebuilder": { "name": "Imagebuilder" }, + "@aws-sdk/client-imagebuilder": { + "name": "Imagebuilder" + }, "schemas": { "name": "Schemas" }, + "@aws-sdk/client-schemas": { + "name": "Schemas" + }, "accessanalyzer": { "name": "AccessAnalyzer" }, + "@aws-sdk/client-accessanalyzer": { + "name": "AccessAnalyzer" + }, "codegurureviewer": { "prefix": "codeguru-reviewer", "name": "CodeGuruReviewer" }, + "@aws-sdk/client-codeguru-reviewer": { + "prefix": "codeguru-reviewer", + "name": "CodeGuruReviewer" + }, "codeguruprofiler": { "name": "CodeGuruProfiler" }, + "@aws-sdk/client-codeguruprofiler": { + "name": "CodeGuruProfiler" + }, "computeoptimizer": { "prefix": "compute-optimizer", "name": "ComputeOptimizer" }, + "@aws-sdk/client-compute-optimizer": { + "prefix": "compute-optimizer", + "name": "ComputeOptimizer" + }, "frauddetector": { "name": "FraudDetector" }, + "@aws-sdk/client-frauddetector": { + "name": "FraudDetector" + }, "kendra": { "name": "Kendra" }, + "@aws-sdk/client-kendra": { + "name": "Kendra" + }, "networkmanager": { "name": "NetworkManager" }, + "@aws-sdk/client-networkmanager": { + "name": "NetworkManager" + }, "outposts": { "name": "Outposts" }, + "@aws-sdk/client-outposts": { + "name": "Outposts" + }, "augmentedairuntime": { "prefix": "sagemaker-a2i-runtime", "name": "AugmentedAIRuntime" }, + "@aws-sdk/client-sage-maker-a2iruntime": { + "prefix": "sagemaker-a2i-runtime", + "name": "AugmentedAIRuntime" + }, "ebs": { "name": "EBS" }, + "@aws-sdk/client-ebs": { + "name": "EBS" + }, "kinesisvideosignalingchannels": { "prefix": "kinesis-video-signaling", "name": "KinesisVideoSignalingChannels", "cors": true }, + "@aws-sdk/client-kinesis-video-signaling": { + "prefix": "kinesis-video-signaling", + "name": "KinesisVideoSignalingChannels", + "cors": true + }, "detective": { "name": "Detective" }, + "@aws-sdk/client-detective": { + "name": "Detective" + }, "codestarconnections": { "prefix": "codestar-connections", "name": "CodeStarconnections" }, + "@aws-sdk/client-codestar-connections": { + "prefix": "codestar-connections", + "name": "CodeStarconnections" + }, "synthetics": { "name": "Synthetics" }, + "@aws-sdk/client-synthetics": { + "name": "Synthetics" + }, "iotsitewise": { "name": "IoTSiteWise" }, + "@aws-sdk/client-iotsitewise": { + "name": "IoTSiteWise" + }, "macie2": { "name": "Macie2" }, + "@aws-sdk/client-macie2": { + "name": "Macie2" + }, "codeartifact": { "name": "CodeArtifact" }, + "@aws-sdk/client-codeartifact": { + "name": "CodeArtifact" + }, "honeycode": { "name": "Honeycode" }, + "@aws-sdk/client-honeycode": { + "name": "Honeycode" + }, "ivs": { "name": "IVS" }, + "@aws-sdk/client-ivs": { + "name": "IVS" + }, "braket": { "name": "Braket" }, + "@aws-sdk/client-braket": { + "name": "Braket" + }, "identitystore": { "name": "IdentityStore" }, + "@aws-sdk/client-identitystore": { + "name": "IdentityStore" + }, "appflow": { "name": "Appflow" }, + "@aws-sdk/client-appflow": { + "name": "Appflow" + }, "redshiftdata": { "prefix": "redshift-data", "name": "RedshiftData" }, + "@aws-sdk/client-redshift-data": { + "prefix": "redshift-data", + "name": "RedshiftData" + }, "ssoadmin": { "prefix": "sso-admin", "name": "SSOAdmin" }, - "timestreamquery": { + "@aws-sdk/client-sso-admin": { + "prefix": "sso-admin", + "name": "SSOAdmin" + }, + "timestreamquery": { + "prefix": "timestream-query", + "name": "TimestreamQuery" + }, + "@aws-sdk/client-timestream-query": { "prefix": "timestream-query", "name": "TimestreamQuery" }, @@ -913,362 +1812,722 @@ "prefix": "timestream-write", "name": "TimestreamWrite" }, + "@aws-sdk/client-timestream-write": { + "prefix": "timestream-write", + "name": "TimestreamWrite" + }, "s3outposts": { "name": "S3Outposts" }, + "@aws-sdk/client-s3outposts": { + "name": "S3Outposts" + }, "databrew": { "name": "DataBrew" }, + "@aws-sdk/client-databrew": { + "name": "DataBrew" + }, "servicecatalogappregistry": { "prefix": "servicecatalog-appregistry", "name": "ServiceCatalogAppRegistry" }, + "@aws-sdk/client-service-catalog-appregistry": { + "prefix": "servicecatalog-appregistry", + "name": "ServiceCatalogAppRegistry" + }, "networkfirewall": { "prefix": "network-firewall", "name": "NetworkFirewall" }, + "@aws-sdk/client-network-firewall": { + "prefix": "network-firewall", + "name": "NetworkFirewall" + }, "mwaa": { "name": "MWAA" }, + "@aws-sdk/client-mwaa": { + "name": "MWAA" + }, "amplifybackend": { "name": "AmplifyBackend" }, + "@aws-sdk/client-amplifybackend": { + "name": "AmplifyBackend" + }, "appintegrations": { "name": "AppIntegrations" }, + "@aws-sdk/client-appintegrations": { + "name": "AppIntegrations" + }, "connectcontactlens": { "prefix": "connect-contact-lens", "name": "ConnectContactLens" }, + "@aws-sdk/client-connect-contact-lens": { + "prefix": "connect-contact-lens", + "name": "ConnectContactLens" + }, "devopsguru": { "prefix": "devops-guru", "name": "DevOpsGuru" }, + "@aws-sdk/client-devops-guru": { + "prefix": "devops-guru", + "name": "DevOpsGuru" + }, "ecrpublic": { "prefix": "ecr-public", "name": "ECRPUBLIC" }, + "@aws-sdk/client-ecr-public": { + "prefix": "ecr-public", + "name": "ECRPUBLIC" + }, "lookoutvision": { "name": "LookoutVision" }, + "@aws-sdk/client-lookoutvision": { + "name": "LookoutVision" + }, "sagemakerfeaturestoreruntime": { "prefix": "sagemaker-featurestore-runtime", "name": "SageMakerFeatureStoreRuntime" }, + "@aws-sdk/client-sagemaker-featurestore-runtime": { + "prefix": "sagemaker-featurestore-runtime", + "name": "SageMakerFeatureStoreRuntime" + }, "customerprofiles": { "prefix": "customer-profiles", "name": "CustomerProfiles" }, + "@aws-sdk/client-customer-profiles": { + "prefix": "customer-profiles", + "name": "CustomerProfiles" + }, "auditmanager": { "name": "AuditManager" }, + "@aws-sdk/client-auditmanager": { + "name": "AuditManager" + }, "emrcontainers": { "prefix": "emr-containers", "name": "EMRcontainers" }, + "@aws-sdk/client-emr-containers": { + "prefix": "emr-containers", + "name": "EMRcontainers" + }, "healthlake": { "name": "HealthLake" }, + "@aws-sdk/client-healthlake": { + "name": "HealthLake" + }, "sagemakeredge": { "prefix": "sagemaker-edge", "name": "SagemakerEdge" }, + "@aws-sdk/client-sagemaker-edge": { + "prefix": "sagemaker-edge", + "name": "SagemakerEdge" + }, "amp": { "name": "Amp", "cors": true }, + "@aws-sdk/client-amp": { + "name": "Amp", + "cors": true + }, "greengrassv2": { "name": "GreengrassV2" }, + "@aws-sdk/client-greengrassv2": { + "name": "GreengrassV2" + }, "iotdeviceadvisor": { "name": "IotDeviceAdvisor" }, + "@aws-sdk/client-iotdeviceadvisor": { + "name": "IotDeviceAdvisor" + }, "iotfleethub": { "name": "IoTFleetHub" }, + "@aws-sdk/client-iotfleethub": { + "name": "IoTFleetHub" + }, "iotwireless": { "name": "IoTWireless" }, + "@aws-sdk/client-iot-wireless": { + "name": "IoTWireless" + }, "location": { "name": "Location", "cors": true }, + "@aws-sdk/client-location": { + "name": "Location", + "cors": true + }, "wellarchitected": { "name": "WellArchitected" }, + "@aws-sdk/client-wellarchitected": { + "name": "WellArchitected" + }, "lexmodelsv2": { "prefix": "models.lex.v2", "name": "LexModelsV2" }, + "@aws-sdk/client-lex-models-v2": { + "prefix": "models.lex.v2", + "name": "LexModelsV2" + }, "lexruntimev2": { "prefix": "runtime.lex.v2", "name": "LexRuntimeV2", "cors": true }, + "@aws-sdk/client-lex-runtime-v2": { + "prefix": "runtime.lex.v2", + "name": "LexRuntimeV2", + "cors": true + }, "fis": { "name": "Fis" }, + "@aws-sdk/client-fis": { + "name": "Fis" + }, "lookoutmetrics": { "name": "LookoutMetrics" }, + "@aws-sdk/client-lookoutmetrics": { + "name": "LookoutMetrics" + }, "mgn": { "name": "Mgn" }, + "@aws-sdk/client-mgn": { + "name": "Mgn" + }, "lookoutequipment": { "name": "LookoutEquipment" }, + "@aws-sdk/client-lookoutequipment": { + "name": "LookoutEquipment" + }, "nimble": { "name": "Nimble" }, + "@aws-sdk/client-nimble": { + "name": "Nimble" + }, "finspace": { "name": "Finspace" }, + "@aws-sdk/client-finspace": { + "name": "Finspace" + }, "finspacedata": { "prefix": "finspace-data", "name": "Finspacedata" }, + "@aws-sdk/client-finspace-data": { + "prefix": "finspace-data", + "name": "Finspacedata" + }, "ssmcontacts": { "prefix": "ssm-contacts", "name": "SSMContacts" }, + "@aws-sdk/client-ssm-contacts": { + "prefix": "ssm-contacts", + "name": "SSMContacts" + }, "ssmincidents": { "prefix": "ssm-incidents", "name": "SSMIncidents" }, + "@aws-sdk/client-ssm-incidents": { + "prefix": "ssm-incidents", + "name": "SSMIncidents" + }, "applicationcostprofiler": { "name": "ApplicationCostProfiler" }, + "@aws-sdk/client-applicationcostprofiler": { + "name": "ApplicationCostProfiler" + }, "apprunner": { "name": "AppRunner" }, + "@aws-sdk/client-apprunner": { + "name": "AppRunner" + }, "proton": { "name": "Proton" }, + "@aws-sdk/client-proton": { + "name": "Proton" + }, "route53recoverycluster": { "prefix": "route53-recovery-cluster", "name": "Route53RecoveryCluster" }, + "@aws-sdk/client-route53-recovery-cluster": { + "prefix": "route53-recovery-cluster", + "name": "Route53RecoveryCluster" + }, "route53recoverycontrolconfig": { "prefix": "route53-recovery-control-config", "name": "Route53RecoveryControlConfig" }, + "@aws-sdk/client-route53-recovery-control-config": { + "prefix": "route53-recovery-control-config", + "name": "Route53RecoveryControlConfig" + }, "route53recoveryreadiness": { "prefix": "route53-recovery-readiness", "name": "Route53RecoveryReadiness" }, + "@aws-sdk/client-route53-recovery-readiness": { + "prefix": "route53-recovery-readiness", + "name": "Route53RecoveryReadiness" + }, "chimesdkidentity": { "prefix": "chime-sdk-identity", "name": "ChimeSDKIdentity" }, + "@aws-sdk/client-chime-sdk-identity": { + "prefix": "chime-sdk-identity", + "name": "ChimeSDKIdentity" + }, "chimesdkmessaging": { "prefix": "chime-sdk-messaging", "name": "ChimeSDKMessaging" }, + "@aws-sdk/client-chime-sdk-messaging": { + "prefix": "chime-sdk-messaging", + "name": "ChimeSDKMessaging" + }, "snowdevicemanagement": { "prefix": "snow-device-management", "name": "SnowDeviceManagement" }, + "@aws-sdk/client-snow-device-management": { + "prefix": "snow-device-management", + "name": "SnowDeviceManagement" + }, "memorydb": { "name": "MemoryDB" }, + "@aws-sdk/client-memory-db": { + "name": "MemoryDB" + }, "opensearch": { "name": "OpenSearch" }, + "@aws-sdk/client-opensearch": { + "name": "OpenSearch" + }, "kafkaconnect": { "name": "KafkaConnect" }, + "@aws-sdk/client-kafkaconnect": { + "name": "KafkaConnect" + }, "voiceid": { "prefix": "voice-id", "name": "VoiceID" }, + "@aws-sdk/client-voice-id": { + "prefix": "voice-id", + "name": "VoiceID" + }, "wisdom": { "name": "Wisdom" }, + "@aws-sdk/client-wisdom": { + "name": "Wisdom" + }, "account": { "name": "Account" }, + "@aws-sdk/client-account": { + "name": "Account" + }, "cloudcontrol": { "name": "CloudControl" }, + "@aws-sdk/client-cloudcontrol": { + "name": "CloudControl" + }, "grafana": { "name": "Grafana" }, + "@aws-sdk/client-grafana": { + "name": "Grafana" + }, "panorama": { "name": "Panorama" }, + "@aws-sdk/client-panorama": { + "name": "Panorama" + }, "chimesdkmeetings": { "prefix": "chime-sdk-meetings", "name": "ChimeSDKMeetings" }, + "@aws-sdk/client-chime-sdk-meetings": { + "prefix": "chime-sdk-meetings", + "name": "ChimeSDKMeetings" + }, "resiliencehub": { "name": "Resiliencehub" }, + "@aws-sdk/client-resiliencehub": { + "name": "Resiliencehub" + }, "migrationhubstrategy": { "name": "MigrationHubStrategy" }, + "@aws-sdk/client-migrationhubstrategy": { + "name": "MigrationHubStrategy" + }, "appconfigdata": { "name": "AppConfigData" }, + "@aws-sdk/client-appconfigdata": { + "name": "AppConfigData" + }, "drs": { "name": "Drs" }, + "@aws-sdk/client-drs": { + "name": "Drs" + }, "migrationhubrefactorspaces": { "prefix": "migration-hub-refactor-spaces", "name": "MigrationHubRefactorSpaces" }, + "@aws-sdk/client-migration-hub-refactor-spaces": { + "prefix": "migration-hub-refactor-spaces", + "name": "MigrationHubRefactorSpaces" + }, "evidently": { "name": "Evidently" }, + "@aws-sdk/client-evidently": { + "name": "Evidently" + }, "inspector2": { "name": "Inspector2" }, + "@aws-sdk/client-inspector2": { + "name": "Inspector2" + }, "rbin": { "name": "Rbin" }, + "@aws-sdk/client-rbin": { + "name": "Rbin" + }, "rum": { "name": "RUM" }, + "@aws-sdk/client-rum": { + "name": "RUM" + }, "backupgateway": { "prefix": "backup-gateway", "name": "BackupGateway" }, + "@aws-sdk/client-backup-gateway": { + "prefix": "backup-gateway", + "name": "BackupGateway" + }, "iottwinmaker": { "name": "IoTTwinMaker" }, + "@aws-sdk/client-iottwinmaker": { + "name": "IoTTwinMaker" + }, "workspacesweb": { "prefix": "workspaces-web", "name": "WorkSpacesWeb" }, + "@aws-sdk/client-workspaces-web": { + "prefix": "workspaces-web", + "name": "WorkSpacesWeb" + }, "amplifyuibuilder": { "name": "AmplifyUIBuilder" }, + "@aws-sdk/client-amplifyuibuilder": { + "name": "AmplifyUIBuilder" + }, "keyspaces": { "name": "Keyspaces" }, + "@aws-sdk/client-keyspaces": { + "name": "Keyspaces" + }, "billingconductor": { "name": "Billingconductor" }, + "@aws-sdk/client-billingconductor": { + "name": "Billingconductor" + }, "gamesparks": { "name": "GameSparks" }, + "@aws-sdk/client-gamesparks": { + "name": "GameSparks" + }, "pinpointsmsvoicev2": { "prefix": "pinpoint-sms-voice-v2", "name": "PinpointSMSVoiceV2" }, + "@aws-sdk/client-pinpoint-sms-voice-v2": { + "prefix": "pinpoint-sms-voice-v2", + "name": "PinpointSMSVoiceV2" + }, "ivschat": { "name": "Ivschat" }, + "@aws-sdk/client-ivschat": { + "name": "Ivschat" + }, "chimesdkmediapipelines": { "prefix": "chime-sdk-media-pipelines", "name": "ChimeSDKMediaPipelines" }, + "@aws-sdk/client-chime-sdk-media-pipelines": { + "prefix": "chime-sdk-media-pipelines", + "name": "ChimeSDKMediaPipelines" + }, "emrserverless": { "prefix": "emr-serverless", "name": "EMRServerless" }, + "@aws-sdk/client-emr-serverless": { + "prefix": "emr-serverless", + "name": "EMRServerless" + }, "m2": { "name": "M2" }, + "@aws-sdk/client-m2": { + "name": "M2" + }, "connectcampaigns": { "name": "ConnectCampaigns" }, + "@aws-sdk/client-connectcampaigns": { + "name": "ConnectCampaigns" + }, "redshiftserverless": { "prefix": "redshift-serverless", "name": "RedshiftServerless" }, + "@aws-sdk/client-redshift-serverless": { + "prefix": "redshift-serverless", + "name": "RedshiftServerless" + }, "rolesanywhere": { "name": "RolesAnywhere" }, + "@aws-sdk/client-rolesanywhere": { + "name": "RolesAnywhere" + }, "licensemanagerusersubscriptions": { "prefix": "license-manager-user-subscriptions", "name": "LicenseManagerUserSubscriptions" }, + "@aws-sdk/client-license-manager-user-subscriptions": { + "prefix": "license-manager-user-subscriptions", + "name": "LicenseManagerUserSubscriptions" + }, "backupstorage": { "name": "BackupStorage" }, + "@aws-sdk/client-backupstorage": { + "name": "BackupStorage" + }, "privatenetworks": { "name": "PrivateNetworks" }, + "@aws-sdk/client-privatenetworks": { + "name": "PrivateNetworks" + }, "supportapp": { "prefix": "support-app", "name": "SupportApp" }, + "@aws-sdk/client-support-app": { + "prefix": "support-app", + "name": "SupportApp" + }, "controltower": { "name": "ControlTower" }, + "@aws-sdk/client-controltower": { + "name": "ControlTower" + }, "iotfleetwise": { "name": "IoTFleetWise" }, + "@aws-sdk/client-iotfleetwise": { + "name": "IoTFleetWise" + }, "migrationhuborchestrator": { "name": "MigrationHubOrchestrator" }, + "@aws-sdk/client-migrationhuborchestrator": { + "name": "MigrationHubOrchestrator" + }, "connectcases": { "name": "ConnectCases" }, + "@aws-sdk/client-connectcases": { + "name": "ConnectCases" + }, "resourceexplorer2": { "prefix": "resource-explorer-2", "name": "ResourceExplorer2" }, + "@aws-sdk/client-resource-explorer-2": { + "prefix": "resource-explorer-2", + "name": "ResourceExplorer2" + }, "scheduler": { "name": "Scheduler" }, + "@aws-sdk/client-scheduler": { + "name": "Scheduler" + }, "chimesdkvoice": { "prefix": "chime-sdk-voice", "name": "ChimeSDKVoice" }, + "@aws-sdk/client-chime-sdk-voice": { + "prefix": "chime-sdk-voice", + "name": "ChimeSDKVoice" + }, "iotroborunner": { "prefix": "iot-roborunner", "name": "IoTRoboRunner" }, + "@aws-sdk/client-iot-roborunner": { + "prefix": "iot-roborunner", + "name": "IoTRoboRunner" + }, "ssmsap": { "prefix": "ssm-sap", "name": "SsmSap" }, + "@aws-sdk/client-ssm-sap": { + "prefix": "ssm-sap", + "name": "SsmSap" + }, "oam": { "name": "OAM" }, + "@aws-sdk/client-oam": { + "name": "OAM" + }, "arczonalshift": { "prefix": "arc-zonal-shift", "name": "ARCZonalShift" }, + "@aws-sdk/client-arc-zonal-shift": { + "prefix": "arc-zonal-shift", + "name": "ARCZonalShift" + }, "omics": { "name": "Omics" }, + "@aws-sdk/client-omics": { + "name": "Omics" + }, "opensearchserverless": { "name": "OpenSearchServerless" }, + "@aws-sdk/client-opensearchserverless": { + "name": "OpenSearchServerless" + }, "securitylake": { "name": "SecurityLake" }, + "@aws-sdk/client-securitylake": { + "name": "SecurityLake" + }, "simspaceweaver": { "name": "SimSpaceWeaver" }, + "@aws-sdk/client-simspaceweaver": { + "name": "SimSpaceWeaver" + }, "docdbelastic": { "prefix": "docdb-elastic", "name": "DocDBElastic" }, + "@aws-sdk/client-docdb-elastic": { + "prefix": "docdb-elastic", + "name": "DocDBElastic" + }, "sagemakergeospatial": { "prefix": "sagemaker-geospatial", "name": "SageMakerGeospatial" }, + "@aws-sdk/client-sagemaker-geospatial": { + "prefix": "sagemaker-geospatial", + "name": "SageMakerGeospatial" + }, "codecatalyst": { "name": "CodeCatalyst" }, + "@aws-sdk/client-codecatalyst": { + "name": "CodeCatalyst" + }, "pipes": { "name": "Pipes" }, + "@aws-sdk/client-pipes": { + "name": "Pipes" + }, "sagemakermetrics": { "prefix": "sagemaker-metrics", "name": "SageMakerMetrics" }, + "@aws-sdk/client-sagemaker-metrics": { + "prefix": "sagemaker-metrics", + "name": "SageMakerMetrics" + }, "kinesisvideowebrtcstorage": { "prefix": "kinesis-video-webrtc-storage", "name": "KinesisVideoWebRTCStorage" }, + "@aws-sdk/client-kinesis-video-webrtc-storage": { + "prefix": "kinesis-video-webrtc-storage", + "name": "KinesisVideoWebRTCStorage" + }, "licensemanagerlinuxsubscriptions": { "prefix": "license-manager-linux-subscriptions", "name": "LicenseManagerLinuxSubscriptions" }, + "@aws-sdk/client-license-manager-linux-subscriptions": { + "prefix": "license-manager-linux-subscriptions", + "name": "LicenseManagerLinuxSubscriptions" + }, "kendraranking": { "prefix": "kendra-ranking", "name": "KendraRanking" diff --git a/packages/aws-cdk-lib/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts b/packages/aws-cdk-lib/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts index d81086f182b29..65938fb9d581c 100644 --- a/packages/aws-cdk-lib/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts +++ b/packages/aws-cdk-lib/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts @@ -677,6 +677,64 @@ test('can use existing role', () => { Template.fromStack(stack).resourceCountIs('AWS::IAM::Role', 0); }); +test('AWS SDK V3 format included in API metadata can use fromSdkCalls', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new AwsCustomResource(stack, 'AwsSdk', { + onCreate: { + service: '@aws-sdk/client-cloudwatch-logs', + action: 'PutRetentionPolicyCommand', + physicalResourceId: PhysicalResourceId.of('id'), + }, + policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }), + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + 'PolicyDocument': { + 'Statement': [ + { + 'Action': 'logs:PutRetentionPolicy', + 'Effect': 'Allow', + 'Resource': '*', + }, + ], + 'Version': '2012-10-17', + }, + }); +}); + +test('AWS SDK V3 format not included in API metadata can use fromSdkCalls', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new AwsCustomResource(stack, 'AwsSdk', { + onCreate: { + service: '@aws-sdk/client-example-service', + action: 'CreateExampleCommand', + physicalResourceId: PhysicalResourceId.of('id'), + }, + policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }), + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + 'PolicyDocument': { + 'Statement': [ + { + 'Action': 'example-service:CreateExample', + 'Effect': 'Allow', + 'Resource': '*', + }, + ], + 'Version': '2012-10-17', + }, + }); +}); + test('getData', () => { // GIVEN const stack = new cdk.Stack(); diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index e2786c2a7fe90..fcc018447f841 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -33,7 +33,7 @@ "compressAssembly": true, "pre": [ "ts-node -P tsconfig.dev.json region-info/build-tools/generate-static-data.ts", - "(cp -f $(node -p 'require.resolve(\"aws-sdk/apis/metadata.json\")') custom-resources/lib/aws-custom-resource/sdk-api-metadata.json && rm -rf custom-resources/test/aws-custom-resource/cdk.out)", + "(ts-node -P tsconfig.dev.json ./scripts/gen-sdk-v3-support-api-metadata.ts custom-resources/lib/aws-custom-resource/sdk-api-metadata.json && rm -rf custom-resources/test/aws-custom-resource/cdk.out)", "(rm -rf core/test/fs/fixtures && cd core/test/fs && tar -xzf fixtures.tar.gz)", "(rm -rf assets/test/fs/fixtures && cd assets/test/fs && tar -xzvf fixtures.tar.gz)", "./scripts/airlift-custom-resource-handlers.sh" diff --git a/packages/aws-cdk-lib/scripts/gen-sdk-v3-support-api-metadata.ts b/packages/aws-cdk-lib/scripts/gen-sdk-v3-support-api-metadata.ts new file mode 100644 index 0000000000000..2d3414d605311 --- /dev/null +++ b/packages/aws-cdk-lib/scripts/gen-sdk-v3-support-api-metadata.ts @@ -0,0 +1,22 @@ +import * as fs from 'node:fs'; +import * as path from 'node:path'; +import { getV3ClientPackageName } from '@aws-cdk/sdk-v2-to-v3-adapter'; +import * as sdkMetadata from 'aws-sdk/apis/metadata.json'; + +const outputPath = process.argv[2]; +const awsSdkV3SupportMetadata = Object.entries(sdkMetadata).reduce((acc, [v2Name, metadata]) => { + try { + // if getV3ClientPackageName was provided unknown service then it throw error + return { + ...acc, + [v2Name]: metadata, + [getV3ClientPackageName(metadata.name)]: metadata, + }; + } catch (error) { + return { + ...acc, + [v2Name]: metadata, + }; + }; +}, {}); +fs.writeFileSync(path.resolve(__dirname, '../', outputPath), JSON.stringify(awsSdkV3SupportMetadata, null, 2)); \ No newline at end of file