Skip to content

Support separate AWS roles for build and upload steps#10

Merged
furkansahin merged 2 commits into
ubicloud:mainfrom
iamKunalGupta:ci-more-secure
Mar 26, 2026
Merged

Support separate AWS roles for build and upload steps#10
furkansahin merged 2 commits into
ubicloud:mainfrom
iamKunalGupta:ci-more-secure

Conversation

@iamKunalGupta

@iamKunalGupta iamKunalGupta commented Feb 2, 2026

Copy link
Copy Markdown
Collaborator

The workflow previously used a single AWS authentication method
throughout all steps. This adds support for configuring separate
AWS roles for different operations:

  • aws_build_role_arn: Role assumed during build.sh execution
  • aws_role_arn: Role used for AMI upload and creation
  • Fallback to access keys when roles are not specified
  • Additional security options (KMS encryption, custom vmimport role)

aws_ami_regions can now contain AWS accounts in the for of:
region:accountId1:accountId2,region2:..., to which now the workflow
shares the AMI IDs. If for a region, an accountId is not present, the
workflow falls back to making the AMI public for that region/

Also adds workflow inputs for image_prefix and run_apt_upgrade to
provide more control over build customization.

@furkansahin furkansahin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand the s3_prefix related change. Is that because you're trying to take a precaution for overwriting an image in s3? Why would it be necessary considering the AMIs are the end product? We also already delete the image from s3 at the end of the run.

Comment thread .github/workflows/postgres-vm-image.yml
Comment thread .github/workflows/postgres-vm-image.yml
Comment thread .github/workflows/postgres-vm-image.yml
@furkansahin

Copy link
Copy Markdown
Member

Can you also rewrite the commit following the same guideline in ubicloud/ubicloud.

@iamKunalGupta

Copy link
Copy Markdown
Collaborator Author

s3_prefix

The path is now based on github.run_number number which will be unique for every run. This should prevent concurrency issues in case multiple people are testing or multiple wfs are running in parallel. Internally we add add date + branch + sha as suffix in the name to make it easier to differentiate. Maybe this suffix can be added directly in the wf.

@iamKunalGupta iamKunalGupta changed the title feat(ci): add support for build and CI roles Support separate AWS roles for build and upload steps Feb 2, 2026
serprex pushed a commit to serprex/postgres-vm-images that referenced this pull request Mar 20, 2026
The workflow previously used a single AWS authentication method
throughout all steps. This adds support for configuring separate
AWS roles for different operations:
- aws_build_role_arn: Role assumed during build.sh execution
- aws_role_arn: Role used for AMI upload and creation
- Fallback to access keys when roles are not specified
- Additional security options (KMS encryption, custom vmimport role)

aws_ami_regions can now contain AWS accounts in the for of:
`region:accountId1:accountId2,region2:...`, to which now the workflow
shares the AMI IDs. If for a region, an accountId is not present, the
workflow falls back to making the AMI public for that region/

Also adds workflow inputs for image_prefix and run_apt_upgrade to
provide more control over build customization.
@furkansahin furkansahin merged commit c139809 into ubicloud:main Mar 26, 2026
4 checks passed
iamKunalGupta added a commit to iamKunalGupta/postgres-vm-images that referenced this pull request May 5, 2026
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.

2 participants