Repository navigation
Use published Lambda package instead of downloading one - #1
Merged
Merged
Conversation
Accept an S3 object or a local zip, expose runtime, handler, architecture, timeout, memory and reserved concurrency, drop the plan-time download, and validate the token and ingest host.
Add maximum_retry_attempts through an event invoke config so a failed batch can be dropped rather than resent, set retention on the function's log group, pass the label context to the Lambda module, order the subscription filters after the invoke permission, skip every resource when disabled and require Terraform 1.9.
Describe the region variable and pass it to the AWS provider, which had no configuration, and require the same Terraform and AWS provider versions as the module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The module now takes an already-published Lambda package and fetches nothing at plan time. Previously a script downloaded the package on every plan. That script needed
python3and a bundled CA file, and its checksum was pinned to areleases/latestURL, so the plan broke whenever Better Stack published a new release.artefact_s3_bucket,artefact_s3_key, optionalartefact_s3_object_version) or a local zip (artefact_filename). Exactly one must be set.lambda_runtime,lambda_handler,lambda_architectures,timeout,memory_sizeandreserved_concurrent_executionsare configurable. The defaults match Better Stack's stocklogtail-aws-lambdapackage (nodejs22.x,index.handler,x86_64, 30 s).lambda_environment_variablesis merged over the two baseline variables,BETTER_STACK_SOURCE_TOKENandBETTER_STACK_ENTRYPOINT.better_stack_ingest_hosttakes a bare host;https://is added if missing. An empty token or anhttp://host fails the plan.maximum_retry_attempts(default 2) sets the async retry count. Set it to 0 to drop a batch Better Stack rejects rather than resend it, because the stock package resends whole batches.cloudwatch_logs_retention_in_days(default 14) sets the retention for the Lambda's own log group.enabled = falsecreates nothing.required_versionis now>= 1.9.0. The AWS provider is now>= 6.0.0.Breaking:
package_urlandpackage_checksumare removed, and an artefact input is required. Log groups are still looked up with a data source, so they must exist when you plan.Tests performed
tofu fmt -check -recursivepasses.validateandplanhave not run yet. The first consumer plan, through theterraform-aws-moduleswrapper, is the first real check.