# Process video straight from your S3 bucket

Rendobar reads job inputs from your bucket and writes every output back to it. A CloudFormation stack creates the IAM role it uses, so no access key is stored.

Storage connection · IAM role, no stored keys · Job input and destination · No delete permission

Page: https://rendobar.com/integrations/amazon-s3/ · Connect Amazon S3: https://app.rendobar.com/storage?connect=1&provider=s3 · Read the docs: https://rendobar.com/docs/storage/amazon-s3

- Type: Storage connection
- Built by: Rendobar
- Auth: IAM role from a CloudFormation stack, or IAM user access keys
- Used as: Job input and output destination
- Access: Deliver and read, or Read only
- Pricing: Free
- Category: Storage

## Overview

Jobs read objects in the bucket as `storage://` paths and deliver outputs to a folder you name. The IAM role can get, put and list objects and has no delete permission, and Read only also removes write access. The dashboard creates the role with one CloudFormation stack, and the [S3 docs](https://rendobar.com/docs/storage/amazon-s3) cover Terraform, access keys and encrypted buckets.

## Reference

### Amazon S3 setup

- One-click role: a CloudFormation stack creates IAM role rendobar-<id> (sessions up to 12 hours) and an OpenID Connect provider for https://api.rendobar.com/federation
- Access: Deliver and read, or Read only (no s3:PutObject or s3:AbortMultipartUpload, and the bucket can't be a destination)
- Role policy: s3:GetObject, s3:PutObject and s3:AbortMultipartUpload on objects, s3:ListBucket on the bucket, s3:ListAllMyBuckets and s3:GetBucketLocation on *. No delete
- Optional: Create the bucket. The stack makes it with public access blocked, and it stays when the stack is deleted
- Or: create the role with the Terraform or trust policy from the waiting dialog, then paste its ARN
- Or: IAM user access keys with the policy the dialog shows, which also allows s3:DeleteObject
- SSE-KMS buckets also need kms:GenerateDataKey (write) and kms:Decrypt (read) on the bucket's key
- Name conflicts: Keep both works, because S3 refuses a conditional write to a key that exists
- Revoke: delete the stack. The OpenID Connect provider and a stack-created bucket stay

### Addressing

- Inputs: storage://<connection-id>/<path>, anywhere a job accepts a file URL
- Outputs: destinations: ["storage://<connection-id>[/<folder or path template>]"]
- Connection ids match [a-z0-9-]{2,40}
- In a path, write % ? # as %25 %3F %23

### Output path

- Default template (By date): rendobar/{date}/{source_name}.{ext}. Also Flat: rendobar/{source_name}.{ext}, or a custom template
- Tokens: {job_id} {ext} {source_name} {date}
- storage://<id> uses the template, storage://<id>/<folder> uses the folder plus the template's file name, a path with a token or a file name is used as written
- Name conflicts: Keep both (default, adds the job id's last 6 characters) or Replace

### Connecting

- Dashboard: Storage > Connect Storage, or client.storage.create(params)
- Rendobar writes, reads, lists and deletes a test object before saving the connection
- Stored keys are encrypted with AES-256-GCM and no endpoint returns them
- Rotate: Replace Keys, or client.storage.update(id, { credentials }). The connection id stays the same

### Delivery results

- deliveries[] on GET /jobs/{id}: storageId, status (pending, delivered, failed), path, url, reason, renamed
- Webhooks: job.delivery_succeeded, job.delivery_failed, job.deliveries_settled
- Retry: POST /jobs/{id}/deliveries/retry or client.jobs.retryDeliveries(id)

## Questions

### Can Rendobar delete files in my S3 bucket?

No. The role can get, put and list objects, abort an unfinished multipart upload, and read bucket names and regions in the account. None of that deletes.

### Why does an S3 input link stop working after an hour?

The role session that signed the link caps it. The stack sets the role's maximum session to 12 hours, but a role you made by hand with AWS's default one-hour maximum gives jobs input links that last one hour.

### Can I connect S3 with access keys instead of a role?

Yes. Create an IAM user with the policy the connect dialog shows under IAM policy for this bucket, then pick Access keys and paste the key pair. Use it when you can't create stacks, or when one-click connect doesn't reach the bucket's region.

### How do I revoke Rendobar's access to S3?

Delete the stack in CloudFormation. That deletes the role, and Rendobar removes the connection. The OpenID Connect provider and any bucket the stack created stay in your account.

## Resources

- [Docs](https://rendobar.com/docs/storage/amazon-s3): The stack, the role's resources, Terraform, access keys and troubleshooting.
- [Run FFmpeg on S3](https://rendobar.com/ffmpeg/s3/): A transcode that reads an object and delivers the MP4 back, with measured runs.
- [S3 without access keys](https://rendobar.com/blog/s3-access-without-access-keys/): The role's trust and permission policies, line by line.
- [Presigned URL expiry](https://rendobar.com/blog/s3-presigned-url-expires-early/): How the role session caps every link it signs, measured.
- [AWS OIDC roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html): How an IAM role trusts an identity provider, the way the stack sets it up.

## More

- [Process video in S3 past Lambda's limit](https://rendobar.com/blog/process-s3-video-ffmpeg/)
- [Save FFmpeg output to S3](https://rendobar.com/blog/ffmpeg-output-to-s3/)
- [Thumbnails for new S3 uploads](https://rendobar.com/blog/video-thumbnail-s3-upload/)