© The Chancellor, Masters and Scholars of The University of Oxford. All rights reserved.
Scheduling a Python program to run daily in AWS
FEATURES
- The program will fetch a list of HTTP URLs
- The data is stored in a S3 bucket
- The program creates the bucket if it doesn't exist
- A new output directory is created for each trigger date
Step 3. Configure the function
Choose "Author from scratch", Python, and a name for your function (for example: daily_python_task)
Step 5. Add dependencies
When we import a Python module, for example 'import requests', we need to provide a layer that includes this module.
Press "Add layer"
Choose "AWSSDKPandas-Python313"
If you change the code and add custom modules, you might need to create a .zip file and a custom layer
Step 7. Add permissions
Access the role associated to the lambda function
Press "Add permissions"
Add S3 full access