Generate Presigned URL for Upload
s3_put_objectGenerate a time-limited presigned URL to upload files directly to S3 without AWS credentials, enforcing upload parameters such as encryption, ACL, and content type.
Instructions
Generate a time-limited presigned URL for uploading an object to S3.
This tool creates a secure URL that allows uploading a file without AWS credentials. The URL is time-limited and enforces specified upload parameters (encryption, ACL, etc.).
Use cases:
Allow users to upload files directly to S3 from browsers
Integrate uploads in applications without AWS SDK
Enforce upload policies (encryption, content type, etc.)
Args: bucket_name: S3 bucket name key: Destination object key (path, e.g., 'uploads/document.pdf') expires_in: URL expiration in seconds (1-604800, default: 3600 = 1 hour) content_type: MIME type (e.g., 'image/png', 'application/pdf') server_side_encryption: Encryption algorithm ('AES256' or 'aws:kms') metadata: Custom metadata as key-value pairs acl: Access control ('private', 'public-read', 'public-read-write', etc.) response_format: Output format - 'markdown' (default) or 'json'
Returns: Presigned URL with required headers and curl usage example. The response includes all headers that must be sent with the PUT request.
Security Notes: - URLs are time-limited and scoped to specific object key - Enforce encryption with server_side_encryption parameter - Use 'private' ACL unless public access required - Consider bucket policies that require encryption
Error Handling: - Bucket not found: Returns error with bucket verification guidance - Access denied: Returns error with IAM permission details - Invalid parameters: Returns validation errors with corrections
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"bucket_name": "<bucket_name>",
"key": "<key>"
},
"name": "s3_put_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| acl | No | ||
| key | Yes | ||
| metadata | No | ||
| expires_in | No | ||
| bucket_name | Yes | ||
| content_type | No | ||
| response_format | No | markdown | |
| server_side_encryption | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |