MCPcopy Create free account
hub / github.com/dan-v/lambda-nat-proxy / GetClients

Method GetClients

internal/aws/clients.go:122–134  ·  view source on GitHub ↗

GetClients returns all AWS service clients

()

Source from the content-addressed store, hash-verified

120
121// GetClients returns all AWS service clients
122func (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
137func (f *ClientFactory) GetAccountID(ctx context.Context) (string, error) {

Callers 5

TestGetClientsFunction · 0.95
runDestroyFunction · 0.95
runStatusFunction · 0.95
autoDetectS3BucketFunction · 0.95
runDeployFunction · 0.95

Calls 1

GetAccountIDMethod · 0.95

Tested by 1

TestGetClientsFunction · 0.76