s3fs allows Linux to mount S3 buckets as a file system.

Install s3fs.

<pre lang="bash">
sudo apt install s3fs

Setup credentials.

<pre lang="bash">
echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > /etc/.passwd-s3fs
chmod 400 ${HOME}/.passwd-s3fs

Setup mount directory.

<pre lang="bash">
mkdir -p /mountpoint
chown username:username /mountpoint

Mount it.

<pre lang="bash">
s3fs bucketname /mountpoint -o passwd_file=/etc/.passwd-s3fs

Mount it automatically.

<pre lang="bash">
bucketname /mountpoint fuse.s3fs _netdev,allow_other,passwd_file=/etc/.passwd-s3fs,rw,uid=1000,gid=1000,umask=022 0 0

Alternative.

<pre lang="bash">
s3fs#bucketname /mountpoint fuse _netdev,allow_other,use_cache=/root/cache,uid=1000,gid=1000,umask=022 0 0