简体   繁体   English

AWS S3允许Cognito用户访问存储桶前缀

[英]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.

相关问题 允许访问 Cognito 用户的 AWS S3 存储桶策略 - AWS S3 bucket policy to allow access to Cognito users 允许外部用户(通过 Cognito)访问 S3 存储桶和控制台 - Allow an external user (through Cognito) to access a S3 bucket and console 允许使用 Cognito 访问 S3 上的自定义前缀 - Allow access to custom prefix on S3 with Cognito 允许用户池中的 Cognito 用户访问 S3 存储桶的存储桶策略 - Bucket policy to allow Cognito user in User Pool access to S3 bucket 如何只允许经过身份验证的用户(使用Cognito)访问他们自己的S3存储桶/密钥? - How do I only allow authenticated user (using cognito) access to their own S3 bucket/key specifically? AWS S3存储桶策略-仅在前缀内允许GetObject - AWS S3 Bucket Policy - Allow GetObject only within a prefix 有没有办法使用 AWS Amplify 库 (JavaScript) 在没有认知用户池和身份池的情况下访问 s3 存储桶? - Is there a way to use AWS Amplify library (JavaScript) to access s3 bucket without cognito user poool and identity pool? 允许 S3 访问 AWS 控制台中当前经过身份验证的用户的 S3 存储桶策略? - S3 Bucket Policy to allow S3 Access to Current Authenicated user in AWS Console? 用于移动和Web访问的Cognito Role和AWS S3 Bucket策略 - Cognito Role and AWS S3 Bucket policy for mobile and web access 允许用户访问特定 S3 存储桶以进行备份的 AWS IAM 策略 - AWS IAM Policy to allow user access to specific S3 bucket for backup
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM