Skip to content

Commit 8e21b2c

Browse files
authored
fix(custom-resources): does not accept strings where numbers are expected, skips recursive types (#27112)
AWS SDK v3 strictly validates numeric types, as opposed to v2, which allowed, for example, "123" to be passed where an integer was expected. This script adds all attributes of a numeric type ("byte", "short", "integer", "long", "bigInteger", "float", "double" and "bigDecimal") to a new type coercion map. It also compacts the map by trimming each part of the path to its unique prefix among all the paths in its operation. We also change the data structure from a list of paths (forming a tree) to a graph/state machine. This is necessary in order to support self-recursive types, which can loop arbitrarily and therefore cannot be represented in fixed length prefix lists. See aws/aws-sdk-js-v3#5198 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 06ff205 commit 8e21b2c

File tree

330 files changed

+66957
-80052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+66957
-80052
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/lambda/integ.deployment-config.js.snapshot/asset.51fc32183f8be2ed4acc5164067a61d6763acbd372aeba432deb95b9ac5b5038/index.js

-1
This file was deleted.

packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/lambda/integ.deployment-config.js.snapshot/asset.e5178afc49b7c6a85127a67856ce958e4f0879ce6aad5e974cac2a088bf939db/index.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/lambda/integ.deployment-config.js.snapshot/aws-cdk-codedeploy-lambda-config.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"version": "34.0.0",
33
"files": {
4-
"51fc32183f8be2ed4acc5164067a61d6763acbd372aeba432deb95b9ac5b5038": {
4+
"e5178afc49b7c6a85127a67856ce958e4f0879ce6aad5e974cac2a088bf939db": {
55
"source": {
6-
"path": "asset.51fc32183f8be2ed4acc5164067a61d6763acbd372aeba432deb95b9ac5b5038",
6+
"path": "asset.e5178afc49b7c6a85127a67856ce958e4f0879ce6aad5e974cac2a088bf939db",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "51fc32183f8be2ed4acc5164067a61d6763acbd372aeba432deb95b9ac5b5038.zip",
12+
"objectKey": "e5178afc49b7c6a85127a67856ce958e4f0879ce6aad5e974cac2a088bf939db.zip",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}
1616
},
17-
"16fed48cbbc3528cf00b892da3cd8fe72007a0ef4c7adff2fd8fdfb9c7bf0d5d": {
17+
"9fe810257cfcfa9ad36b78a24f4bde21cc92a5fbc22ce909ea3b65b8244fda08": {
1818
"source": {
1919
"path": "aws-cdk-codedeploy-lambda-config.template.json",
2020
"packaging": "file"
2121
},
2222
"destinations": {
2323
"current_account-current_region": {
2424
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25-
"objectKey": "16fed48cbbc3528cf00b892da3cd8fe72007a0ef4c7adff2fd8fdfb9c7bf0d5d.json",
25+
"objectKey": "9fe810257cfcfa9ad36b78a24f4bde21cc92a5fbc22ce909ea3b65b8244fda08.json",
2626
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2727
}
2828
}

packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/lambda/integ.deployment-config.js.snapshot/aws-cdk-codedeploy-lambda-config.template.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@
9595
"S3Bucket": {
9696
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
9797
},
98-
"S3Key": "51fc32183f8be2ed4acc5164067a61d6763acbd372aeba432deb95b9ac5b5038.zip"
98+
"S3Key": "e5178afc49b7c6a85127a67856ce958e4f0879ce6aad5e974cac2a088bf939db.zip"
9999
},
100100
"Handler": "index.handler",
101+
"MemorySize": 256,
101102
"Role": {
102103
"Fn::GetAtt": [
103104
"AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2",

packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/lambda/integ.deployment-config.js.snapshot/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/16fed48cbbc3528cf00b892da3cd8fe72007a0ef4c7adff2fd8fdfb9c7bf0d5d.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9fe810257cfcfa9ad36b78a24f4bde21cc92a5fbc22ce909ea3b65b8244fda08.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [

packages/@aws-cdk-testing/framework-integ/test/aws-codedeploy/test/lambda/integ.deployment-config.js.snapshot/tree.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,10 @@
224224
"s3Bucket": {
225225
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
226226
},
227-
"s3Key": "51fc32183f8be2ed4acc5164067a61d6763acbd372aeba432deb95b9ac5b5038.zip"
227+
"s3Key": "e5178afc49b7c6a85127a67856ce958e4f0879ce6aad5e974cac2a088bf939db.zip"
228228
},
229229
"handler": "index.handler",
230+
"memorySize": 256,
230231
"role": {
231232
"Fn::GetAtt": [
232233
"AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2",

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/asset.5009f77d2e9161f4799d4facb1cb8859134a40234014484b4911e924c169c9cb/aws-sdk-v2-handler/index.js

-161
This file was deleted.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/asset.5009f77d2e9161f4799d4facb1cb8859134a40234014484b4911e924c169c9cb/aws-sdk-v3-handler/index.js

-139
This file was deleted.

packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/asset.5009f77d2e9161f4799d4facb1cb8859134a40234014484b4911e924c169c9cb/aws-sdk-v3-handler/v2-to-v3/client-names-map.js

-35
This file was deleted.

0 commit comments

Comments
 (0)