Multi-bucket defineStorage
must allow access to the same paths for all buckets, otherwise typescript error occurs on Amplify.configure
#14106
Labels
bug
Something isn't working
Storage
Related to Storage components/category
transferred
This issue was transferred from another Amplify project
Environment information
Describe the bug
Amplify.configure()
fails with a typescript error caused by the storage types when bothdefineStorage
calls use different access patterns.Reproduction steps
git clone -b bug-repro https://github.com/johnpc/story-teller/
cd story-teller
npm install && npx ampx sandbox --once
npm run build
Notice build failure:
Note: You can solve the build failure by replacing
amplify/storage/resource.ts
with the following contents (see diff):The
knowledgeBaseBucket
only needs thetextfiles/*
path, and thepictureDrive
bucket only needs access to thepictures/*
path. However, you have to grant both paths to both buckets to prevent the typescript error onAmplify.config()
The text was updated successfully, but these errors were encountered: