Part 4 - Create and Associate the S3 Event to your Lambda.
For this lab, we’ll access the AWS Management Console to associate a S3 event to your lambda function.
2. Make sure you are in the correct region in the upper left corner (N. Virginia). On the left of the screen open the menu and select functions, the click on your new function name.
3. Add a S3 trigger to the lambda function by clicking on S3 on the left panel.
4. Configure the Trigger, which you can reach by rolling down the screen; select the Bucket you have created on the Part 2 on the bucket drop-down, select the PUT as event type, and enter images/ as the prefix the lambda will be watching, and press Add.
Note: The lambda function will save the resized image in a new folder called resized-images within the same bucket. If you don’t define a prefix you lambda function will enter in a recursive loop as every time you save an image in the bucket the lambda function will be triggered.
5. Click on Save on the top-right corner of the lambda console.