Skip to main content

CDK Construct for AWS Lambda in Golang

Project description

GitHub version npm version NuGet version PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rwilinski.aws-lambda-golang-0.1.1.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rwilinski.aws_lambda_golang-0.1.1-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file rwilinski.aws-lambda-golang-0.1.1.tar.gz.

File metadata

  • Download URL: rwilinski.aws-lambda-golang-0.1.1.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for rwilinski.aws-lambda-golang-0.1.1.tar.gz
Algorithm Hash digest
SHA256 172f3ec3f437c054a93db7f8af447e26e409ccdc7e1a93fb5760d7068432e5e7
MD5 33d3a77ee2523e3bf5d8c2b384dd50ca
BLAKE2b-256 59be41a3759d119388411834932f2867193fefc842de0ab5bb70807ce3dccfbb

See more details on using hashes here.

File details

Details for the file rwilinski.aws_lambda_golang-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rwilinski.aws_lambda_golang-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for rwilinski.aws_lambda_golang-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da7df999a2f4d823ba906d4fcf58e605ee130d1032639a0e5be0582797fa90ab
MD5 f87048cb04d851ef9de73842282be111
BLAKE2b-256 c3a0b88e396473a05d28b609fc36910daf25925d913426b453ec3614be3fd9cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page