Skip to content

Instantly share code, notes, and snippets.

@mitjafelicijan
Created February 2, 2019 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitjafelicijan/50bb1fe8090afe20a47e51d5bbc96bec to your computer and use it in GitHub Desktop.
Save mitjafelicijan/50bb1fe8090afe20a47e51d5bbc96bec to your computer and use it in GitHub Desktop.
Provision VM for S3 access
# replace IP with the ip of your newly created droplet
ssh root@IP
# this will install utilities for mounting storage objects as FUSE
apt install s3fs
# we now need to provide credentials (access key we created earlier)
# replace KEY and SECRET with your own credentials but leave the colon between them
# we also need to set proper permissions
echo "KEY:SECRET" > .passwd-s3fs
chmod 600 .passwd-s3fs
# now we mount space to our machine
# replace UNIQUE-NAME with the name you choose earlier
# if you choose different region for your space be careful about -ourl option (ams3)
s3fs UNIQUE-NAME /mnt/ -ourl=https://ams3.digitaloceanspaces.com -ouse_cache=/tmp
# now we try to create a file
# once you mount it may take a couple of seconds to retrieve data
echo "Hello cruel world" > /mnt/hello.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment