-
Notifications
You must be signed in to change notification settings - Fork 247
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
feat(storage): update s3 storage service to support multiple s3 client for multi-bucket support #5493
feat(storage): update s3 storage service to support multiple s3 client for multi-bucket support #5493
Conversation
…t for multi-bucket support
orElse: () => throw const InvalidStorageBucketException( | ||
'Unable to lookup bucket from provided name in Amplify Outputs file.', | ||
recoverySuggestion: 'Make sure Amplify Outputs file has the specified ' | ||
'bucket configuration.', | ||
), | ||
); | ||
if (bucket == null) { | ||
throw const InvalidStorageBucketException( | ||
'Amplify Outputs storage configuration does not have buckets specified.', | ||
recoverySuggestion: | ||
'Make sure Amplify Outputs file has storage configuration with ' | ||
'buckets specified.', | ||
); | ||
} | ||
return BucketInfo(bucketName: bucket.bucketName, region: bucket.awsRegion); |
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.
nit suggestion: Perform the null check before accessing storageOutputs.buckets.singleWhere
. I initially overlooked the optional chaining, which made orElse
appear redundant upon first glance.
@internal | ||
class S3ClientInfo { |
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.
nit: add docs comment
…t for multi-bucket support (#5493)
…t for multi-bucket support (#5493)
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.