Skip to content

Commit 47ab5c8

Browse files
authored
fix(integ-tests): Uint8Arrays are not decoded properly (#27009)
AWS SDK v3 has changed some data types to Uint8Array. If a value of this type was provided by the user, it would not be decoded properly back to a Uint8Array before making the call. Recognize when there is an encoded Uint8Array and decode it back properly. Closes #26798. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent e260d30 commit 47ab5c8

File tree

13 files changed

+32800
-3
lines changed

13 files changed

+32800
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "34.0.0",
3+
"files": {
4+
"e4cbaa0fcf23495e4d555f44c97cf3fdd0bbd04ce558a02ba6a79f7ae1944f60": {
5+
"source": {
6+
"path": "IntegBinaryPayload.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "e4cbaa0fcf23495e4d555f44c97cf3fdd0bbd04ce558a02ba6a79f7ae1944f60.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"Resources": {
3+
"fnServiceRole5D180AFD": {
4+
"Type": "AWS::IAM::Role",
5+
"Properties": {
6+
"AssumeRolePolicyDocument": {
7+
"Statement": [
8+
{
9+
"Action": "sts:AssumeRole",
10+
"Effect": "Allow",
11+
"Principal": {
12+
"Service": "lambda.amazonaws.com"
13+
}
14+
}
15+
],
16+
"Version": "2012-10-17"
17+
},
18+
"ManagedPolicyArns": [
19+
{
20+
"Fn::Join": [
21+
"",
22+
[
23+
"arn:",
24+
{
25+
"Ref": "AWS::Partition"
26+
},
27+
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
28+
]
29+
]
30+
}
31+
]
32+
}
33+
},
34+
"fn5FF616E3": {
35+
"Type": "AWS::Lambda::Function",
36+
"Properties": {
37+
"Code": {
38+
"ZipFile": "\n exports.handler = async (event) => {\n return event;\n };\n "
39+
},
40+
"Handler": "index.handler",
41+
"Role": {
42+
"Fn::GetAtt": [
43+
"fnServiceRole5D180AFD",
44+
"Arn"
45+
]
46+
},
47+
"Runtime": "nodejs18.x"
48+
},
49+
"DependsOn": [
50+
"fnServiceRole5D180AFD"
51+
]
52+
}
53+
},
54+
"Outputs": {
55+
"ExportsOutputReffn5FF616E3BE1A8BD6": {
56+
"Value": {
57+
"Ref": "fn5FF616E3"
58+
},
59+
"Export": {
60+
"Name": "IntegBinaryPayload:ExportsOutputReffn5FF616E3BE1A8BD6"
61+
}
62+
}
63+
},
64+
"Parameters": {
65+
"BootstrapVersion": {
66+
"Type": "AWS::SSM::Parameter::Value<String>",
67+
"Default": "/cdk-bootstrap/hnb659fds/version",
68+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
69+
}
70+
},
71+
"Rules": {
72+
"CheckBootstrapVersion": {
73+
"Assertions": [
74+
{
75+
"Assert": {
76+
"Fn::Not": [
77+
{
78+
"Fn::Contains": [
79+
[
80+
"1",
81+
"2",
82+
"3",
83+
"4",
84+
"5"
85+
],
86+
{
87+
"Ref": "BootstrapVersion"
88+
}
89+
]
90+
}
91+
]
92+
},
93+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
94+
}
95+
]
96+
}
97+
}
98+
}

0 commit comments

Comments
 (0)