Specify the AWS CodeBuild endpoint

You can use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to specify
the endpoint used
by AWS CodeBuild. There is an endpoint for each region in which CodeBuild is available.
In addition to a
regional endpoint, four regions also have a Federal Information Processing Standards
(FIPS)
endpoint. For more information about FIPS endpoints, see FIPS 140-2 Overview.

Specifying an endpoint is optional. If you don't explicitly tell CodeBuild which
endpoint to
use, the service uses the endpoint associated with the region your AWS account uses.
CodeBuild
never defaults to a FIPS endpoint. If you want to use a FIPS endpoint, you must associate
CodeBuild with it using one of the following methods.

Note

You can use an alias or region name to specify an endpoint using an AWS SDK. If you
use the AWS CLI, then you must use the full endpoint name.

Specify the AWS CodeBuild endpoint (AWS CLI)

You can use the AWS CLI to specify the endpoint through which AWS CodeBuild is accessed
by
using the --endpoint-url argument in any CodeBuild command. For example, run
this command to get a list of project build names using the Federal Information
Processing Standards (FIPS) endpoint in the US East (N. Virginia) Region:

If you want to specify a non-FIPS endpoint, you can use the region instead of the
actual endpoint. For example, to specify the endpoint in the US East (N. Virginia)
region,
you can use us-east-1 instead of the full endpoint name, codebuild.us-east-1.amazonaws.com.

If you want to specify a FIPS endpoint, you can use an alias to simplify your code.
Only FIPS endpoints have an alias. Other endpoints must be specified using their region
or full name.

The following table lists the alias for each of the four available FIPS
endpoints:

Region name

Region

Endpoint

Alias

US East (N. Virginia)

us-east-1

codebuild-fips.us-east-1.amazonaws.com

us-east-1-fips

US East (Ohio)

us-east-2

codebuild-fips.us-east-2.amazonaws.com

us-east-2-fips

US West (N. California)

us-west-1

codebuild-fips.us-west-1.amazonaws.com

us-west-1-fips

US West (Oregon)

us-west-2

codebuild-fips.us-west-2.amazonaws.com

us-west-2-fips

To specify use of the FIPS endpoint in the US West (Oregon) region using an alias: