Repository navigation
Conversation
A recipe version can name a subscribed AWS Marketplace AMI product as its base image through an optional parentImageProductId. A new GET /projects/{projectId}/marketplace-images lists the products the AMI factory account is subscribed to, resolved to their latest AMI through the Marketplace AMI alias in SSM, so images delivered over Marketplace can be built on like the default base images. The product has to match the recipe's platform and architecture and boot from /dev/sda1, and the volume size has to cover its root volume.
Also fixes the recipe version update event, which published the previous parent image and volume size, so a changed base image or size was never rebuilt.
ganhammar
force-pushed
the
feat/marketplace-base-image
branch
from
September 30, 2026 11:25
fbe4964 to
1124e9c
Compare
A product whose AMI has no EBS mapping on /dev/sda1 is left out of the listing instead of failing the whole request.
Contributor
Author
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.
What does this change do?
Lets a recipe version build on a subscribed AWS Marketplace AMI product instead of the default operating system image. Today a recipe can only build on the fixed base images from the system configuration mapping, and publishing only accepts AMIs that VEW built itself. So there's no way to use an AMI delivered through Marketplace, for example one that another VEW deployment publishes there. See #115.
GET /projects/{projectId}/marketplace-imageslists the AMI products the AMI factory account is subscribed to, taken from its Marketplace agreements. Each product resolves to its latest AMI through the Marketplace AMI alias/aws/service/marketplace/<product-id>/latest, the same kind of SSM lookup the default base images use. Only products with an alias in the region that boot from/dev/sda1are listed.parentImageProductId. The product has to be in that list and match the recipe's platform and architecture, and the volume size has to be at least its root volume. Its AMI becomesparentImageUpstreamId, so pipelines, recipe testing and publishing work as before. Automated versions carry the product ID over.aws-marketplace:SearchAgreementsandaws-marketplace:GetProduct, and product contributors get a new Cedar action,GetMarketplaceImages.It also fixes an existing bug in the recipe version update event, which published the previous parent image and volume size, so a changed base image or size wasn't rebuilt.
Type of change
How was this tested?
Unit tests cover the handlers, the new adapter and the API. The packaging, infra and authorization suites pass, and so do the web app's lint, type check and tests. We also ran it against real Marketplace subscriptions. The listing code returned the subscribed products from the live APIs, and an Image Builder build on a Marketplace product's AMI passed build and test, with the recipe set up the way VEW does it and an encrypted root volume larger than the AMI's. The resulting AMI kept the product code, size and encryption through VEW's copy and share.
Checklist
CONTRIBUTING.mdNotes for reviewers
/dev/sda1products are offered, because recipes, recipe testing and the workbench and virtual target templates all map the root volume there.parentImageProductIdon an update switches back to the default image, like the other fields on that PUT.