Registry / aws / aws-cdk-aws-lambda-go-alpha

aws-cdk-aws-lambda-go-alpha

JSON →
library2.260.0a0pypypiunverified

Alpha CDK construct library for deploying AWS Lambda functions written in Go. Provides the GoCode class to bundle Go code with build, dependencies, and bundling options. Part of the AWS CDK, version 2.252.0a0, alpha quality with frequent releases tied to CDK core.

pip install aws-cdk-aws-lambda-go-alpha==2.252.0a0
INSTALL
IMPORT
SIG · AWS-CDK-AWS-LAMBDA
A
aws-cdk-aws-lambda-go-alpha
awspythonv2.260.0a0
Install
18.0s avg
Import
Disk
399MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.252.0a0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 361.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 18.0s · import 0.000s · 362MB
399MB installed
● package 399MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GoCode
from aws_cdk.aws_lambda_go_alpha import GoCode
from aws_cdk.aws_lambda_go_alpha import GoCode

Minimal CDK stack defining a Go Lambda function using GoCode with asset bundling.

import aws_cdk as cdk from aws_cdk.aws_lambda import Function, Runtime, Code from aws_cdk.aws_lambda_go_alpha import GoCode class MyStack(cdk.Stack): def __init__(self, scope, id, **kwargs): super().__init__(scope, id, **kwargs) # Bundles Go code from the specified directory go_code = GoCode.from_asset( path="./my-go-lambda", cmd=["go", "build", "-o", "/asset/main"], ) Function( self, "GoFunction", runtime=Runtime.PROVIDED_AL2, # Use custom runtime for Go handler="main", code=go_code, ) app = cdk.App() MyStack(app, "GoLambdaStack") app.synth()
cdk --version
Debug
Known issues
deprecatedThe alpha module 'aws-cdk-aws-lambda-go-alpha' is in alpha status. The API may change in breaking ways in future releases.
fix
Pin to a specific alpha version and test upgrades carefully.
affects: all
gotchaGoCode.from_asset expects a directory containing a Go module (go.mod). If you use a single file, bundling may fail.
fix
Ensure the path points to a directory with go.mod and source files.
affects: all
gotchaThe runtime for Go Lambda must be either Runtime.PROVIDED_AL2 or Runtime.PROVIDED (not a runtime like Python/Node). Using wrong runtime causes invocation errors.
fix
Set runtime=Runtime.PROVIDED_AL2 when using GoCode.
affects: all
breakingVersions before 2.25.0 used a different import path (`aws_cdk.aws_lambda_go`). The module was moved to alpha prefix.
fix
Update imports to `from aws_cdk.aws_lambda_go_alpha import GoCode`.
affects: <2.25.0
Upgrade
Version history
2.260.0a0latest on PyPI · released Jun 16, 2026
Audit
Dependencies
aws-cdk-librequiredCore CDK library required. Must match major version.
aws-cdk-aws-lambda-go-alphaoptionalConstructions for Python Lambda, not Go.
Agent activity
49 hits · last 30 days
node
42
OpenAI (training)
1
Resources
aws-cdk-aws-lambda-go-alpha — pip install aws-cdk-aws-lambda-go-alpha · libregistry