SpinTheMic
Pro

Interview practice question

Reading files from S3 in Python

Data Engineering · Python · Beginner

How would you list and read all CSV files under a prefix in S3 using Python?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Use boto3 with a paginator for list_objects_v2.
  • Pagination matters because each call returns up to 1000 keys.
  • Read each object with get_object or let pandas read s3:// paths via s3fs.
  • Use IAM roles, not hard-coded keys.
  • Process files one by one or in batches for memory.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics