This projects works on AWS Lamda Functions. In this project we explore various ways of creating AWS Lambda functions and their advantages.
Given a CIDR signature, write a AWS Lamda function to print its first address, last address and the # of addresses in the CIDR.
Example : $ aws lambda invoke --function-name cidrStats --payload '{"cidrSignature": "172.10.242.81/12"}' $OUT_FILE { "StatusCode": 200 }
$ jq < $OUT_FILE { "cidrSignature": "172.10.242.81/12", "firstAddress": "172.0.0.0", "lastAddress": "172.15.255.255", "addressCount": 100 }
Upload a video to S3 bucket. This upload generates a SNS notification containing S3 event to a Lambda function. This lamda function then generates the thumbnails from this video every second and uploads it to a target S3 bucket.
Create a pipeline to with the following :
Two S3 buckets - One for video files upload and one for storing thumbnails An SNS topic - Notifications of S3 object creation events are sent to this topic An S3 notification event - To publish an event to the SNS topic when a file is uploaded in the video-input bucket A Lambda function - To generate thumbnails of uploaded videos using FFmpeg and upload to the target bucket.
Upload a video to S3 bucket. This upload generates a SNS notification containing S3 event to a Lambda function. This lamda function then generates the thumbnails from this video every second and uploads it to a target S3 bucket. Above SNS notification is also sent to a separate Lamda function which generates the gif of the video and puts it into the gif bucket.
The S3 bucket for thumbnail then sends a put notification to a third Lamda function which uploads the image to AWS Rekognition to get the objects in the thumbnail, creates a json document from the label, pushes this json to AWS Cloud Seach to be indexed. We can then do a search based on the objects in the picutres and the Cloud Search would give us the thumbnails containing the object.
Create a pipeline with the following :
3 S3 buckets - One for the video files, one for storing the thumbnails and one for storing gif previews. You can reuse the buckets you created in Task 2. A SNS topic - Notifications of S3 object creation events for video-input-bucket are sent to this topic which triggers the generatePreview and generateThumbnail Lambda functions. You can reuse the SNS topic you created in Task 2. A CloudSearch document store with indices labels and key - Store thumbnail names and their labels as generated by Rekognition 3 Lambda functions :
generateThumbnail : Create a Lambda function that converts videos into thumbnails which are written into the thumbnail-bucket, You can reuse what you wrote in Task 2. generatePreview : Converts a video into a .gif file which is written into the preview-gif-bucket. labelThumbnail : Generates labels for the thumbnails written in thumbnail-bucket using the Rekognition SDK. For each thumbnail, create a JSON object with the below schema and uploaded the document to the CloudSearch domain you created. thumbnail-name here should exclude the file extension.