Skip to content

Commit 4bdb18e

Browse files
authored
feat: lambda-layer-awscli): depend on @awscdk/asset-awscli-v1 and reduce aws-cdk-lib size (#22823)
This PR reduces the size of aws-cdk-lib by 13.9 MB, by extracting the lambda-layer-awscli/lib/layer.zip file to a separate package that aws-cdk-lib will directly depend on. This change also reduce the complexity of the build in the aws-cdk repo because the process of building the layer.zip inside of a Docker container has also been extracted to the separate package. See https://github.com/cdklabs/awscdk-asset-awscli/tree/main ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent cc43ea3 commit 4bdb18e

File tree

95 files changed

+607
-366
lines changed

Some content is hidden

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

95 files changed

+607
-366
lines changed

packages/@aws-cdk/aws-eks/test/integ.alb-controller.js.snapshot/aws-cdk-eks-cluster-alb-controller-test.assets.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
}
6767
}
6868
},
69-
"c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc": {
69+
"5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510": {
7070
"source": {
71-
"path": "asset.c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc.zip",
71+
"path": "asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip",
7272
"packaging": "file"
7373
},
7474
"destinations": {
7575
"current_account-current_region": {
7676
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
77-
"objectKey": "c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc.zip",
77+
"objectKey": "5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip",
7878
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
7979
}
8080
}
@@ -131,28 +131,28 @@
131131
}
132132
}
133133
},
134-
"420d40fdc46ce5f130bd0ca21b943c124e3bb08c3d220a240d7e63832e92e896": {
134+
"6f980d09d47a00a7d5001feeb3994d1909bc5294e309d69bd4fbc815622f6fa9": {
135135
"source": {
136136
"path": "awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json",
137137
"packaging": "file"
138138
},
139139
"destinations": {
140140
"current_account-current_region": {
141141
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
142-
"objectKey": "420d40fdc46ce5f130bd0ca21b943c124e3bb08c3d220a240d7e63832e92e896.json",
142+
"objectKey": "6f980d09d47a00a7d5001feeb3994d1909bc5294e309d69bd4fbc815622f6fa9.json",
143143
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
144144
}
145145
}
146146
},
147-
"f3eba6cb551a4cebac702fc5ec6ebc0499f92cd8e320084381c8d95a951de769": {
147+
"f71f354caa16ee08ec386f0b1d28987f1185cf0ad81e7336e68fc21b186e67fc": {
148148
"source": {
149149
"path": "aws-cdk-eks-cluster-alb-controller-test.template.json",
150150
"packaging": "file"
151151
},
152152
"destinations": {
153153
"current_account-current_region": {
154154
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
155-
"objectKey": "f3eba6cb551a4cebac702fc5ec6ebc0499f92cd8e320084381c8d95a951de769.json",
155+
"objectKey": "f71f354caa16ee08ec386f0b1d28987f1185cf0ad81e7336e68fc21b186e67fc.json",
156156
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
157157
}
158158
}

packages/@aws-cdk/aws-eks/test/integ.alb-controller.js.snapshot/aws-cdk-eks-cluster-alb-controller-test.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@
10201020
{
10211021
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
10221022
},
1023-
"/420d40fdc46ce5f130bd0ca21b943c124e3bb08c3d220a240d7e63832e92e896.json"
1023+
"/6f980d09d47a00a7d5001feeb3994d1909bc5294e309d69bd4fbc815622f6fa9.json"
10241024
]
10251025
]
10261026
},

packages/@aws-cdk/aws-eks/test/integ.alb-controller.js.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"S3Bucket": {
142142
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
143143
},
144-
"S3Key": "c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc.zip"
144+
"S3Key": "5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip"
145145
},
146146
"Description": "/opt/awscli/aws"
147147
}

packages/@aws-cdk/aws-eks/test/integ.alb-controller.js.snapshot/manifest.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"version": "21.0.0",
33
"artifacts": {
4-
"Tree": {
5-
"type": "cdk:tree",
6-
"properties": {
7-
"file": "tree.json"
8-
}
9-
},
104
"aws-cdk-eks-cluster-alb-controller-test.assets": {
115
"type": "cdk:asset-manifest",
126
"properties": {
@@ -23,7 +17,7 @@
2317
"validateOnSynth": false,
2418
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
2519
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
26-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f3eba6cb551a4cebac702fc5ec6ebc0499f92cd8e320084381c8d95a951de769.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f71f354caa16ee08ec386f0b1d28987f1185cf0ad81e7336e68fc21b186e67fc.json",
2721
"requiresBootstrapStackVersion": 6,
2822
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2923
"additionalDependencies": [
@@ -652,6 +646,12 @@
652646
]
653647
},
654648
"displayName": "aws-cdk-cluster-alb-controller/DefaultTest/DeployAssert"
649+
},
650+
"Tree": {
651+
"type": "cdk:tree",
652+
"properties": {
653+
"file": "tree.json"
654+
}
655655
}
656656
}
657657
}

