key id and secret access key

0

I want to create an access key id and secret access key, with permission only to view and upload one specific bucket

2回答
1

Hello,

I think the IAM policy is a better option for your use case.

The below link answers your question with an explanation - https://stackoverflow.com/questions/41110167/how-to-create-access-keys-that-only-have-access-to-specific-s3-buckets

Thanks

回答済み 3ヶ月前
profile pictureAWS
エキスパート
iBehr
レビュー済み 3ヶ月前
0

To create an AWS Access Key ID and Secret Access Key with limited permissions for a specific S3 bucket, follow these summarized steps:

  1. Create a New IAM User:

    • Sign in to the AWS Management Console and navigate to the IAM console.
    • Choose Users > Add user.
    • Enter a user name and select Programmatic access.
    • Click Next: Permissions.
  2. Attach Policy Directly or Add to Group:

    • For direct policy attachment, choose Attach existing policies directly > Create policy. Use the JSON editor to specify permissions for viewing and uploading to your bucket. Replace YOUR_BUCKET_NAME with your actual bucket name in the policy:

      {
          "Version": "2012-10-17",
          "Statement": [
              {
                  "Effect": "Allow",
                  "Action": [
                      "s3:ListBucket",
                      "s3:GetObject",
                      "s3:PutObject",
                      "s3:PutObjectAcl"
                  ],
                  "Resource": [
                      "arn:aws:s3:::YOUR_BUCKET_NAME",
                      "arn:aws:s3:::YOUR_BUCKET_NAME/*"
                  ]
              }
          ]
      }
    • Alternatively, add the user to a group that already has the desired permissions.

  3. Review and Create User:

    • After attaching the policy, proceed through Next: Tags, Next: Review, and finally click Create user.
  4. Access Key and Secret:

    • Once the user is created, you'll be shown the Access Key ID and Secret Access Key. Make sure to save these securely.
profile picture
エキスパート
回答済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