-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BREAKING CHANGE - Align content bucket name with url #394
base: main
Are you sure you want to change the base?
Conversation
BREAKING CHANGE: requires bucket replacement, must be deployed carefully and with downtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, the way the content bucket is used is very short-term. When a user makes a request to run code, we upload their sources/assets to the bucket, then run their code. Once that run is done, we no longer care about the content that was in the bucket. So the service degradation would be very brief, and I don't think we would need to copy over any content from the old bucket to the new bucket.
@molly-moen Awesome! I haven't looked at the code to see if we're already doing it, but perhaps we should add some lifecycle rules to clean up old content. edit: we do!
|
moved from global iam stack to per-environment app stack
Worked on this for a while today and discovered some issues. The new bucket name is not compatible with our method of applying permissions. Converting to a draft. We define the Roles used by the lambdas up in the iam.yml template, which is applied once per AWS Account. those roles are granted permission to all buckets with names like Ideally, we would grant permissions for the bucket in the same place that we create the bucket, in the app template. This branch as of this comment attempts to create the IAM policy alongside the bucket and apply it to the roles. Unfortunately, the Cloudformation service role that deploys the template does not have IAM putRolePolicy permission. I do believe that the policy and role should be created in the app template (therefore limiting each lambda to only access it's own environment's content bucket), but this will require further troubleshooting with IAM roles and pipeline permissions. NEXT STEPS
|
This change aligns the name of the Content Bucket with the name of the URL and CDN used to access. This is a common practice for S3-backed domains, and helps to eliminate the one use of
IsDevCondition
in our template.Deployment
Deployed as-is, this will attempt to delete the existing content bucket. Here is a possible plan for deploying this change:
DeletionPolicy: Retain
to the ContentBucket resourceThis would result in service degradation between step 2 and the completion of step 3, because some content would be missing until it is restored.