[英]aws s3 allow access to bucket prefix for cognito user
I have the following setup: 我有以下设置:
user logs in with cognito. 用户使用cognito登录。 He should now be able to use an s3 item url as the src of an html5 video.
他现在应该可以使用s3项网址作为html5视频的src。
<video src='http://aws.s3.somebucket/userId/videoId.mp4' />
I have managed to use the sdk for the login and now have the authorization token on the client. 我设法使用sdk进行登录,现在客户端上具有授权令牌。 How do I setup the bucket to allow access to the directory matching the userId, and how can I trigger/pass the authorization token?
如何设置存储桶以允许访问与userId匹配的目录,以及如何触发/传递授权令牌?
You should integrate your user pool with Federated identities following this . 您应该将用户池下面的联合身份融入这个 。
Setup the identity pool for S3 access following this . 遵循此步骤,设置用于S3访问的身份池。
After this you will get AWS credentials which would allow the user to only access based on the identityId. 之后,您将获得AWS凭证,该凭证将允许用户仅基于identityId进行访问。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.