GetClients returns all AWS service clients
()
| 120 | |
| 121 | // GetClients returns all AWS service clients |
| 122 | func (f *ClientFactory) GetClients() *Clients { |
| 123 | // Get account ID |
| 124 | accountID, _ := f.GetAccountID(context.Background()) |
| 125 | |
| 126 | return &Clients{ |
| 127 | CloudFormation: cloudformation.New(f.session), |
| 128 | CloudWatchLogs: cloudwatchlogs.New(f.session), |
| 129 | Lambda: lambda.New(f.session), |
| 130 | S3: s3.New(f.session), |
| 131 | STS: sts.New(f.session), |
| 132 | AccountID: accountID, |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | // GetAccountID returns the AWS account ID, caching the result |
| 137 | func (f *ClientFactory) GetAccountID(ctx context.Context) (string, error) { |