# Amazon S3

> Store, retrieve, and share files in Amazon S3: upload and download objects, list a bucket, delete objects, and generate pre-signed URLs.

App · Cloud Computing · 5 actions. Web page: https://docs.lodol.com/docs/integrations/amazon-s3

## Actions

### Create pre-signed S3 URL

Create a time-limited, pre-signed URL to download (or upload) an S3 object without sharing your AWS credentials.

**Inputs**

- Bucket (`bucket`, text, required): The S3 bucket the URL should point at.
- Object key (`key`, text, required): The key of the object the URL should point at.
- URL type (`method`, text): What the URL should authorise: a download (get_object) or an upload (put_object). One of: `get_object` (Download (get_object)), `put_object` (Upload (put_object)). Default: `get_object`.
- Expires in (seconds) (`expires_in`, number): How long the URL stays valid, in seconds (max 604800 = 7 days, default 3600 = 1 hour). From 1 to 604800. Default: `3600`.

**Outputs**

- `bucket` (text): The bucket the URL points at.
- `expires_in` (number): Seconds the URL stays valid for.
- `key` (text): The object key the URL points at.
- `method` (text): What the URL authorises: get_object or put_object.
- `url` (text): The time-limited pre-signed URL.

**Example output**

```json
{
  "bucket": "my-bucket",
  "expires_in": 3600,
  "key": "reports/june.pdf",
  "method": "get_object",
  "url": "https://my-bucket.s3.us-east-1.amazonaws.com/reports/june.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Signature=EXAMPLE"
}
```

### Delete object from S3

Delete an object from an S3 bucket.

**Inputs**

- Bucket (`bucket`, text, required): The S3 bucket to delete from.
- Object key (`key`, text, required): The key of the object to delete.

**Outputs**

- `bucket` (text): The bucket the object was deleted from.
- `deleted` (true/false): True when the delete call succeeded.
- `key` (text): The object key that was deleted.
- `version_id` (text): Version ID of the delete, when the bucket is versioned.

**Example output**

```json
{
  "bucket": "my-bucket",
  "deleted": true,
  "key": "reports/june.pdf",
  "version_id": null
}
```

### Download object from S3

Download an object from an S3 bucket and save it to a local file.

**Inputs**

- Bucket (`bucket`, text, required): The S3 bucket to read from.
- Object key (`key`, text, required): The key of the object to download.
- Save to (`destination_path`, text): Where to save the downloaded file. Defaults to a temporary folder when left blank.

**Outputs**

- `bucket` (text): The bucket the object was read from.
- `content_type` (text): The object's Content-Type, if S3 returned one.
- `key` (text): The object key that was read.
- `path` (text): Local path the object was saved to.
- `size` (number): Number of bytes downloaded.

**Example output**

```json
{
  "bucket": "my-bucket",
  "content_type": "application/pdf",
  "key": "reports/june.pdf",
  "path": "/tmp/june.pdf",
  "size": 20480
}
```

### List objects in S3 bucket

List objects in an S3 bucket, optionally filtered by key prefix.

**Inputs**

- Bucket (`bucket`, text, required): The S3 bucket to list.
- Prefix (`prefix`, text): Only return objects whose key starts with this prefix (e.g. reports/). Leave blank to list the whole bucket.
- Max results (`max_keys`, number): Maximum number of objects to return (1–1000, default 1000). From 1 to 1000.

**Outputs**

- `bucket` (text): The bucket that was listed.
- `count` (number): Number of objects returned.
- `is_truncated` (true/false): True if more objects exist beyond this page.
- `objects` (list): The objects in the bucket that matched.
- `prefix` (text): The key prefix filter that was applied, if any.

**Example output**

```json
{
  "bucket": "my-bucket",
  "count": 2,
  "is_truncated": false,
  "objects": [
    {
      "etag": "9b2cf535f27731c974343645a3985328",
      "key": "reports/june.pdf",
      "last_modified": "2026-07-30T12:00:00+00:00",
      "size": 20480,
      "storage_class": "STANDARD"
    },
    {
      "etag": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
      "key": "reports/may.pdf",
      "last_modified": "2026-06-30T12:00:00+00:00",
      "size": 18432,
      "storage_class": "STANDARD"
    }
  ],
  "prefix": "reports/"
}
```

### Upload object to S3

Upload an object to an S3 bucket from inline text or a local file. Provide either 'content' or 'file_path', not both.

**Inputs**

- Bucket (`bucket`, text, required): The destination S3 bucket name.
- Object key (`key`, text, required): The object key (path within the bucket), e.g. reports/june.pdf.
- Content (`content`, text): Inline text to upload as the object's contents. Use this or 'file_path'.
- File to upload (`file_path`, text): A local file to upload as the object. Use this or 'content'.
- Content type (`content_type`, text): Optional MIME type (e.g. application/pdf). Guessed from the key's extension when omitted.

**Outputs**

- `bucket` (text): The bucket the object was written to.
- `etag` (text): The object's ETag (quotes stripped).
- `key` (text): The object key that was written.
- `size` (number): Number of bytes uploaded.
- `version_id` (text): Version ID when the bucket has versioning enabled, else null.

**Example output**

```json
{
  "bucket": "my-bucket",
  "etag": "9b2cf535f27731c974343645a3985328",
  "key": "reports/june.pdf",
  "size": 20480,
  "version_id": null
}
```
