ShareX

Amazon S3 guide

How to configure Amazon S3 and use it in ShareX

Get AWS account

Sign-in or register for an Amazon Web Services account:  aws.amazon.com

Create policy

To enhance security, we’re implementing a policy that grants only the PutObject permission, utilized during file uploads.

open  Policies page
Navigate to the policies page.
Click “Create policy”.
Select “Service”, type “S3”, and then choose “S3”.
Under “Actions”, type “PutObject”, and select both “PutObject” and “PutObjectAcl” to grant only PutObject permission.
Under “Resources”, ensure “Specific” is selected, and click “Add ARN”.
Choose “Any” to grant access to all buckets.
Note: You can later uncheck “Any” if you prefer to specify a particular bucket name.
Select “Any” for the object name as well.
Click “Add” in the “Add ARN(s)” dialog.
Proceed to “Review policy”.
Provide a name for the policy, such as “ShareX_PutObject”.
Click “Create policy”.

Create group

Here’s how to set up the group:

open  groups page
Go to the groups page.
Click on “Create New Group”.
Provide a name for the group, like “ShareX”.
Click “Next Step”.
In the “Policy Type” dropdown filter, select “Customer Managed”.
Check the checkbox next to your recently created policy, named “ShareX_PutObject” if you followed that example.
Click “Next Step”.
Finally, click “Create Group”.

Create user

Open users page
Press Add user
Type the username you want
In the access type section, click the check box of Programmatic access
Click Next: Permissions
Click the checkbox of your recently created group which should be named ShareX if you used that example name
Press Next: Tags
Press Next: Review
Press Create user
Important: In this page, either make a record of Access key ID and Secret access key somewhere or press Download .csv to save them as a file. We need these later in ShareX.

Press Close


[Optional] Secure your account

ou don’t need to do these but it is suggested to keep your account secure.

Open Identity and Access Management page  Dashboard
Make sure all security status items are checked as green on this page
You may need to activate multi-factor authentication and create a password policy which should be easy.


Create S3 bucket

To create an S3 bucket where your uploaded files will reside, follow these steps:

Open the S3 Management Console.
Click on “Create bucket”.
Open  S3 Management Console
Enter the desired bucket name. Click here for more info.
Choose the region where you want the bucket to be hosted. You can utilize this website to check the ping of regions: cloudping.info.
Tip: You can use this website to check ping of regions: cloudping.info
If you want your uploaded files to be accessible via URL, ensure that the “Block all public access” option is unchecked.
Click on “Create bucket”.

[Optional] Configure DNS for custom domain

you’re utilizing your own domain, you’ll need to configure DNS. Here’s an example using Cloudflare:

Type:            CNAME
Name:          i
Target: i.example.com.s3.eu-central-1.amazonaws.com

cloudflare

The target should follow the format {bucketname}.{endpoint}. You can locate a list of region endpoints from ShareX’s main window -> Destinations -> Destination settings -> Amazon S3 tab -> Endpoints.

Ensure to check here for further information.

Check here for more information.


Configure ShareX Amazon S3 settings

  • Open ShareX and navigate to Destinations -> Destination settings.
    Select the “Amazon S3” tab.
  • Enter the access key ID and secret access key that you previously noted down.
  • In the endpoints section, choose the region you selected when creating the bucket.
  • Enter the bucket name exactly as you created it.
  • For the upload path, it’s recommended to use %y/%mo, which creates sub-folders such as 2020/04.
  • If you’re using your own domain, check “Use custom domain” and enter your domain in the text box
  • Close the destination settings window.
  • In the main ShareX window, ensure Amazon S3 is selected as the destination for image uploader, text uploader, and file uploader.

Now you are ready to use  Amazon S3 in ShareX!