Create a presigned URL to upload objects to an Amazon S3 bucket that does not expire

0

how to create a file url saved in a bucket in s3 without expiration token and have access to the file whenever you want

Miguel
質問済み 1年前561ビュー
2回答
0

Presigned URLs with very long expiration were possible with Sigv2 signing but not anymore. From a blog article about Sigv2 deprecation: "While using long-lived pre-signed URLs was easy and convenient for developers, using SigV4 with URLs that have a finite expiration is a much better security practice."

So now the longest you can go is 7 days. Note that a presigned URL will expire when the creating IAM principal's credentials expire, so the only way to get expiry over 12 hours is to create it with IAM User credentials.

エキスパート
回答済み 1年前
0

Why not recreate the functionality in a bucket policy:

{
  "Id": "Policy1677592146473",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1677592144861",
      "Action": [
        "s3:PutObject"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::mybucket/publicput.doc",
      "Principal": "*"
    }
  ]
}
profile pictureAWS
エキスパート
kentrad
回答済み 1年前

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

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

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

関連するコンテンツ