brendanhay / amazonka

A comprehensive Amazon Web Services SDK for Haskell.
https://amazonka.brendanhay.nz
Other
599 stars 227 forks source link

Support for AWS_STS_REGIONAL_ENDPOINTS #964

Open BharatKJain opened 10 months ago

BharatKJain commented 10 months ago

When the env AWS_STS_REGIONAL_ENDPOINTS is set to regional, it's calling sts.amazonaws.com whereas it should call sts.ap-south-1.amazonaws.com or some other regional endpoint.

AWS docs reference

This helps when we're haskell code running in a closed environment where there's no internet available to make the STS calls, and regional endpoints can be used using VPC endpoints service which allows direct connectivity to some services.

BharatKJain commented 10 months ago

More information on this issue, python is handling each region's endpoint in a botocore file present in this relative path: botocore/data/endpoints.json

Should we handle it like this? Or some other way?