aws-sdk-js
aws-sdk-js copied to clipboard
SageMaker ListDevices in us-west-1 "This operation is not supported in this region"
Describe the bug
When using ListDevicesCommand in us-west-1, the command fails with the error: "This operation is not supported in this region"
Expected Behavior
Return a list of devices
Current Behavior
Throws an error
Reproduction Steps
import { SageMakerClient, ListDevicesCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import
const client = new SageMakerClient(config);
const input = { // ListDevicesRequest
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
LatestHeartbeatAfter: new Date("TIMESTAMP"),
ModelName: "STRING_VALUE",
DeviceFleetName: "STRING_VALUE",
};
const command = new ListDevicesCommand(input);
const response = await client.send(command);
Possible Solution
No response
Additional Information/Context
No response
SDK version used
3.458.0
Environment details (OS name and version, etc.)
Docker Lambda Amazon Linux
Hi @ziadkh-amzn - sorry for the delay. I'm not able to reproduce this behavior. Can you make sure to specify the region in your client initialization like the following?
const client = new SageMakerClient({
region: "us-west-1"
});
Can you also verify by running CLI command aws sagemaker list-devices --region us-west-1? Here's doc for reference: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/list-devices.html
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.