Skip to content

How do I troubleshoot the "503 Service Unavailable" error in Amazon Bedrock?

3 minute read
0

I want to troubleshoot the "503 Service Unavailable" error that I receive when I use Amazon Bedrock on-demand resources. I haven't exceeded the AWS account quotas.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

You receive the 503 Service Unavailable error message for server-side exceptions that occur when the server can't respond because of failures. Or, the error occurs when a surge in requests causes a strain on shared resources. To identify the cause of the error, take the following actions.

Check the service status

If you can't access Amazon Bedrock, then check the service availability. Check Service health on the AWS Health Dashboard to check whether there are ongoing issues with Amazon Bedrock in your AWS Region.

Retry the request

To check whether the error is a result of a temporary increase to API demand, use exponential backoff to retry the request. This method reduces the load on the server and improves the likelihood of a successful request.

AWS SDKs often have built-in retry logic. Configure the retry behavior for your AWS SDK based on your requirements.

Use another Region

To check whether the increased demand or failures are specific to one Region, update your resources to use another Region. When you change to a different Region, grant model access for Amazon Bedrock in that Region.

If you use AWS SDKs, then check the Region compatibility of your AWS SDK. To update your AWS SDK to use another Region, run the following set AWS CLI command:

aws configure set region new-region-name

Note: Replace new-region-name with the new Region.

Use cross-Region inference to automatically use capacity from multiple Regions

Use cross-Region inference to seamlessly manage unplanned traffic bursts. Cross-Region inference dynamically routes requests to Regions that have capacity. This allows your workloads to scale with demand.

Use other foundation models

If the demand increases or failures occur on a specific foundation model, then use another foundation model.

Note: The required parameters are different for each foundation model. The Converse API works with all Amazon Bedrock models that support messages, and allows you to write code once and use it with different models.

Use Provisioned Throughput

Prerequisites: Make sure that you're in a supported Region for Provisioned Throughput.

Analyze your application's usage patterns and peak requirements. If you need to provide higher throughput, then use Provisioned Throughput. To use the AWS CLI or the AWS SDK for Python (Boto3) to use Provisioned Throughput, see Code examples for Provisioned Throughput.

AWS OFFICIALUpdated 6 months ago