SQS FIPS Endpont ENOTFOUND in GovCloud (US)
See original GitHub issueDescribe the bug
Using the new features in v3.40.0 to pass useFipsEndpoint: true
, the endpoint URL for SQS (and possibly other services) in the AWS GovCloud (US) partition, and specifically in us-gov-west-1
is invalid according to https://aws.amazon.com/compliance/fips/ and is not a resolvable hostname.
Your environment
SDK version number
@aws-sdk/client-sqs@3.40.0
Is the issue in the browser/Node.js/ReactNative?
Node.js (but likely all)
Details of the browser/Node.js/ReactNative version
Current Node.js version using in the Node.js 14.x Lambda runtime
Steps to reproduce
import { SQSClient } from "@aws-sdk/client-sqs";
const sqs = SQSClient({ useFipsEndpoint: true, region: "us-gov-west-1" });
sqs.send(new SendMessageCommand({ QueueUrl: process.env.QUEUE_URL, MessageBody: JSON.stringify({ "message": "Hello world"})});
Observed behavior
The created URL is sqs-fips.us-gov-west-1.amazonaws.com
. This results in an ENOTFOUND
error in Lambda when trying to hit the endpoint. It is not possible to resolve sqs-fips.us-gov-west-1.amazonaws.com
.
getaddrinfo ENOTFOUND sqs-fips.us-gov-west-1.amazonaws.com
Expected behavior
Per https://aws.amazon.com/compliance/fips/ the proper endpoint is sqs.us-gov-west-1.amazonaws.com
. That host does resolve.
Additional context
Add any other context about the problem here.
https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-sqs/src/endpoints.ts#L4 seems to be correct so I am not sure where -fips
is getting injected. Do the “regular” us-gov-
region endpoints need to be tagged as fips
and dualstack
?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Update: This bug exists in all AWS SDKs, and a service level default variant needs to be defined for SQS to not include
-fips
in FIPS endpoints in gov partition.The AWS SDK for JavaScript (v3) will pick up the fix when endpoints.json is updated.
Verified that
sqs-fips.us-gov-west-1.amazonaws.com
is returned whenuseFipsEndpoint
is set to true in@aws-sdk/client-sqs@v3.40.0
Code
Output