title: How do I read row by row of a CSV file from S3 in AWS Glue Job
body: <p>Hi I am very new to AWS.</p>
  
  <p>I am trying to retrieve a 5gb csv file that I have stored in a s3 bucket, do ETL on it and load it into a DynamoDB table using AWS Glue. My glue job is pure python bash shell not using spark.</p>
  
  <p>My problem is that when I try to retrieve the file. I am getting File not found exception. Here is my code:</p>
  
  <pre><code>import boto3
  import logging
  import csv
  import s3fs
  
  from boto3 import client
  from boto3.dynamodb.conditions import Key
  from botocore.exceptions import ClientError
  
  csv_file_path = 's3://my_s3_bucket/mycsv_file.csv'
  </code></pre>
  
  <p>A few lines down within my class.......:</p>
  
  <pre><code>with open(self.csv_file_path, "r") as input:
         csv_reader = csv.reader(input, delimiter='^', quoting=csv.QUOTE_NONE)
  
         for row in csv_reader:
  </code></pre>
  
  <p>within the with open function is where I get file not found. Even though it is there. I really do not want to use pandas. Weve had problems working with pandas within glue. Since this a 5gb file I cant store in memory thats why im trying to open it and read it row by row.</p>
  
  <p>I would really appreciate the help on this.</p>
  
  <p>Also I have the correct IAM glue permissions setup and everything.</p>