Skip to content

Latest commit

 

History

History
70 lines (53 loc) · 3.52 KB

File metadata and controls

70 lines (53 loc) · 3.52 KB

Configuring DynamoDB as an event source

Now that we have our DynamoDB Stream enabled and our Lambda function deployed it is time to tie them together. This is called adding an event source to Lambda function. The event source can be configured in the AWS Lambda Console or the AWS Toolkit for Visual Studio.

Configuring with AWS Toolkit for Visual Studio

alt text

After the Lambda function was deployed the Lambda function view was displayed from the AWS Explorer. From this view you can create the event source mapping by:

  1. Select the Event Sources tab
  2. Push the Add button
  3. Select Amazon DynamoDB Stream for the Source Type
  4. Make sure the Stream we enabled previously is selected for the DynamoDB Stream
  5. Set the Starting Position to LATEST
  6. Push OK

Note: Batch Size and Starting Position can be left at the default values. Starting Position has 2 possible values. TRIM_HORIZON basically means start reading from the stream at the earliest point still available in the stream. This is at most 24 hours in the past. LATEST means start reading items starting from the point the mapping event source was made.

Configuring with AWS Lambda Console

Instructions for configuring with the AWS Lambda Console:

  1. Log on to the AWS Lambda Lambda Console
  2. Choose the region you deployed to
  3. Select the deployed function
  4. In the Add triggers panel select DynamoDB
  5. In the Configure triggers below select the DynamoDB table and push Add
  6. Push the Save button for the Lambda function

Configuring with the AWS SDK for .NET

The code below uses the AWS SDK for .NET to add the event source. You must set the name of the function to the name that you deployed with earlier to the functionName variable.


Continue on to next page: Setting up Amazon Simple Email Service (SES)