Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint resolution fails for DynamoDB in "us-gov-east-1" region when useDualstackEndpoint=true #3043

Closed
trivikr opened this issue Nov 19, 2021 · 2 comments · Fixed by #3044
Labels
bug This issue is a bug.

Comments

@trivikr
Copy link
Member

trivikr commented Nov 19, 2021

Describe the bug

Endpoint resolution fails for DynamoDB in "us-gov-east-1" region

Your environment

SDK version number

@aws-sdk/client-dynamodb@3.41.0

Is the issue in the browser/Node.js/ReactNative?

All, tested on Node.js

Details of the browser/Node.js/ReactNative version

$ node -v
v16.13.0

Steps to reproduce

import { DynamoDB } from "@aws-sdk/client-dynamodb"; // v3.41.0

const client = new DynamoDB({
  region: "us-gov-east-1",
  useDualstackEndpoint: true,
});
await client.listTables({});

Observed behavior

/local/home/trivikr/workspace/temp/node_modules/@aws-sdk/config-resolver/dist-cjs/regionInfo/getRegionInfo.js:17
        throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
              ^

Error: Endpoint resolution failed for: [object Object]
    at Object.getRegionInfo (/local/home/trivikr/workspace/temp/node_modules/@aws-sdk/config-resolver/dist-cjs/regionInfo/getRegionInfo.js:17:15)
...

Expected behavior

It should send request to dynamodb.us-gov-east-1.api.aws, as it's defined in partition defaults.

{
"dnsSuffix": "api.aws",
"hostname": "{service}.{region}.{dnsSuffix}",
"tags": ["dualstack"]
}
]
},
"dnsSuffix": "amazonaws.com",
"partition": "aws-us-gov",

@trivikr trivikr added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 19, 2021
@trivikr
Copy link
Member Author

trivikr commented Nov 19, 2021

Equivalent code in AWS CLI v1:

$ aws --version
aws-cli/1.22.9 Python/3.7.10 Linux/5.4.156-94.273.amzn2int.x86_64 botocore/1.23.9

$ AWS_USE_DUALSTACK_ENDPOINT=true aws dynamodb list-tables --region us-gov-east-1 --debug 2>&1 | grep "urllib3.connectionpool" | head -n 1
2021-11-19 01:40:07,585 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): dynamodb.us-gov-east-1.api.aws:443

@trivikr trivikr changed the title Endpoint resolution fails for DynamoDB in "us-gov-east-1" region Endpoint resolution fails for DynamoDB in "us-gov-east-1" region with useDualstackEndpoint=true Nov 19, 2021
@trivikr trivikr changed the title Endpoint resolution fails for DynamoDB in "us-gov-east-1" region with useDualstackEndpoint=true Endpoint resolution fails for DynamoDB in "us-gov-east-1" region when useDualstackEndpoint=true Nov 19, 2021
@github-actions
Copy link

github-actions bot commented Dec 4, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant