Registry / aws / cdk-lambda-layer-curl

cdk-lambda-layer-curl

JSON →
library2.0.838pypypi✓ verified 85d ago

AWS CDK construct that packages the curl binary as a Lambda Layer for Python 3.8+ runtimes. Current version 2.0.838. Pre-built layer version is published alongside.

pip install cdk-lambda-layer-curl
INSTALL
IMPORT
SIG · CDK-LAMBDA-LAYER-C
C
cdk-lambda-layer-curl
awspythonv2.0.838
Install
17.9s avg
Import
Disk
401MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.838 · 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 · 362.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 17.9s · import 0.000s · 363MB
401MB installed
● package 401MB
Code
Verified usage

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

CurlLayer
from cdk_lambda_layer_curl import CurlLayer

Creates a Curl Lambda Layer in your stack.

from aws_cdk import App, Stack from cdk_lambda_layer_curl import CurlLayer app = App() stack = Stack(app, "MyStack") curl_layer = CurlLayer(stack, "CurlLayer") # Use curl_layer.layer_version to attach to a Lambda function app.synth()
Debug
Known issues
gotchaThe construct uses pre-built layers for specific regions. If deploying in a region not supported, you must build the layer yourself from source.
fix
Check the README for region availability or consider building from source using Docker.
affects: all
breakingIn version 2.0+, the import path changed from `cdk_lambda_layer_curl.curl` to `cdk_lambda_layer_curl` directly.
fix
Update imports: `from cdk_lambda_layer_curl import CurlLayer`
affects: <2.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cdk_lambda_layer_curl'
The library is not installed or the wrong import path used.
fix
Run `pip install cdk-lambda-layer-curl` and use `from cdk_lambda_layer_curl import CurlLayer`.
jsii.errors.JSIIError: There is already a construct with name 'CurlLayer' in Stack [...]
Two CurlLayer constructs with the same logical ID in the same stack.
fix
Give each CurlLayer instance a unique second argument (e.g., 'CurlLayer1', 'CurlLayer2').
Upgrade
Version history
2.0.838latest on PyPI · released Sep 2, 2024
Audit
Dependencies
aws-cdk-librequiredAWS CDK library required to use the construct.
constructsrequiredBase constructs library required.
Agent activity
20 hits · last 30 days
node
18
Resources