awsx-common

command module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

Documentation for getting lambda clients

This package is created for getting different type of aws service clients for synectiks appkube-awsx project

List of function that are created in this package

S.No. Functions Accepted arguments Return type (from aws)
1. GetClient() (auth Auth, clientType string) interface{}

These function accepts 'auth' struct that is following

    type Auth struct {
        Region              string
        CrossAccountRoleArn string
        AccessKey           string
        SecretKey           string
        ExternalId          string
    }
List of client types
    const (
        LAMBDA_CLIENT  = "lambda"
        COST_EXPLORER  = "costExplorer"
        CLOUDWATCH_LOG = "cloudWatchLog"
    )

Example of using function

example for lambda

    auth := client.Auth{
        "us-east-1",
        os.Getenv("AWS_CROSS_ARN"),
        os.Getenv("AWS_ACCKEY"),
        os.Getenv("AWS_SECKEY"),
        os.Getenv("AWS_EXTERNALID"),
    }

    lambdaClient := client.GetClient(auth, client.LAMBDA_CLIENT).(*lambda.Lambda)
Project structure
client
    - client.go
    - session.go

main.go (This is just for testing)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL