Filing a metadata parser application with Lambda and S3
We are going to execute another application within Lambda. In this case, Lambda will be triggered by S3. S3 is an object storage service to which you can upload different types of files, such as image, CSV, and text files. In this example, when you upload a file to S3, the service will trigger the Lambda function, which in turn will provide information about file metadata. Let’s implement the application step by step:
- Log in to the AWS Management Console.
- Type
lambda
in the search box and go to the Lambda service. - Click Create function.
- On the Create function page, select Author from scratch and then in the Runtime field, select Python 3.9:
Figure 3.9 – Create function
- In the Permissions section, select Amazon S3 object read-only permissions under Policy templates and enter a role name. In this case, I entered
S3TriggerLambdaReadRole
. The role is required...