1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
2
Regions.getCurrentRegion()
does not have an equivalent in v2.
You could use the DefaultAwsRegionProviderChain
class that looks for the region in this order:
- Check the
aws.region
system property for the region. - Check the
AWS_REGION
environment variable for the region. - Check the
{user.home}/.aws/credentials
and{user.home}/.aws/config
files for the region. - If running in EC2, check the EC2 metadata service for the region.
var regionProvider = DefaultAwsRegionProviderChain.builder().build(); var region = regionProvider.getRegion();
répondu il y a 2 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a 8 mois
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 10 mois
- AWS OFFICIELA mis à jour il y a 6 mois