AWS Textract for filtering using key-value pair

0

I have huge files uploaded on s3 and i want to fetch the file on the basis of the search input value and share the object url once the file is found. how we can setup and execute this process ?

1 Antwort
0
  • Upload files to an S3 bucket with appropriate metadata/tags for searching later.
  • Use the AWS SDK or AWS CLI to list objects in the S3 bucket and filter based on the metadata/tags. This will return object details including the key (file path).
aws s3api list-objects --bucket mybucket --query "Contents[?Tags[?Key=='name' && Value=='file1']].Key"
  • Generate a pre-signed URL for the filtered object using its key. A pre-signed URL provides time-limited access to private objects without requiring credentials.
aws s3 presign s3://mybucket/file.txt
  • Share the pre-signed URL with the user. They can directly download the file by pasting the URL in a browser.
  • Optionally, create a Lambda function to generate pre-signed URLs on demand based on a search parameter. This encapsulates steps 2-3 to fetch and return URLs to applications
profile picture
EXPERTE
beantwortet vor 2 Monaten

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