【发布时间】:2020-12-11 22:53:30
【问题描述】:
我是使用 aws 的新手,但遇到了一些麻烦。我有一组视频存在于 aws s3 bucket 的多个文件夹中。我正在创建一个 android 应用程序,它将读取存储桶的视频,将它们显示为列表并允许用户流式传输这些视频。
问题是我的应用程序使用非 aws 独立服务器进行身份验证,因此我不想使用 aws-cognito 身份验证。当我尝试为 s3 搜索本机 sdk 时,我被指向 aws-amplify 框架,当我尝试关注文档 here 时,我被困在了这个强制设置认知身份验证的 step 上。
? You need to add auth (Amazon Cognito) to your project in order to add storage for user files. Do you want to add auth now?
`Yes` // <------------------------ this is for either now or later, can't say no to adding auth at all
? Do you want to use the default authentication and security configuration?
`Default configuration` //<-------------------------------------- can't say no here
? How do you want users to be able to sign in?
`Username`
? Do you want to configure advanced settings?
`No, I am done.`
? Please provide a friendly name for your resource that will be used to label this category in the project:
`S3friendlyName`
? Please provide bucket name:
`storagebucketname`
? Who should have access:
`Auth and guest users`
? What kind of access do you want for Authenticated users?
`create/update, read, delete`
? What kind of access do you want for Guest users?
`create/update, read, delete`
? Do you want to add a Lambda Trigger for your S3 Bucket?
`No`
对此我不确定,但我相信有一种方法可以仅使用 iam 用户访问密钥来访问一些私有存储桶数据。那么哪个 sdk 或自定义代码可以帮助我访问所有用户的整个私有存储桶,而无需进行身份验证?
【问题讨论】:
标签: android amazon-web-services amazon-s3 aws-amplify aws-amplify-sdk-android