Class CredentialsAndRegionFactory

java.lang.Object
io.micronaut.aws.sdk.v2.CredentialsAndRegionFactory

@Factory public class CredentialsAndRegionFactory extends Object
Factory that creates an AWS credentials and region providers that can read values from the Micronaut environment.
Since:
2.0.0
Author:
Álvaro Sánchez-Mariscal
  • Constructor Details

    • CredentialsAndRegionFactory

      public CredentialsAndRegionFactory()
  • Method Details

    • awsCredentialsProvider

      @Bean(preDestroy="close") @Singleton public software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain awsCredentialsProvider(io.micronaut.context.env.Environment environment)
      Parameters:
      environment - The Environment
      Returns:
      An AwsCredentialsProviderChain that attempts to read the values from the Micronaut environment first, then delegates to DefaultCredentialsProvider.
    • awsRegionProvider

      @Singleton public software.amazon.awssdk.regions.providers.AwsRegionProviderChain awsRegionProvider(io.micronaut.context.env.Environment environment)
      Parameters:
      environment - The Environment
      Returns:
      An AwsRegionProviderChain that attempts to read the values from the Micronaut environment first, then delegates to DefaultAwsRegionProviderChain.