Skip to content

Match the Lambda deploy artifact name to the build - #82

Merged
beetlebugorg merged 1 commit into
mainfrom
fix/lambda-deploy-artifact
Aug 27, 2026
Merged

beetlebugorg merged 1 commit into
mainfrom
fix/lambda-deploy-artifact

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

What changes

The build writes build/lambda-linux-<arch>.zip. Terraform read ../build/lambda-<arch>.zip, so filebase64sha256 failed and make deploy-lambda-arm64 could not apply.

  • Read ../build/lambda-linux-${var.platform}.zip in the Lambda module.
  • Add a platform variable to the root module and pass it to the child. An amd64 deploy no longer needs an edit to the child default. The variable accepts arm64 and amd64.
  • Map the platform to the AWS architecture name. The build names its artifact with the Go architecture, amd64, while aws_lambda_function.architectures takes x86_64. Passing amd64 straight through would have been rejected by AWS, so the pass-through alone would not have made an amd64 deploy work.

Verify

terraform validate and terraform fmt -check -recursive pass.

terraform console in the Lambda module resolves both platforms:

platform=arm64  ->  ["../build/lambda-linux-arm64.zip", "arm64"]
platform=amd64  ->  ["../build/lambda-linux-amd64.zip", "x86_64"]

Dockerfile.lambda line 27 writes lambda-linux-${TARGETARCH}.zip, and a make lambda-amd64 run exports lambda-linux-amd64.zip. The names match.

@beetlebugorg
beetlebugorg merged commit 385ccf0 into main Aug 27, 2026
3 checks passed
@beetlebugorg
beetlebugorg deleted the fix/lambda-deploy-artifact branch August 27, 2026 22:27
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