简体   繁体   English

如何创建只能访问特定S3存储桶的访问密钥

[英]How to create access keys that only have access to specific S3 buckets

I have four S3 buckets bucket1, bucket2, bucket3, bucket4 . 我有四个S3存储桶bucket1, bucket2, bucket3, bucket4 I would like to create a new Access/secret key that only has access to these four buckets. 我想创建一个只能访问这四个存储桶的新访问/秘密密钥。

How should I do this? 我应该怎么做? Should I use IAM to create a new user, then login as that user, and create the S3 buckets? 我应该使用IAM创建一个新用户,然后以该用户身份登录并创建S3存储桶吗? Would I need to create a new policy? 我需要制定新政策吗?

Create an IAM policy that only gives access to these four buckets. 创建仅允许访问这四个存储桶的IAM策略。 You do this by specifying the ARN of each bucket in the policy. 通过在策略中指定每个存储区的ARN来执行此操作。 Create an IAM user and assign the policy to that user. 创建一个IAM用户并将策略分配给该用户。 Create access keys for that user. 为该用户创建访问密钥。

Here is some documentation on creating the IAM policy to grant access to specific S3 buckets. 以下是有关创建IAM策略以授予对特定S3存储桶的访问权限的一些文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM