Documentation ¶
Index ¶
- Constants
- func GetConfig(ctx context.Context, config map[string]string) (awsConfig *aws.Config, region string, err error)
- func GetCredentials(ctx context.Context, config map[string]string) (*credentials.Credentials, error)
- func IsAwsCredsValid(ctx context.Context, config map[string]string) (bool, error)
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.