aws

package
v0.0.0-...-bc2d38f Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigRegion represents region key required in the map "config"
	ConfigRegion = "region"
	// ConfigRole represents the key for the ARN of the role which can be assumed.
	// It is optional.
	ConfigRole = "role"

	// ConfigEFSVaultName represents the key for the EFS vault name in the map
	// "config". It is optional.
	ConfigEFSVaultName = "efsVaultName"

	// ConfigWebIdentityToken represents the key for AWS Web Identity token
	ConfigWebIdentityToken = "webIdentityToken"

	// AccessKeyID represents AWS Access key ID
	AccessKeyID = "AWS_ACCESS_KEY_ID"
	// SecretAccessKey represents AWS Secret Access Key
	SecretAccessKey = "AWS_SECRET_ACCESS_KEY"
	// SessionToken represents AWS Session Key
	SessionToken = "AWS_SESSION_TOKEN"
	// Region represents AWS region
	Region = "AWS_REGION"

	// From AWS SDK "aws/session/env_config.go"
	WebIdentityTokenFilePathEnvKey = "AWS_WEB_IDENTITY_TOKEN_FILE"
	RoleARNEnvKey                  = "AWS_ROLE_ARN"

	// TODO: Make this configurable via `config`
	AssumeRoleDurationDefault = 60 * time.Minute
	AssumeRoleDuration        = "assumeRoleDuration"
)

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(ctx context.Context, config map[string]string) (awsConfig *aws.Config, region string, err error)

GetConfig returns a configuration to establish AWS connection and connected region name.

func GetCredentials

func GetCredentials(ctx context.Context, config map[string]string) (*credentials.Credentials, error)

GetCredentials returns credentials to use for AWS operations

func IsAwsCredsValid

func IsAwsCredsValid(ctx context.Context, config map[string]string) (bool, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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