Part 5 - Uploading files and check the lambda function execution.

Now it is time to upload a jpg file to the S3 bucket to test its execution.

1. Sign in to the AWS Management Console and open the S3 service at https://console.aws.amazon.com/s3

2. Click on the S3 bucket you have created.

3. Create a folder called images, by selecting the Create Folder button, with no encryption, at the top right of the S3 console. Once you create the folder, select the folder.

4. Upload a test image into your bucket for testing. The blue marble - Sample Image is a great sample image for testing. Please, download the image to your local computer.

5. Click on the Upload button at the S3 console. In the dialog box, click on Add files, select the file above and click Upload at the dialog.

6. After a few seconds, you will notice that a new folder got created in the bucket called resized-images. Go to this folder and download the file that was resized. It should have gone from 6.2 MB to 93.2KB.

7. To check the lambda function execution, open the Lambda service at https://console.aws.amazon.com/lambda

8. Click on the lambda function that you have created for resizing the image

9. Select the Monitoring tab and click on the View logs in CloudWatch

10. Select the first log stream listed in the Log Group and you will see the lambda output and logs; similar to the picture below:

Congratulations! You have deployed a lambda function that is trigger by an S3 event, which performs a task defined into your lambda function. Now go build on AWS.