packages/@aws-cdk/aws-eks/test/integ.alb-controller.js.snapshot/tree.json

+44-10
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
"id": "App",
55
"path": "",
66
"children": {
7-
"Tree": {
8-
"id": "Tree",
9-
"path": "Tree",
10-
"constructInfo": {
11-
"fqn": "constructs.Construct",
12-
"version": "10.1.140"
13-
}
14-
},
157
"aws-cdk-eks-cluster-alb-controller-test": {
168
"id": "aws-cdk-eks-cluster-alb-controller-test",
179
"path": "aws-cdk-eks-cluster-alb-controller-test",
@@ -2805,7 +2797,7 @@
28052797
"s3Bucket": {
28062798
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
28072799
},
2808-
"s3Key": "c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc.zip"
2800+
"s3Key": "5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip"
28092801
},
28102802
"description": "/opt/awscli/aws"
28112803
}
@@ -3130,7 +3122,7 @@
31303122
{
31313123
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
31323124
},
3133-
"/420d40fdc46ce5f130bd0ca21b943c124e3bb08c3d220a240d7e63832e92e896.json"
3125+
"/6f980d09d47a00a7d5001feeb3994d1909bc5294e309d69bd4fbc815622f6fa9.json"
31343126
]
31353127
]
31363128
},
@@ -4002,6 +3994,22 @@
40023994
"fqn": "@aws-cdk/core.CfnOutput",
40033995
"version": "0.0.0"
40043996
}
3997+
},
3998+
"BootstrapVersion": {
3999+
"id": "BootstrapVersion",
4000+
"path": "aws-cdk-eks-cluster-alb-controller-test/BootstrapVersion",
4001+
"constructInfo": {
4002+
"fqn": "@aws-cdk/core.CfnParameter",
4003+
"version": "0.0.0"
4004+
}
4005+
},
4006+
"CheckBootstrapVersion": {
4007+
"id": "CheckBootstrapVersion",
4008+
"path": "aws-cdk-eks-cluster-alb-controller-test/CheckBootstrapVersion",
4009+
"constructInfo": {
4010+
"fqn": "@aws-cdk/core.CfnRule",
4011+
"version": "0.0.0"
4012+
}
40054013
}
40064014
},
40074015
"constructInfo": {
@@ -4028,6 +4036,24 @@
40284036
"DeployAssert": {
40294037
"id": "DeployAssert",
40304038
"path": "aws-cdk-cluster-alb-controller/DefaultTest/DeployAssert",
4039+
"children": {
4040+
"BootstrapVersion": {
4041+
"id": "BootstrapVersion",
4042+
"path": "aws-cdk-cluster-alb-controller/DefaultTest/DeployAssert/BootstrapVersion",
4043+
"constructInfo": {
4044+
"fqn": "@aws-cdk/core.CfnParameter",
4045+
"version": "0.0.0"
4046+
}
4047+
},
4048+
"CheckBootstrapVersion": {
4049+
"id": "CheckBootstrapVersion",
4050+
"path": "aws-cdk-cluster-alb-controller/DefaultTest/DeployAssert/CheckBootstrapVersion",
4051+
"constructInfo": {
4052+
"fqn": "@aws-cdk/core.CfnRule",
4053+
"version": "0.0.0"
4054+
}
4055+
}
4056+
},
40314057
"constructInfo": {
40324058
"fqn": "@aws-cdk/core.Stack",
40334059
"version": "0.0.0"
@@ -4044,6 +4070,14 @@
40444070
"fqn": "@aws-cdk/integ-tests.IntegTest",
40454071
"version": "0.0.0"
40464072
}
4073+
},
4074+
"Tree": {
4075+
"id": "Tree",
4076+
"path": "Tree",
4077+
"constructInfo": {
4078+
"fqn": "constructs.Construct",
4079+
"version": "10.1.140"
4080+
}
40474081
}
40484082
},
40494083
"constructInfo": {

packages/@aws-cdk/aws-eks/test/integ.eks-bottlerocket-ng.js.snapshot/aws-cdk-eks-cluster-bottlerocket-ng-test.assets.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
}
6767
}
6868
},
69-
"c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc": {
69+
"5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510": {
7070
"source": {
71-
"path": "asset.c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc.zip",
71+
"path": "asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip",
7272
"packaging": "file"
7373
},
7474
"destinations": {
7575
"current_account-current_region": {
7676
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
77-
"objectKey": "c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc.zip",
77+
"objectKey": "5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip",
7878
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
7979
}
8080
}
@@ -92,28 +92,28 @@
9292
}
9393
}
9494
},
95-
"10fc72b78ad6e3acf1381cc99a752d56c6423ccb3628bfa0ec6d51434244d42c": {
95+
"3043a1b67672745d02056ba21b9def813297bf697c51a24b94893c965615f0f6": {
9696
"source": {
9797
"path": "awscdkeksclusterbottlerocketngtestawscdkawseksKubectlProviderE02BC096.nested.template.json",
9898
"packaging": "file"
9999
},
100100
"destinations": {
101101
"current_account-current_region": {
102102
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
103-
"objectKey": "10fc72b78ad6e3acf1381cc99a752d56c6423ccb3628bfa0ec6d51434244d42c.json",
103+
"objectKey": "3043a1b67672745d02056ba21b9def813297bf697c51a24b94893c965615f0f6.json",
104104
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
105105
}
106106
}
107107
},
108-
"448cf16f2223b555fd22bed23dda804b9e8864d483d5cfe224b2a3d9c8371ab2": {
108+
"7a82b24521c3b94c171f7809912db6c42b6eb5a3a76536215df4d4a08c45b071": {
109109
"source": {
110110
"path": "aws-cdk-eks-cluster-bottlerocket-ng-test.template.json",
111111
"packaging": "file"
112112
},
113113
"destinations": {
114114
"current_account-current_region": {
115115
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
116-
"objectKey": "448cf16f2223b555fd22bed23dda804b9e8864d483d5cfe224b2a3d9c8371ab2.json",
116+
"objectKey": "7a82b24521c3b94c171f7809912db6c42b6eb5a3a76536215df4d4a08c45b071.json",
117117
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
118118
}
119119
}

packages/@aws-cdk/aws-eks/test/integ.eks-bottlerocket-ng.js.snapshot/aws-cdk-eks-cluster-bottlerocket-ng-test.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@
10071007
{
10081008
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
10091009
},
1010-
"/10fc72b78ad6e3acf1381cc99a752d56c6423ccb3628bfa0ec6d51434244d42c.json"
1010+
"/3043a1b67672745d02056ba21b9def813297bf697c51a24b94893c965615f0f6.json"
10111011
]
10121012
]
10131013
},

