-
Notifications
You must be signed in to change notification settings - Fork 633
Closed
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
Setting AWS_SDK_LOAD_CONFIG=true does not allow the KMSClient
constructor (called with no arguments) to use the region specified in ~/.aws/config
.
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/client-kms@npm:^3.658.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.9.0
Reproduction Steps
Contents of ~/.aws/config
:
[default]
region = us-east-1
Snippet:
import { KMSClient, GenerateMacCommand } from '@aws-sdk/client-kms';
const client = new KMSClient();
const keyArn = 'your-key-arn';
const command = new GenerateMacCommand({
Message: Buffer.from('abc'),
KeyId: keyArn,
MacAlgorithm: 'HMAC_SHA_512',
});
await client.send(command);
Observed Behavior
When using the above snippet to make a request, I encounter the following error:
Unhandled error Error: getaddrinfo ENOTFOUND kms.undefined.amazonaws.com
Expected Behavior
I expect the command to work (e.g. by sending a request to kms.us-east-1.amazonaws.com
).
Possible Solution
No response
Additional Information/Context
smithy-codegen
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.