Upload the media to your S3 bucket
Part of: Hosting Obsidian S3 media publicly
Make sure you have followed the previous steps:
- Setup S3 bucket for use with Cloudfront
- Setup custom AWS CloudFront CNAME
- Setup an IAM user to manage an S3 bucket
Use the Obsidian Plugin
You can use the excellent S3 Image Uploader plugin to automatically upload images to your S3 bucket.
Installation
You can find the plugin in the list of Obsidian community plugins.
Configure credentials for upload
- Provide the
Access Key ID
andSecret Access Key
from the IAM you've previously created. - Provide your bucket's region (e.g.
eu-central-1
) - Provide your bucket's name (e.g.
assets.example.com
)
Configure Cloudfront URL
The final step is to configure the domain we previously setup:
- Enable
Use custom image URL
- Set
Custom Image URL
to the domain you previously configured with Cloudfront (e.g.assets.example.com
). For example for this blog:
Manual Alternative: Manage S3 bucket with Cyberduck 🦆
You can also manually manage S3 "files" (objects) using Cyberduck.
There's quite a bit of documentation, but there are suggestions I didn't like (e.g. user with full S3 permissions), and some parts that didn't work (e.g. bucket name in the server url).
Here's what did work for me:
- Setup an IAM user to manage an S3 bucket
- Set up an
S3 (HTTPS)
bookmark in Cyberduck:- Provide the
Access Key ID
andSecret Access Key
.
PS: if you forgot to write these down, you can recreate them. - Set
Server
tos3.amazonaws.com
- Set
More Options -> Path
to the name of your bucket, e.g./assets.example.com
- Provide the
- That's it 🍰