AWS S3 Bucket Integration With ChatNet
Account Setup on AWS
Bucket Creation


- Choose a region close to your target audience for the AWS Region.
- Enter a name for your bucket in the Bucket Name field.
- Uncheck "Block all public access" and the checkboxes under it.
- Acknowledge the settings by checking the box.
- Click on "Create bucket".
Setting Bucket Policy
The next step is to modify the bucket policy to allow public access. You can do this by adding a new statement to the policy that grants the “s3:GetObject” permission to everyone.
- Go to the bucket's Permissions tab.
- Click Edit under Bucket Policy.
- Add the following policy statement (replace bucket-name with your bucket's name):
- Then click on Save changes.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "PublicRead", "Effect": "Allow", "Principal": "*", "Action": [ "s3:GetObject", "s3:GetObjectVersion" ], "Resource": "arn:aws:s3:::cnmedia2/*" } ]}
Creating an IAM User
Now the bucket creation process is done, next we need to assign a user to this bucket and get Access Key ID and Secret Access Key . To do this, follow the bellow steps.

- Open the IAM console.
- Navigate to Users and click "Create user".

- Add a User name and click on Next

- In this page Click on Attach policies directly.
- Then in the search field type s3
- Check the AmazonS3FullAccess policy
- Click Next
- Click Create user in the next page.
Now we need to generate Access Key ID and Secret Access Key. to do this go to newly created user by clicking on the name.

- Click on Create access key.

- Select Other and click Next.
- Click on Create access key button

- Copy and paste Access key and Secret access key to a note pad as you will need this later.
Configuring ChatNet
Now head over to ChatNet dashboard and go to Settings > Cloud Storage section.

- Enable Cloud Storage - Set Yes
- Cloud Storage Type - Select AWS S3
- Cloud Storage Endpoint - Choose the correct endpoint according to your bucket region from here
Prepend https://
IE: If your bucket region is us-west-2, Endpoint URL should be https://s3.us-west-2.amazonaws.com - Cloud Storage Region - Selected region. IE: us-west-2
- Cloud Storage Access Key - Access key you generated earlier
- Cloud Storage Secret Key - Secret access key you generated earlier
- Cloud Storage Bucket Name - Your bucket name
- Cloud Storage Access URL - This can be created by appending bucket name to end of the Endpoint URL.
IE: https://s3.us-west-2.amazonaws.com/cnmedia2 - Cloud Storage SSL Verification - Set Yes
After configuring AWS S3 with ChatNet, the next important step is to upload all existing media files from your ChatNet /media folder to the S3 bucket.