awsutil

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Session

func Session(opts ...SessionOption) (awsSession *session.Session, err error)

Session returns an AWS session as described http://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html

func StderrTokenProvider

func StderrTokenProvider() (string, error)

StderrTokenProvider implements token provider for AWS SDK.

Types

type SessionOption

type SessionOption func(*session.Options)

SessionOption is an option for session.

func AssumeRoleTokenProvider

func AssumeRoleTokenProvider(provider func() (string, error)) SessionOption

AssumeRoleTokenProvider is an option for setting custom assume role token provider.

func DynamicBucketRegion added in v0.11.0

func DynamicBucketRegion(s3URL string) SessionOption

DynamicBucketRegion is an option for determining the Helm S3 bucket's AWS region dynamically thus allowing the mixed use of buckets residing in different regions without requiring manual updates on the HELM_S3_REGION, AWS_REGION, or AWS_DEFAULT_REGION environment variables.

This HEAD bucket solution works with all kinds of S3 URIs containing the bucket name in the host part.

The basic idea behind the HEAD bucket solution and the "official confirmation" this behavior is expected and supported came from a comment on the AWS SDK Go repository: https://github.com/aws/aws-sdk-go/issues/720#issuecomment-243891223

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL