Skip to content

Commit 66a2d40

Browse files
author
AWS
committed
EC2 Image Builder Update: Enabled FIPS endpoints for GovCloud (US) regions in SDK.
1 parent 3c9b694 commit 66a2d40

File tree

3 files changed

+313
-24
lines changed

3 files changed

+313
-24
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "EC2 Image Builder",
4+
"contributor": "",
5+
"description": "Enabled FIPS endpoints for GovCloud (US) regions in SDK."
6+
}

services/imagebuilder/src/main/resources/codegen-resources/endpoint-rule-set.json

Lines changed: 73 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,18 @@
165165
"rules": [
166166
{
167167
"conditions": [],
168-
"endpoint": {
169-
"url": "https://imagebuilder-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
170-
"properties": {},
171-
"headers": {}
172-
},
173-
"type": "endpoint"
168+
"type": "tree",
169+
"rules": [
170+
{
171+
"conditions": [],
172+
"endpoint": {
173+
"url": "https://imagebuilder-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
174+
"properties": {},
175+
"headers": {}
176+
},
177+
"type": "endpoint"
178+
}
179+
]
174180
}
175181
]
176182
},
@@ -217,12 +223,43 @@
217223
"rules": [
218224
{
219225
"conditions": [],
220-
"endpoint": {
221-
"url": "https://imagebuilder-fips.{Region}.{PartitionResult#dnsSuffix}",
222-
"properties": {},
223-
"headers": {}
224-
},
225-
"type": "endpoint"
226+
"type": "tree",
227+
"rules": [
228+
{
229+
"conditions": [
230+
{
231+
"fn": "stringEquals",
232+
"argv": [
233+
"aws-us-gov",
234+
{
235+
"fn": "getAttr",
236+
"argv": [
237+
{
238+
"ref": "PartitionResult"
239+
},
240+
"name"
241+
]
242+
}
243+
]
244+
}
245+
],
246+
"endpoint": {
247+
"url": "https://imagebuilder.{Region}.amazonaws.com",
248+
"properties": {},
249+
"headers": {}
250+
},
251+
"type": "endpoint"
252+
},
253+
{
254+
"conditions": [],
255+
"endpoint": {
256+
"url": "https://imagebuilder-fips.{Region}.{PartitionResult#dnsSuffix}",
257+
"properties": {},
258+
"headers": {}
259+
},
260+
"type": "endpoint"
261+
}
262+
]
226263
}
227264
]
228265
},
@@ -269,12 +306,18 @@
269306
"rules": [
270307
{
271308
"conditions": [],
272-
"endpoint": {
273-
"url": "https://imagebuilder.{Region}.{PartitionResult#dualStackDnsSuffix}",
274-
"properties": {},
275-
"headers": {}
276-
},
277-
"type": "endpoint"
309+
"type": "tree",
310+
"rules": [
311+
{
312+
"conditions": [],
313+
"endpoint": {
314+
"url": "https://imagebuilder.{Region}.{PartitionResult#dualStackDnsSuffix}",
315+
"properties": {},
316+
"headers": {}
317+
},
318+
"type": "endpoint"
319+
}
320+
]
278321
}
279322
]
280323
},
@@ -287,12 +330,18 @@
287330
},
288331
{
289332
"conditions": [],
290-
"endpoint": {
291-
"url": "https://imagebuilder.{Region}.{PartitionResult#dnsSuffix}",
292-
"properties": {},
293-
"headers": {}
294-
},
295-
"type": "endpoint"
333+
"type": "tree",
334+
"rules": [
335+
{
336+
"conditions": [],
337+
"endpoint": {
338+
"url": "https://imagebuilder.{Region}.{PartitionResult#dnsSuffix}",
339+
"properties": {},
340+
"headers": {}
341+
},
342+
"type": "endpoint"
343+
}
344+
]
296345
}
297346
]
298347
}

