I have a script that gathers data from an API, and running this manually on my local machine I can save the data to a CSV or SQLite .db file.
If I put this on AWS lambda how can I store and retrieve data?
It really depends on what you want to do with the information afterwards.
If you want to keep it in a file, then simply copy it to Amazon S3. It can store as much data as you like.
If you intend to query the information, you might choose to put it into a database instead. There are a number of different database options available, depending on your needs.
Using AWS Lambda to run Python script, how can I save data?