packages/@aws-cdk/aws-eks/test/integ.eks-bottlerocket-ng.js.snapshot/awscdkeksclusterbottlerocketngtestawscdkawseksKubectlProviderE02BC096.nested.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"S3Bucket": {
142142
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
143143
},
144-
"S3Key": "c409e6c5845f1f349df8cd84e160bf6f1c35d2b060b63e1f032f9bd39d4542cc.zip"
144+
"S3Key": "5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip"
145145
},
146146
"Description": "/opt/awscli/aws"
147147
}

packages/@aws-cdk/aws-eks/test/integ.eks-bottlerocket-ng.js.snapshot/manifest.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"version": "21.0.0",
33
"artifacts": {
4-
"Tree": {
5-
"type": "cdk:tree",
6-
"properties": {
7-
"file": "tree.json"
8-
}
9-
},
104
"aws-cdk-eks-cluster-bottlerocket-ng-test.assets": {
115
"type": "cdk:asset-manifest",
126
"properties": {
@@ -23,7 +17,7 @@
2317
"validateOnSynth": false,
2418
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
2519
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
26-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/448cf16f2223b555fd22bed23dda804b9e8864d483d5cfe224b2a3d9c8371ab2.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7a82b24521c3b94c171f7809912db6c42b6eb5a3a76536215df4d4a08c45b071.json",
2721
"requiresBootstrapStackVersion": 6,
2822
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2923
"additionalDependencies": [
@@ -544,6 +538,12 @@
544538
]
545539
},
546540
"displayName": "aws-cdk-eks-cluster-bottlerocket-ng/DefaultTest/DeployAssert"
541+
},
542+
"Tree": {
543+
"type": "cdk:tree",
544+
"properties": {
545+
"file": "tree.json"
546+
}
547547
}
548548
}
549549
}

0 commit comments

Comments
 (0)