I came across a similar thread with a problem related to yours, you can check to see if it has just what you are looking for to work out the issue After setting up S3 - Access denied
or the instruction contained here How to Setup Amazon S3 Correct Way for Your Discourse Forum – Setup Auto Image and Backup Upload Both to AWS S3