S3 Storage
To upload your data to Amazon S3, you must first create an S3 bucket in one of the AWS regions:
- Go to AWS Console and log in or create an account.
- After logging in, use Search for services and look for S3.
- On the S3 page, click
Buckets > Create bucket. - Specify your bucket
nameandregion. - Enable
Make public using ACL. - Disable
Block all public access. - Enable
I acknowledge that the current settings might result in this bucket and the objects within becoming public. - Keep other settings at defaults, then click Create bucket.
- After successfully creating the bucket, go back to Search for services and look for IAM (Identity and Access Management) to generate access keys.
- Go to
Access management > Usersand click Add users. - Set a
usernameand enableProvide user access to the AWS Management Console - optional. - Under Set permissions, choose
Attach policies directlyand search forAmazonS3FullAccess(or create a custom policy). Click Next. - Review, optionally add tags, then click Create user.
- Once created, click the username to view details.
- Under Security credentials, click Create access key.
- In the Create access key dialog, choose the option that fits your needs, and click Create access key.
- Note the
AWS Access Key IDandSecret access key—you won’t be able to view the secret again after closing the dialog. - In your admin panel (
Admin > Settings > Storage), add thebucket name,AWS Access Key ID, andAWS Secret access key.
S3 + CloudFront
Use CloudFront to distribute your content globally by creating a CloudFront distribution:
- Complete the S3 steps above to have a public bucket ready.
- Search for CloudFront in AWS and click
Distributions > Create distribution. - Under
Origin > Origin Domain, select your S3 bucket. - Most defaults are fine unless you need custom settings.
- After creating the distribution, copy the
Distribution domain name(e.g.,abc123.cloudfront.net), then go toAdmin > Settings > Storage, add it toAws CloudFront Domain Name, and enable CloudFront. - For more details, see Steps for Creating a Distribution.
S3 + CloudFront + Signed URLs
To use signed URLs, you need a signer (a trusted key group) in CloudFront.
- Create a key pair (e.g., via OpenSSL):
openssl genrsa -out private_key.pem 2048openssl rsa -pubout -in private_key.pem -out public_key.pem
- Upload the public key to CloudFront:
- Log into CloudFront console.
- Navigate to
Key management > Public keys > Create public key. - Give it a Name, then paste the contents of
public_key.pemin the Key field. - Copy the Public Key ID after adding. This is your
Key-Pair-Id(and corresponds toAws CloudFront Key Pair Idin the admin panel).
- Add the public key to a key group:
- Go to
Key management > Key groups > Create key group. - Name the group, select the public key, and click Add.
- Click Create key group.
- Go to
- Add a signer to your distribution:
- Open your CloudFront distribution and select the Behaviors tab.
- Edit the behavior for the path you want to protect.
- Under Restrict Viewer Access, choose Yes.
- Under Trusted Key Groups, select the group you just created.
- Save changes.
- Add your Key-Pair-Id and the path to your
private_key.pemintoAdmin > Settings > Storage, then enable CloudFront Signed URLs. - Make sure your S3 bucket permissions are set to public.
- For more details, see Serving private content with signed URLs.