When using the AWSSecurityTokenServiceClientBuilder and supplying a region (withRegion), the STS global endpoint is still used (sts.amazonaws.com). The region endpoint should be used when supplied with a region so the client detects the VPC Interface Endpoint if the account is configured for one in that region.
Describe the bug
Constructed a client with the region of US-WEST-2 for STS and the global endpoint is still used.
return AWSSecurityTokenServiceClientBuilder.standard() .withRegion(Regions.US_WEST_2) .build();
Expected Behavior
Region endpoint is used (sts.us-west-2.amazonaws.com).
Current Behavior
Global endpoint is used (sts.amazonaws.com).
Steps to Reproduce
Constructor and STS client and see the global endpoint being used.
return AWSSecurityTokenServiceClientBuilder.standard() .withRegion(Regions.US_WEST_2) .build();
Possible Solution
Fix the SDK so the regional endpoint is used.
Context
Regional endpoint has to manually be used, which is what is needed to use VPC Interface Endpoint.
Your Environment
Java 8, AWS Lambda
When using the AWSSecurityTokenServiceClientBuilder and supplying a region (withRegion), the STS global endpoint is still used (sts.amazonaws.com). The region endpoint should be used when supplied with a region so the client detects the VPC Interface Endpoint if the account is configured for one in that region.
Describe the bug
Constructed a client with the region of US-WEST-2 for STS and the global endpoint is still used.
return AWSSecurityTokenServiceClientBuilder.standard() .withRegion(Regions.US_WEST_2) .build();Expected Behavior
Region endpoint is used (sts.us-west-2.amazonaws.com).
Current Behavior
Global endpoint is used (sts.amazonaws.com).
Steps to Reproduce
Constructor and STS client and see the global endpoint being used.
return AWSSecurityTokenServiceClientBuilder.standard() .withRegion(Regions.US_WEST_2) .build();Possible Solution
Fix the SDK so the regional endpoint is used.
Context
Regional endpoint has to manually be used, which is what is needed to use VPC Interface Endpoint.
Your Environment
Java 8, AWS Lambda