Class AwsConfig


  • public final class AwsConfig
    extends Object
    Utility class used to build AWS resources from property-based configs
    • Field Detail

      • CREDENTIALS_PROVIDER_TYPE_CONFIG

        public static final String CREDENTIALS_PROVIDER_TYPE_CONFIG
        The type of AwsCredentialsProvider to use. The "default" Provider uses a "chain" of Providers which are capable of sourcing AwsCredentials from various environmental locations. The "web-identity-token-file" Provider loads temporary credentials from Java system properties or environment variables. When set to "static", the Credentials must be explicitly provided by setting the Access Key ID and Secret Access Key.
        See Also:
        Constant Field Values
      • CREDENTIALS_PROVIDER_TYPE_WEB_IDENTITY_TOKEN_FILE

        public static final String CREDENTIALS_PROVIDER_TYPE_WEB_IDENTITY_TOKEN_FILE
        See Also:
        Constant Field Values
      • CREDENTIALS_TYPE_CONFIG

        public static final String CREDENTIALS_TYPE_CONFIG
        When AwsCredentials are explicitly provided, this configures their type. The default of "basic" simply requires the Access Key ID and Secret Access Key. The "session" type requires an additional Session Token.
        See Also:
        Constant Field Values
      • CREDENTIALS_ACCESS_KEY_ID_CONFIG

        public static final String CREDENTIALS_ACCESS_KEY_ID_CONFIG
        When providing AwsCredentials explicitly, the value of this property should be the Access Key ID.
        See Also:
        Constant Field Values
      • CREDENTIALS_SECRET_ACCESS_KEY_CONFIG

        public static final String CREDENTIALS_SECRET_ACCESS_KEY_CONFIG
        When providing AwsCredentials explicitly, the value of this property should be the Secret Access Key.
        See Also:
        Constant Field Values
      • CREDENTIALS_SESSION_TOKEN_CONFIG

        public static final String CREDENTIALS_SESSION_TOKEN_CONFIG
        When providing "session" AwsCredentials explicitly, the value of this property should be the Secret Token.
        See Also:
        Constant Field Values
      • REGION_CONFIG

        public static final String REGION_CONFIG
        If/when the AWS Region cannot be inferred by the underlying AWS Client, this property can be set to explicitly provide it.
        See Also:
        Constant Field Values
    • Method Detail

      • loadCredentialsProvider

        public static software.amazon.awssdk.auth.credentials.AwsCredentialsProvider loadCredentialsProvider​(Map<String,​?> configs)
      • loadAwsCredentials

        public static software.amazon.awssdk.auth.credentials.AwsCredentials loadAwsCredentials​(Map<String,​?> configs)
      • loadRegion

        public static Optional<software.amazon.awssdk.regions.Region> loadRegion​(Map<String,​?> configs)