Create the S3 Trigger

Add a trigger for the Lambda function

  1. On the new Lambda function console
  • Look for Add Trigger and click on it. Create Lambda Function
  1. Within the Add Trigger interface:
  • Select S3 as the source from the dropdown Create Lambda Function

  • Next, in Bucket choose the bucket we have created before from the dropdown.

  • For Event types select All object create events

  • We will listen to trigger on the object created on the prefix “source/” so type “source/” for Prefix

  • Because we’ve purposely created two prefixes and listened to events triggered from the source/ prefix, we will avoid repetitive Lambda calls for object creation by making sure the Lambda function will post the object to the destination/ prefix in the S3 bucket.

  • Once you’ve done configuring, click on Add

    Create Lambda Function

  • We’ve successfully created an S3 trigger for our function Create Lambda Function

Great! Now we will start implementing and packaging the function.