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 ?

1 réponse
0
Réponse acceptée

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
répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions