Closed

Need assistance writing Amazon S3 bucket policy

This project received 12 bids from talented freelancers with an average bid price of $157 USD.

Get free quotes for a project like this
Employer working
Project Budget
$30 - $250 USD
Total Bids
12
Project Description

I need help writing my Amazon bucket policy. I need to prevent hotlinking to my files, which the below polciy does.

However, it also blocks actions I'm trying to run from remote computers, specifically putObject and doesObjectExist.

I need to set it up so that if I provide the correct credentials (key and secret) I can run these actions on remote computers.

{

"Version": "2012-10-17",

"Id": "http referer policy example",

"Statement": [

{

"Sid": "Allow get requests referred by [url removed, login to view] and [url removed, login to view]",

"Effect": "Allow",

"Principal": "*",

"Action": "s3:GetObject",

"Resource": "arn:aws:s3:::mybucket/*",

"Condition": {

"StringLike": {

"aws:Referer": [

"[url removed, login to view]*",

"[url removed, login to view]*"

]

}

}

},

{

"Sid": "Explicit deny to ensure requests are allowed only from specific referer.",

"Effect": "Deny",

"Principal": "*",

"Action": "s3:*",

"Resource": "arn:aws:s3:::mydomain/*",

"Condition": {

"StringNotLike": {

"aws:Referer": [

"[url removed, login to view]*",

"[url removed, login to view]*"

]

}

}

}

]

}

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online