Skip to content

feat: automatic Lambda runtime detection from layer metadata#41

Open
Jno21 wants to merge 1 commit into
DataDog:mainfrom
Jno21:feat/automatic-lambda-runtime
Open

feat: automatic Lambda runtime detection from layer metadata#41
Jno21 wants to merge 1 commit into
DataDog:mainfrom
Jno21:feat/automatic-lambda-runtime

Conversation

@Jno21

@Jno21 Jno21 commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

The previous implementation hardcoded runtime selection based on layer version numbers (e.g., >= 94python3.14). This required manual updates whenever Datadog updated the forwarder layer.

We could instead read directly from the data source aws_lambda_layer_version and get compatible_runtimes. This makes the code easier to maintain.

Implementation

Picks the latest one using reverse(sort(tolist(...)))[0]. The sort is necessary because Terraform does not guarantee set ordering, and reverse ensures we always pick the highest Python version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant