Skip to content

Grant CI deploy role S3 bucket CORS permissions - #126

Merged
wasimxyz merged 1 commit into
stagingfrom
fix/ci-deploy-role-bucket-cors
Jul 7, 2026
Merged

Grant CI deploy role S3 bucket CORS permissions#126
wasimxyz merged 1 commit into
stagingfrom
fix/ci-deploy-role-bucket-cors

Conversation

@wasimxyz

@wasimxyz wasimxyz commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • The staging Deploy Lambda function workflow failed at the Deploy SAM stack step with a 403: the CI deploy role (data-hub-deploy-<env>/GitHubActions) is not authorized to perform s3:PutBucketCORS, which the buckets' CorsConfiguration requires. The stack rolled back.
  • Add s3:GetBucketCORS/s3:PutBucketCORS to the GitHubActionsDeployRole SamDeploy policy, scoped to the three data buckets (raw/processed/archives), mirroring the existing notification statement.
  • Update the CI deploy-role note in developer-docs/ci-and-deployment.md, including the caveat that the first deploy granting the permission must be run by an admin (make sam-deploy), since CI can't grant itself a permission and use it in the same changeset.
  • Add a make sam-status ENV=<env> helper to check CloudFormation stack state (useful for spotting UPDATE_IN_PROGRESS before retrying a deploy).

Test plan

  • Admin runs make sam-deploy ENV=staging once to land the new permission + CORS config.
  • Confirm subsequent CI deploys succeed (no s3:PutBucketCORS 403).
  • make sam-status ENV=staging returns the stack status.

Made with Cursor

The staging deploy failed because the CI role lacks s3:PutBucketCORS,
which the new bucket CorsConfiguration requires. Add Get/PutBucketCORS
scoped to the three data buckets, note the admin-first-deploy caveat in
the docs, and add a sam-status helper to check stack state.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
data-hub Ready Ready Preview, Comment Jul 7, 2026 8:59pm

Request Review

@wasimxyz wasimxyz self-assigned this Jul 7, 2026
@wasimxyz
wasimxyz merged commit 966f4e2 into staging Jul 7, 2026
7 checks passed
@wasimxyz
wasimxyz deleted the fix/ci-deploy-role-bucket-cors branch July 7, 2026 21:00
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.

1 participant