terraform-aws-modules / terraform-aws-lambda

Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/lambda/aws
Apache License 2.0
886 stars 656 forks source link

feat: Rebuild deployment package on architecture change #453

Closed Dunedan closed 8 months ago

Dunedan commented 1 year ago

Description

Rebuild the deployment package on CPU architecture change.

Motivation and Context

Previously the CPU architecture configured for an AWS Lambda Function wasn't taken into account when generating the file name hash for the deployment package. This meant that changing the CPU architecture of an AWS Lambda Function did not trigger a rebuild of the deployment package. As deployment packages might contain CPU-specific binaries, this could've caused deployments breaking AWS Lambda Functions.

Breaking Changes

As the file name hash changes due to these changes, a rebuild of all deployment packages will happen once using a version of this Terraform module with the changes included.

Also not really a breaking change, but a minor annoyance of the current implementation is that switching from an unconfigured CPU architecture to x86-64 will also result in a rebuild of the deployment package, as that results in a switch of the value for the architecture from null to ["x86-64"]. However, I'm not sure what'd be the best way to fix that and as it only happens when intentionally changing the architecture attribute, I believe it's fine as is as well.

github-actions[bot] commented 1 year ago

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

Dunedan commented 1 year ago

not stale

Dunedan commented 1 year ago

var.compatible_architectures and var.compatible_runtimes get considered for rebuilding the deployment package now as well.

github-actions[bot] commented 10 months ago

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

Dunedan commented 10 months ago

Not stale, just waiting for @antonbabenko to have a look at it again.

github-actions[bot] commented 9 months ago

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

Dunedan commented 9 months ago

still relevant

github-actions[bot] commented 8 months ago

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

github-actions[bot] commented 8 months ago

This PR was automatically closed because of stale in 10 days

github-actions[bot] commented 7 months ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.