@karmaniverous/get-dotenv
    Preparing search index...

    Function awsSessionEnv

    • The environment entries an AWS session sets (a string) or removes (undefined), given the environment it applies to.

      The two credential sources are mutually exclusive: the AWS SDK warns (and may change precedence in future) when both AWS_PROFILE and AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY are set.

      • With credentials: set the static credentials (no token removes AWS_SESSION_TOKEN) and remove the profile variables.
      • With only a profile: set AWS_PROFILE, AWS_DEFAULT_PROFILE and AWS_SDK_LOAD_CONFIG=1, and remove the static credentials.
      • With a region: set AWS_REGION, and AWS_DEFAULT_REGION if env has none.

      Parameters

      • out: AwsContext

        Resolved AWS context.

      • env: ProcessEnv

        The environment the session applies to (for AWS_DEFAULT_REGION).

      Returns ProcessEnv

      The entries to set (string) or remove (undefined).