Linux command
aws-s3-presign 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Generate a pre-signed URL
aws s3 presign s3://[bucket-name]/[file.txt]
Generate a pre-signed URL
aws s3 presign s3://[bucket-name]/[file.txt] --expires-in 604800
Generate a pre-signed URL
aws s3 presign s3://[bucket-name]/[file.txt] --expires-in 300
Generate a pre-signed URL
aws s3 presign s3://[bucket-name]/[file.txt] --region [us-west-2]
说明
aws s3 presign generates a pre-signed URL for an Amazon S3 object. Anyone with the pre-signed URL can retrieve the S3 object using an HTTP GET request without AWS credentials. Pre-signed URLs are useful for sharing private S3 objects temporarily, embedding download links in applications, or providing time-limited access to files. All pre-signed URLs use Signature Version 4 (SigV4) authentication.
参数
- S3Uri
- The S3 URI of the object to generate a pre-signed URL for (s3://bucket-name/key)
- --expires-in _value_
- Number of seconds until the pre-signed URL expires (default: 3600, maximum: 604800)
- --region _value_
- The AWS region of the bucket (required for SigV4; overrides config/env settings).
- --profile _name_
- Use a specific named profile from the credentials file.
- --endpoint-url _url_
- Override the default endpoint URL (useful for S3-compatible services).
FAQ
What is the aws-s3-presign command used for?
aws s3 presign generates a pre-signed URL for an Amazon S3 object. Anyone with the pre-signed URL can retrieve the S3 object using an HTTP GET request without AWS credentials. Pre-signed URLs are useful for sharing private S3 objects temporarily, embedding download links in applications, or providing time-limited access to files. All pre-signed URLs use Signature Version 4 (SigV4) authentication.
How do I run a basic aws-s3-presign example?
Run `aws s3 presign s3://[bucket-name]/[file.txt]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does S3Uri do in aws-s3-presign?
The S3 URI of the object to generate a pre-signed URL for (s3://bucket-name/key)