After looking around, I've found some documentation on reading a CSV from S3 into an AWS Aurora MySQL database table, but this does not seem to apply to SERVERLESS instances. Does anyone know how to do this?
This is roughly how one would proceed with a non-serverless instance:
with conn.cursor() as cur:
query = """
LOAD DATA FROM S3 'filepath'
INTO TABLE table
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
"""
cur.execute(query)
conn.commit()
In the serverless context, this produces the error:
Access denied; you need (at least one of) the LOAD FROM S3 privilege(s) for this operation
All solutions for this error are in terms of a non-serverless instance, and thus cannot be replicated in my use case.