Skip to content

Commit

Permalink
Add customization for EC2 legacy dualstack endpoints (#3967)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Nov 18, 2021
1 parent f754449 commit 53119da
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-EC2-a3dc85ca.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "EC2",
"description": "Add customization for EC2 legacy dualstack endpoints"
}
13 changes: 12 additions & 1 deletion lib/region_config_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,18 @@
"cn-*/*": {
"endpoint": "{service}.{region}.api.amazonwebservices.com.cn"
},

"*/s3": "dualstackLegacy",
"cn-*/s3": "dualstackLegacyCn",
"*/s3-control": "dualstackLegacy",
"cn-*/s3-control": "dualstackLegacyCn"
"cn-*/s3-control": "dualstackLegacyCn",

"ap-south-1/ec2": "dualstackLegacyEc2",
"eu-west-1/ec2": "dualstackLegacyEc2",
"sa-east-1/ec2": "dualstackLegacyEc2",
"us-east-1/ec2": "dualstackLegacyEc2",
"us-east-2/ec2": "dualstackLegacyEc2",
"us-west-2/ec2": "dualstackLegacyEc2"
},

"dualstackFipsRules": {
Expand Down Expand Up @@ -202,6 +210,9 @@
},
"dualstackFipsLegacyCn": {
"endpoint": "{service}-fips.dualstack.{region}.amazonaws.com.cn"
},
"dualstackLegacyEc2": {
"endpoint": "api.ec2.{region}.aws"
}
}
}
8 changes: 8 additions & 0 deletions test/endpoint/test_cases_supported.json
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,14 @@
"useDualstackEndpoint": false,
"hostname": "ec2-fips.af-south-1.amazonaws.com"
},
{
"endpointPrefix": "ec2",
"clientName": "EC2",
"region": "ap-south-1",
"useFipsEndpoint": false,
"useDualstackEndpoint": true,
"hostname": "api.ec2.ap-south-1.aws"
},
{
"endpointPrefix": "ec2",
"clientName": "EC2",
Expand Down
8 changes: 0 additions & 8 deletions test/endpoint/test_cases_unsupported.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@
"useDualstackEndpoint": false,
"hostname": "data.iot-fips.us-gov-east-1.amazonaws.com"
},
{
"endpointPrefix": "ec2",
"clientName": "EC2",
"region": "ap-south-1",
"useFipsEndpoint": false,
"useDualstackEndpoint": true,
"hostname": "api.ec2.ap-south-1.aws"
},
{
"endpointPrefix": "dms",
"clientName": "DMS",
Expand Down

0 comments on commit 53119da

Please sign in to comment.