Skip to content

Commit 54c01cb

Browse files
authored
feat(s3-deployment): added property outputObjectKeys for BucketDeployment (#31452)
### Issue # (if applicable) Closes #28579 ### Reason for this change The [CR lambda](https://github.com/aws/aws-cdk/blob/597228c1552a21f8dc7250a0be62160f838bb776/packages/%40aws-cdk/custom-resource-handlers/lib/aws-s3-deployment/bucket-deployment-handler/index.py#L138C14-L138C30) is essentially sending back the same data in the response which is hitting the limit for close to 50 object uploads. Particularly this is being a limitation when using servicecatalog.ProductStack, if there are local assets beyond a particular number, the Custom::CDKBucketDeployment would fail with the error Response object is too long which is a hard limit of 4096 bytes. ### Description of changes 1. Added a new property to control the custom resource sending large data and hitting the 4096 bytes limit even though the deployment operation is successful. 2. The property `outputObjectKeys` has been set to false by default for the service catalog product so that the error does not occur. ### Description of how you validated changes Validated using a sample stack with the property set and confirmed the behavior. Also, the existing deployments would be unaffected. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 8318e79 commit 54c01cb

File tree

308 files changed

+118863
-80153
lines changed

Some content is hidden

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

308 files changed

+118863
-80153
lines changed

Diff for: .gitattributes

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
# Set the default behavior, in case people don't have core.autocrlf set.
22
* text=auto
3-
43
# Currently, this repository has LF dependencies in building and testing, with json, sh, and no extensions.
54
# Until this is fixed, it is best to just set the whole repository to be LF.
65
* eol=lf
7-
86
*.gif binary
97
*.zip binary
108
*.png binary
119
*.jpg binary
1210
*.tgz binary
1311
*.tar.gz binary
14-
1512
# Hide snapshots from GitHub UI, except for the actual templates
1613
**/*.snapshot/** linguist-generated
1714
**/*.snapshot/**/*.template.json -linguist-generated
1815
**/*.snapshot/**/*DeployAssert*.template.json linguist-generated
16+
packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-big-response.js.snapshot/asset.3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip filter=lfs diff=lfs merge=lfs -text

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/appconfigconfigurationDefaultTestDeployAssert6752CD38.assets.json

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

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/aws-appconfig-configuration.assets.json

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

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/aws-appconfig-configuration.template.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@
780780
"Ref": "MyBucketF68F3FF0"
781781
},
782782
"RetainOnDelete": false,
783-
"Prune": true
783+
"Prune": true,
784+
"OutputObjectKeys": true
784785
},
785786
"UpdateReplacePolicy": "Delete",
786787
"DeletionPolicy": "Delete"
@@ -917,7 +918,7 @@
917918
"S3Bucket": {
918919
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
919920
},
920-
"S3Key": "0158f40002a8c211635388a87874fd4dcc3d68f525fe08a0fe0f014069ae539c.zip"
921+
"S3Key": "c6358465bf49dfae556bb430bf9c81fa578c221b82c308e3707901b1dd654762.zip"
921922
},
922923
"Environment": {
923924
"Variables": {

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/cdk.out

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

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/integ.json

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

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/manifest.json

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

Diff for: packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.js.snapshot/tree.json

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

0 commit comments

Comments
 (0)