How to restrict access to S3 assets (via CloudFront) based on asset meta data that is stored in a third party application?

0

One of my customers wants to restrict access to S3 bucket via Cloudfront. I assume Origin Access Identity (OAI) can be used here. But the access is conditional (i.e based on some asset meta data in third party application). What is the best way to achieve this ? Add some sort of custom header in CloudFront call after looking up that external asset and then use that header in Policy Statement ?

AWS
asked 4 years ago313 views
1 Answer
0
Accepted Answer

Use OAI to restrict access to the distribution solely to CloudFront, and then use Lambda@Edge (origin request event) to apply access control on application level.

profile pictureAWS
EXPERT
achraf
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions