Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( GO_Runtime = awslambda.Runtime_GO_1_X() PROVIDED_Runtime = awslambda.Runtime_PROVIDED_AL2() X86_Architecture = awslambda.Architecture_X86_64() ARM64_Architecture = awslambda.Architecture_ARM_64() )
Functions ¶
func NewLambdaFunction ¶
func NewLambdaFunction(scope constructs.Construct, id string, opts *LambdaOpts) awslambda.Function
NewLambdaFunction builds a Go Lambda with sensible defaults.
Types ¶
type LambdaOpts ¶
type LambdaOpts struct { FunctionName string FunctionDescription string CodeURI string Handler string Runtime awslambda.Runtime Architecture awslambda.Architecture BuildOpts }
LambdaOpts is a collection of options for configuring an AWS Lambda Function.
CodeURI is the relative path from the project root to the source directory. Handler is the name of the executable that will run in the Lambda environment.
type LocalBundler ¶
type LocalBundler struct { CodeUri string Handler string // contains filtered or unexported fields }
LocalBundler satisfies the awscdk.ILocalBundling interface by implementing TryBundle. It will run go build so that the CDK can bundle the function assets correctly.
The implementation of the interface must be a struct as it must be a marshalable object in Go, therefore a functional approach is not possible.
func (*LocalBundler) TryBundle ¶
func (lb *LocalBundler) TryBundle(outputDir *string, options *awscdk.BundlingOptions) *bool
TryBundle is used to build the Lambda function in the local environment. It returns `false` if unable to build the function, and `true` if it was successful. It will place the build output in the provided `outputDir`.
For more information see: https://aws.amazon.com/blogs/devops/building-apps-with-aws-cdk/