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 Antwort
0
Akzeptierte Antwort

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
EXPERTE
achraf
beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen