Skip to content

[DPC-5295] move "arm64" to a variable so services can incrementally opt in#442

Merged
lukey-luke merged 3 commits intomainfrom
ls/dpc-5295-lambda-hash-updates
Apr 14, 2026
Merged

[DPC-5295] move "arm64" to a variable so services can incrementally opt in#442
lukey-luke merged 3 commits intomainfrom
ls/dpc-5295-lambda-hash-updates

Conversation

@lukey-luke
Copy link
Copy Markdown
Contributor

@lukey-luke lukey-luke commented Apr 13, 2026

🎫 Ticket

DPC-5295

🛠 Changes

  • moved architecture to function module's variable.tf
    • this means teams can incrementally opt into the ARM64 changes (see example in context below)

ℹ️ Context

  • DPC is the first of partner API teams to migrate to arm64 architecture.
  • This change to the function module needs to happen before services that call it update the hash. The merge commit of the pull request will have the hash that should be used. See example here: DPC-5295 Update SHA to inherit Lambda function version update #441
  • Previously I hardcoded architectures = ["arm64"]
    • Other teams share this function module and it needs to be backwards compatible during the transition period
    • This works for python code in this repository, but doesn't work for code that is compiled for x86
    • DPC will update CI to compile .go code for arm64
      • associated workflows live here: dpc-app/.github/workflows
      • workflow updates will be accompanied by changes in cdap repository to use arm64 for ONLY dpc
      • see example for api-waf-sync below:
module "api_waf_sync_function" {
  source = "github.com/CMSgov/cdap/terraform/modules/function?ref=<new_hash>"

  app          = var.app
  env          = var.env
  architecture = var.app == "dpc" ? "arm64" : "x86_64"
  ...
}

🧪 Validation

Verified that specifying latest function module hash without architecture variables keeps things on x86

  • Screenshot 2026-04-13 at 3 49 04 PM

Verified arm64 code runs when architecture is specified

  • compiled DPC api waf sync from arm64 architecture HERE
  • deployed terraform with architecture variable set to "arm64" in the test environment
  • manually invoked lambda and verified it executes successfully
aws lambda invoke --function-name dpc-test-api-waf-sync --region us-east-1 response.json
Screenshot 2026-04-13 at 3 27 00 PM Screenshot 2026-04-13 at 3 24 51 PM

@lukey-luke lukey-luke requested a review from a team as a code owner April 13, 2026 22:39
@lukey-luke lukey-luke changed the title move "arm64" to a variable so services can incrementally opt in [DPC-5295] move "arm64" to a variable so services can incrementally opt in Apr 13, 2026
@lukey-luke
Copy link
Copy Markdown
Contributor Author

See also draft for updating function module imports to use arm64 for DPC: https://github.com/CMSgov/cdap/pull/443/changes

Copy link
Copy Markdown
Contributor

@mianava mianava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We will switch the default upon teams confirmed migrations.

Copy link
Copy Markdown

@Jose-verdance Jose-verdance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lukey-luke lukey-luke merged commit 2874c72 into main Apr 14, 2026
2 checks passed
@lukey-luke lukey-luke deleted the ls/dpc-5295-lambda-hash-updates branch April 14, 2026 17:33
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.

5 participants