lambda

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: BSD-3-Clause Imports: 9 Imported by: 2

README

go-aws-lambda

Opinionated Go package for doing things with AWS Lambda functions.

Documentation

Documentation is incomplete at this time.

Tools

$> make cli go build -mod vendor -o bin/invoke cmd/invoke/main.go

invoke
$> ./bin/invoke \
	-lambda-uri 'lambda://{FUNCTION_NAME}?region={AWS_REGION}&credentials={CREDENTIALS}' \
	-json '{JSON_ENCODED_ARGS}'

Where {CREDENTIALS} is expected to be a aaronland/go-aws-session credentials string:

Label Description
anon: Empty or anonymous credentials.
env: Read credentials from AWS defined environment variables.
iam: Assume AWS IAM credentials are in effect.
sts:{ARN} Assume the role defined by {ARN} using STS credentials.
{AWS_PROFILE_NAME} This this profile from the default AWS credentials location.
{AWS_CREDENTIALS_PATH}:{AWS_PROFILE_NAME} This this profile from a user-defined AWS credentials location.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LambdaFunction

type LambdaFunction struct {
	// contains filtered or unexported fields
}

func NewLambdaFunction

func NewLambdaFunction(ctx context.Context, uri string) (*LambdaFunction, error)

func NewLambdaFunctionWithDSN

func NewLambdaFunctionWithDSN(dsn string, func_name string, func_type string) (*LambdaFunction, error)

func NewLambdaFunctionWithService

func NewLambdaFunctionWithService(svc *aws_lambda.Lambda, func_name string, func_type string) (*LambdaFunction, error)

func NewLambdaFunctionWithSession

func NewLambdaFunctionWithSession(sess *aws_session.Session, func_name string, func_type string) (*LambdaFunction, error)

func (*LambdaFunction) Invoke

func (f *LambdaFunction) Invoke(ctx context.Context, payload interface{}) (*aws_lambda.InvokeOutput, error)

func (*LambdaFunction) InvokeWithJSON added in v0.0.7

func (f *LambdaFunction) InvokeWithJSON(ctx context.Context, payload []byte) (*aws_lambda.InvokeOutput, error)

Directories

Path Synopsis
cmd
Package functionurl provides methods for working with AWS Lambda Function URLs.
Package functionurl provides methods for working with AWS Lambda Function URLs.

Jump to

Keyboard shortcuts

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