Metadata-Version: 2.1
Name: rwilinski.aws-lambda-golang
Version: 0.1.0
Summary: CDK Construct for AWS Lambda in Golang
Home-page: https://github.com/RafalWilinski/aws-lambda-golang-cdk
Author: Rafal Wilinski<raf.wilinski@gmail.com>
License: Apache-2.0
Project-URL: Source, https://github.com/RafalWilinski/aws-lambda-golang-cdk.git
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Typing :: Typed
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: jsii (<2.0.0,>=1.6.0)
Requires-Dist: publication (>=0.0.3)
Requires-Dist: aws-cdk.aws-lambda (<2.0.0,>=1.43.0)
Requires-Dist: aws-cdk.core (<2.0.0,>=1.43.0)
Requires-Dist: constructs (<4.0.0,>=3.0.3)

[![npm version](https://badge.fury.io/js/aws-lambda-golang.svg)](https://badge.fury.io/js/aws-lambda-golang)

## Amazon Lambda Golang Construct

This library provides constructs for Golang (Go 1.11 and 1.12 because of go modules) Lambda functions.

### Golang Function

Define a `GolangFunction`:

```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
lambda.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](https://dynobase.dev)


