Class SdkCredentialsProviders

java.lang.Object
dev.hardwood.aws.auth.SdkCredentialsProviders

public final class SdkCredentialsProviders extends Object

Bridges the AWS SDK credential chain to Hardwood's types.

This class requires software.amazon.awssdk:auth on the classpath. Use the hardwood-aws-auth module dependency to pull it in.

  • Method Details

    • defaultChain

      public static S3CredentialsProvider defaultChain()
      Returns a provider backed by the AWS SDK's default credential chain, which resolves environment variables, profile files and container and instance metadata. SSO and web-identity profiles additionally need the AWS SDK's sso, ssooidc and sts modules on the classpath.
    • fromProfile

      public static S3CredentialsProvider fromProfile(String profileName)
      Returns a provider for a specific named profile from ~/.aws/credentials.
      Parameters:
      profileName - the profile name