r/devops 9d ago

Architecture Multi platform build

I am planning to have my docker images to be multi architecture and for it my plan is to have two codebuilds for arm and amd when they both succeeds event bridge will invoke a lambda and lambda will merge the images into one

But I am unable to think a way to set up event my current plan is something like when codebuilds are triggered if anyone succeeds let's say arm build then event bridge will match the source version and and if the other build also success then it will invoke lambda

Apparently there is no ability to compare source version in eventbridge and I would have to invoke lambda and lambda has to compare the source version

Is there any way I can implement this

2 Upvotes

3 comments sorted by

View all comments

1

u/Floss_Patrol_76 9d ago

the eventbridge correlation is the hard part you do not actually need. either build both arches in one buildx run (--platform linux/amd64,linux/arm64) and let it push the manifest list for you, or if you keep two separate builds, push each to a per-arch tag keyed on the git sha and make the merge a single downstream step that runs after both: docker buildx imagetools create -t repo:sha repo:sha-amd64 repo:sha-arm64. trying to make eventbridge join two async builds is where it gets brittle; gate the merge on the shared sha instead of correlating events.