Use FIPS Endpoints

Route your SageMaker control plane, inference, and streaming traffic to the AWS FIPS 140-3 endpoints.

Amazon SageMaker AI publishes FIPS 140-3 endpoints alongside its standard ones. Switching to them changes only the hostname your client connects to; the endpoint, the model, and the request payload stay the same. For what these endpoints do and do not cover, see Security and Compliance.

Select FIPS endpoints

The AWS SDKs give you three ways to select FIPS endpoints, from broadest to narrowest scope:

MechanismScopeUse when
AWS_USE_FIPS_ENDPOINT=true environment variableEvery client in the processThe whole process should use FIPS endpoints and you do not authenticate with IAM Identity Center
use_fips_endpoint = true in ~/.aws/configEvery client using that profileYou want FIPS tied to a profile rather than a shell
Per-client configuration in codeOne clientYou want explicit, reviewable control — recommended

If you authenticate with AWS IAM Identity Center (SSO), use per-client configuration. Authenticate over the standard IAM Identity Center endpoint, then apply FIPS to the service you call. The environment variable and the profile setting instead apply FIPS to every client in the process, including the one that resolves your SSO credentials, and the AWS SDKs then derive an IAM Identity Center hostname that does not resolve. Credential resolution fails before your request reaches SageMaker, and a cached credential masks the failure, so it appears intermittent.

Configure clients in code

Apply use_fips_endpoint to each client you build. Both the control plane (sagemaker) and the inference client (sagemaker-runtime) need it:

1import boto3
2from botocore.config import Config
3
4REGION = "us-west-2"
5fips = Config(use_fips_endpoint=True)
6
7sagemaker = boto3.client("sagemaker", region_name=REGION, config=fips)
8runtime = boto3.client("sagemaker-runtime", region_name=REGION, config=fips)
9
10print(sagemaker.meta.endpoint_url)
11# https://api-fips.sagemaker.us-west-2.amazonaws.com
12print(runtime.meta.endpoint_url)
13# https://runtime-fips.sagemaker.us-west-2.amazonaws.com

Invoke the endpoint exactly as you would otherwise:

1response = runtime.invoke_endpoint(
2 EndpointName="<your-endpoint-name>",
3 ContentType="application/json",
4 Accept="*/*",
5 Body=audio_bytes,
6 CustomAttributes="model=nova-3&language=en&smart_format=true",
7)

Streaming over FIPS endpoints

Bidirectional streaming reaches the runtime host on port 8443, and the FIPS runtime host serves that port as well. The HTTP/2 bidirectional streaming client takes an explicit endpoint, so point it at the FIPS hostname and keep the port:

1import {
2 SageMakerRuntimeHTTP2Client,
3} from "@aws-sdk/client-sagemaker-runtime-http2";
4
5const region = "us-west-2";
6const client = new SageMakerRuntimeHTTP2Client({
7 region,
8 endpoint: `https://runtime-fips.sagemaker.${region}.amazonaws.com:8443`,
9});

The equivalent in Python, using aws_sdk_sagemaker_runtime_http2:

1endpoint_uri = f"https://runtime-fips.sagemaker.{region}.amazonaws.com:8443"

If you omit the port, the connection is accepted but the response never arrives: the client hangs instead of reporting an error. Set the endpoint explicitly, with the port, on every bidirectional streaming client.

For the full streaming request shape — payload parts, control messages, and result handling — see Deploy Deepgram on Amazon SageMaker.

Asynchronous endpoints

Asynchronous endpoints read their input and write their output to Amazon S3, so configure the S3 client for FIPS as well. Otherwise the invocation travels over FIPS while the payload does not:

1s3 = boto3.client("s3", region_name=REGION, config=fips)
2runtime = boto3.client("sagemaker-runtime", region_name=REGION, config=fips)
3
4print(s3.meta.endpoint_url)
5# https://s3-fips.us-west-2.amazonaws.com

AWS CLI

The AWS CLI honors AWS_USE_FIPS_ENDPOINT and use_fips_endpoint, and also accepts --endpoint-url:

$aws sagemaker describe-endpoint \
> --endpoint-name <your-endpoint-name> \
> --region us-west-2 \
> --endpoint-url https://api-fips.sagemaker.us-west-2.amazonaws.com

Confirm a run used FIPS endpoints

Print the resolved endpoint URL rather than assuming the setting took effect. meta.endpoint_url reports what the client will actually call, after every configuration source has been applied:

1for name, client in {"control plane": sagemaker, "inference": runtime}.items():
2 url = client.meta.endpoint_url
3 print(f"{name:14} {url} FIPS={'-fips.' in url}")

This check matters most in the IAM Identity Center case above, where a misconfigured run can reach SageMaker over standard endpoints while your logs claim FIPS.