services/imagebuilder/src/main/resources/codegen-resources/endpoint-tests.json

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,239 @@
11
{
22
"testCases": [
3+
{
4+
"documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
5+
"expect": {
6+
"endpoint": {
7+
"url": "https://imagebuilder-fips.us-iso-east-1.c2s.ic.gov"
8+
}
9+
},
10+
"params": {
11+
"UseDualStack": false,
12+
"UseFIPS": true,
13+
"Region": "us-iso-east-1"
14+
}
15+
},
16+
{
17+
"documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
18+
"expect": {
19+
"endpoint": {
20+
"url": "https://imagebuilder.us-iso-east-1.c2s.ic.gov"
21+
}
22+
},
23+
"params": {
24+
"UseDualStack": false,
25+
"UseFIPS": false,
26+
"Region": "us-iso-east-1"
27+
}
28+
},
29+
{
30+
"documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
31+
"expect": {
32+
"endpoint": {
33+
"url": "https://imagebuilder-fips.us-east-1.api.aws"
34+
}
35+
},
36+
"params": {
37+
"UseDualStack": true,
38+
"UseFIPS": true,
39+
"Region": "us-east-1"
40+
}
41+
},
42+
{
43+
"documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
44+
"expect": {
45+
"endpoint": {
46+
"url": "https://imagebuilder-fips.us-east-1.amazonaws.com"
47+
}
48+
},
49+
"params": {
50+
"UseDualStack": false,
51+
"UseFIPS": true,
52+
"Region": "us-east-1"
53+
}
54+
},
55+
{
56+
"documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
57+
"expect": {
58+
"endpoint": {
59+
"url": "https://imagebuilder.us-east-1.api.aws"
60+
}
61+
},
62+
"params": {
63+
"UseDualStack": true,
64+
"UseFIPS": false,
65+
"Region": "us-east-1"
66+
}
67+
},
68+
{
69+
"documentation": "For region us-east-1 with FIPS disabled and DualStack disabled",
70+
"expect": {
71+
"endpoint": {
72+
"url": "https://imagebuilder.us-east-1.amazonaws.com"
73+
}
74+
},
75+
"params": {
76+
"UseDualStack": false,
77+
"UseFIPS": false,
78+
"Region": "us-east-1"
79+
}
80+
},
81+
{
82+
"documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled",
83+
"expect": {
84+
"endpoint": {
85+
"url": "https://imagebuilder.us-gov-west-1.amazonaws.com"
86+
}
87+
},
88+
"params": {
89+
"UseDualStack": false,
90+
"UseFIPS": false,
91+
"Region": "us-gov-west-1"
92+
}
93+
},
94+
{
95+
"documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled",
96+
"expect": {
97+
"endpoint": {
98+
"url": "https://imagebuilder.us-gov-west-1.amazonaws.com"
99+
}
100+
},
101+
"params": {
102+
"UseDualStack": false,
103+
"UseFIPS": true,
104+
"Region": "us-gov-west-1"
105+
}
106+
},
107+
{
108+
"documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
109+
"expect": {
110+
"endpoint": {
111+
"url": "https://imagebuilder.us-gov-east-1.amazonaws.com"
112+
}
113+
},
114+
"params": {
115+
"UseDualStack": false,
116+
"UseFIPS": false,
117+
"Region": "us-gov-east-1"
118+
}
119+
},
120+
{
121+
"documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
122+
"expect": {
123+
"endpoint": {
124+
"url": "https://imagebuilder.us-gov-east-1.amazonaws.com"
125+
}
126+
},
127+
"params": {
128+
"UseDualStack": false,
129+
"UseFIPS": true,
130+
"Region": "us-gov-east-1"
131+
}
132+
},
133+
{
134+
"documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
135+
"expect": {
136+
"endpoint": {
137+
"url": "https://imagebuilder-fips.us-gov-east-1.api.aws"
138+
}
139+
},
140+
"params": {
141+
"UseDualStack": true,
142+
"UseFIPS": true,
143+
"Region": "us-gov-east-1"
144+
}
145+
},
146+
{
147+
"documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
148+
"expect": {
149+
"endpoint": {
150+
"url": "https://imagebuilder.us-gov-east-1.api.aws"
151+
}
152+
},
153+
"params": {
154+
"UseDualStack": true,
155+
"UseFIPS": false,
156+
"Region": "us-gov-east-1"
157+
}
158+
},
159+
{
160+
"documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
161+
"expect": {
162+
"endpoint": {
163+
"url": "https://imagebuilder-fips.us-isob-east-1.sc2s.sgov.gov"
164+
}
165+
},
166+
"params": {
167+
"UseDualStack": false,
168+
"UseFIPS": true,
169+
"Region": "us-isob-east-1"
170+
}
171+
},
172+
{
173+
"documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
174+
"expect": {
175+
"endpoint": {
176+
"url": "https://imagebuilder.us-isob-east-1.sc2s.sgov.gov"
177+
}
178+
},
179+
"params": {
180+
"UseDualStack": false,
181+
"UseFIPS": false,
182+
"Region": "us-isob-east-1"
183+
}
184+
},
185+
{
186+
"documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
187+
"expect": {
188+
"endpoint": {
189+
"url": "https://imagebuilder-fips.cn-north-1.api.amazonwebservices.com.cn"
190+
}
191+
},
192+
"params": {
193+
"UseDualStack": true,
194+
"UseFIPS": true,
195+
"Region": "cn-north-1"
196+
}
197+
},
198+
{
199+
"documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled",
200+
"expect": {
201+
"endpoint": {
202+
"url": "https://imagebuilder-fips.cn-north-1.amazonaws.com.cn"
203+
}
204+
},
205+
"params": {
206+
"UseDualStack": false,
207+
"UseFIPS": true,
208+
"Region": "cn-north-1"
209+
}
210+
},
211+
{
212+
"documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled",
213+
"expect": {
214+
"endpoint": {
215+
"url": "https://imagebuilder.cn-north-1.api.amazonwebservices.com.cn"
216+
}
217+
},
218+
"params": {
219+
"UseDualStack": true,
220+
"UseFIPS": false,
221+
"Region": "cn-north-1"
222+
}
223+
},
224+
{
225+
"documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
226+
"expect": {
227+
"endpoint": {
228+
"url": "https://imagebuilder.cn-north-1.amazonaws.com.cn"
229+
}
230+
},
231+
"params": {
232+
"UseDualStack": false,
233+
"UseFIPS": false,
234+
"Region": "cn-north-1"
235+
}
236+
},
3237
{
4238
"documentation": "For custom endpoint with fips disabled and dualstack disabled",
5239
"expect": {

0 commit comments

Comments
 (0)