Skip to content
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

PLFM-8554: Configure IAM User to access S3 #3

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

brucehoff
Copy link
Member

The Docker Registry will not use the IAM Role provided by ECS. It will only use an IAM key pair. So we modify the stack to add an IAM user having access to the bucket and inject its key pair into the container as environment variables.

@brucehoff brucehoff requested a review from a team as a code owner October 30, 2024 03:19
@@ -40,6 +40,7 @@
"OwnerEmail": "[email protected]"
},
"STACK_NAME_PREFIX": "registry-dev",
"BUCKET_NAME": "dev-docker-registry.sagebase.org",
Copy link
Member

Choose a reason for hiding this comment

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

bucket names are unique in a region. To ensure a bucket name is unique i would not set this param and let AWS create a unique bucket name. If you insist on naming the bucket then I would add add the AWS account ID somewhere to the name.

Copy link
Member Author

Choose a reason for hiding this comment

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

bucket names are unique in a region.

In fact bucket names are unique across all standard regions, not just within a region. From the doc's

Amazon S3 supports global buckets, which means that each bucket name must be unique across all AWS accounts in all the AWS Regions within a partition. A partition is a grouping of Regions. AWS currently has three partitions: aws (Standard Regions), aws-cn (China Regions), and aws-us-gov (AWS GovCloud (US)).

I like the idea of letting CloudFormation create a unique name for a bucket however the Docker registry already has a bucket containing production data, and this deployment will have to link to that existing bucket, so CF can't choose the bucket name.

Copy link
Member

Choose a reason for hiding this comment

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

ahh ok, i thought this was creating the buckets.

@brucehoff brucehoff requested review from zaro0508 and a team October 30, 2024 21:46
@@ -40,6 +40,7 @@
"OwnerEmail": "[email protected]"
},
"STACK_NAME_PREFIX": "registry-dev",
"BUCKET_NAME": "dev-docker-registry.sagebase.org",
Copy link
Member

Choose a reason for hiding this comment

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

ahh ok, i thought this was creating the buckets.

@brucehoff brucehoff merged commit 9c74824 into Sage-Bionetworks:dev Oct 31, 2024
6 checks passed
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