CDK Construct for AWS Lambda in Golang
Project description
Amazon Lambda Golang Construct
This library provides constructs for Golang (Go 1.11 and 1.12 because of go modules) Lambda functions.
Installing
In Typescript:
npm i aws-lambda-golang --save
# or using yarn
yarn add aws-lambda-golang
In .NET:
dotnet add package rwilinski.GolangFunction --version 0.1.0
In Python using Pip:
pip install rwilinski.aws-lambda-golang
In Java using Maven:
</code></pre>
<h3>Usage</h3>
<p>In Typescript:</p>
<pre lang="python"><code># Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import aws_lambda_golang as golang
golang.GolangFunction(self, "my-handler")
By default, the construct will use the name of the defining file and the construct's id to look up the entry file:
.
├── stack.ts # defines a 'GolangFunction' with 'my-handler' as id
├── stack/my-handler/main.go
├── stack/my-handler/go.mod
├── stack/my-handler/go.sum
Configuring build
The GolangFunction
construct exposes some options via properties: buildCmd
, buildDir
, entry
and handler
, extraEnv
.
By default, your Golang code is compiled using go build -ldflags="-s -w"
command with GOOS=linux
env variable.
Project sponsored by Dynobase
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for rwilinski.aws-lambda-golang-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 172f3ec3f437c054a93db7f8af447e26e409ccdc7e1a93fb5760d7068432e5e7 |
|
MD5 | 33d3a77ee2523e3bf5d8c2b384dd50ca |
|
BLAKE2b-256 | 59be41a3759d119388411834932f2867193fefc842de0ab5bb70807ce3dccfbb |
Close
Hashes for rwilinski.aws_lambda_golang-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da7df999a2f4d823ba906d4fcf58e605ee130d1032639a0e5be0582797fa90ab |
|
MD5 | f87048cb04d851ef9de73842282be111 |
|
BLAKE2b-256 | c3a0b88e396473a05d28b609fc36910daf25925d913426b453ec3614be3fd9cf |