Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to preprocess Amazon S3 request by executing some logic in some programming logic (e. g. if I need to restrict access to resources by some dynamic condition)?

share|improve this question

There is a very limited set of logic you can apply with S3's Access Policy Language. If you can't accomplish what you need using that, you may need to set up your own "front end" server in EC2 to do your business logic.

Another option would be to enable CloudFront on your S3 bucket, and then use the dynamic signed URLs feature. Some other system would have to generate the dynamic signed URL for people to follow, with CloudFront granting or denying access based on the validity of the dynamic signed URL.

share|improve this answer
Just so you know, you can do signed URLs in S3 without needing a CloudFront distribution. – ceejayoz Oct 11 '11 at 17:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.