-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(storage): update instructions for adding external S3 buckets to Amplify #8289
Conversation
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Show resolved
Hide resolved
07579cc
to
8882f9f
Compare
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Show resolved
Hide resolved
Below are several examples of configuring the backend to define a custom S3 bucket: | ||
|
||
<BlockSwitcher> | ||
<Block name="Guest Users"> |
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.
Reordered "Guest Users" and "Authenticated Users" examples to match the order listed in the custom auth rules/access types page on the docs
// Import existing bucket | ||
const customBucket = Bucket.fromBucketAttributes(bucketStack, "MyCustomBucket", { | ||
bucketArn: "arn:aws:s3:::<bucket-name>", | ||
region: "<region>" |
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.
@josefaidt Using Bucket.fromBucketAttributes
here instead of Bucket.fromBucketName
as it allows for explicit region specification. This is important in the scenario where a bucket being imported exists in a different region from the backend stack; without specifying the region, the outputs will default to the backend stack region and throw an access error.
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.
Wanted to call out, Amplify Storage Browser in specific will need the buckets to be in same region because of some restriction in IAM IDC and AccessGrants setup. This is only for managed auth use cases though. That said Amplify Storage APIs itself doesnt bother much about region so i guess choosing one over another.
@josefaidt is there any backend best practices that you are aware of for choosing one over an another?
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
0c9909b
to
f0cbbba
Compare
…guring storage without Amplify backend
…to use CDK bucket construct
f0cbbba
to
730e80d
Compare
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Show resolved
Hide resolved
src/pages/[platform]/build-a-backend/storage/use-with-custom-s3/index.mdx
Outdated
Show resolved
Hide resolved
…r, revert callout on owners example section
Good work on this tiffany |
Description of changes:
<bucket-name>/
as well as<bucket-name>/*
backend.addOutput
to specify more options likepaths
and user group configuration, as well as required Amplify policies in order to access external S3 bucketAmplify.configure
example to match newbackend.addOutput
exampleamplify_outputs.json
example to match newbackend.addOutput
exampleRelated GitHub issue #, if available:
#8202 and aws-amplify/amplify-ui#6258
Instructions
If this PR should not be merged upon approval for any reason, please submit as a DRAFT
Which product(s) are affected by this PR (if applicable)?
Which platform(s) are affected by this PR (if applicable)?
Please add the product(s)/platform(s) affected to the PR title
Checks
Does this PR conform to the styleguide?
Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.
Are any files being deleted with this PR? If so, have the needed redirects been created?
Are all links in MDX files using the MDX link syntax rather than HTML link syntax?
ref: MDX:
[link](https://docs.amplify.aws/)
HTML:
<a href="https://docs.amplify.aws/">link</a>
When this PR is ready to merge, please check the box below
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.