Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRegionNotExist ¶
IsRegionNotExist tries to determine if the error is caused by a region not existing, as would be the case in a user typo.
Types ¶
type AWSClient ¶
type AWSClient interface { AssumeRole(string, *string) (*sts.Credentials, error) GetFederationURL(string, string) (string, error) GetRegionList() ([]*Region, error) }
AWSClient is a client for working with the AWS APIs.
Instances of AWSClient are safe for concurrent access.
func NewAWSClientFromAccount ¶
func NewAWSClientFromAccount(ctx context.Context, a *models.Account, sc secrets.Client) (AWSClient, error)
NewAWSClientFromAccount returns a new AWSClient based on an account.
An account is actually more accurately called an assumable role. Each account contains a vault material set path which is used to fetch all of the credentials for that AWS account and is filtered to one assumable role ARN which is used as the scope for this AWS client. Thus even if an account has multiple roles there must be one instance of the AWS client per account/role pair.