createClient creates a new AWS KMS client with the provided config.
(config *aws.Config)
| 424 | |
| 425 | // createClient creates a new AWS KMS client with the provided config. |
| 426 | func (key MasterKey) createClient(config *aws.Config) *kms.Client { |
| 427 | return kms.NewFromConfig(*config, func(o *kms.Options) { |
| 428 | if key.baseEndpoint != "" { |
| 429 | o.BaseEndpoint = aws.String(key.baseEndpoint) |
| 430 | } |
| 431 | }) |
| 432 | } |
| 433 | |
| 434 | // createSTSConfig uses AWS STS to assume a role and returns a config |
| 435 | // configured with that role's credentials. It returns an error if |
no test coverage detected