top of page
  • Writer's pictureSteve McGee

Connect Salesforce to AWS DynamoDB

Why do we want to connect DynamoDB and Salesforce?

DynamoDB can store transactional key and value pair information from a system. By connecting with Salesforce, we can access that data for reporting and decision-making. We can look at what a user has going on in a very scalable way and target our marketing based on transactions or information stored in DynamoDB. For example, assume a fictitious company, PocketLanguage, stores all transaction data, people answering questions, reading a Spanish lesson, etc. They could then use the Connect link with DynamoDB to bring that information in and relate it to a contact. By doing so, they can say, “Person A, who pays $3.99/mo, has shown a lot of interest in Spanish”, and then they can make decisions on what marketing materials to send to them, such as “Hey, it seems you like romance languages, now that you’ve mastered Spanish, why not try French?” Now let's see how to make that connection.

To start the Connection setup, we need some information from our AWS Account. We will need the Region, the Endpoint, and the Access Key ID and Secret. Follow the steps below to get this information, and then we will move on to Salesforce.

Get AWS connection Information

  • Region

    • Check your region in your AWS Settings

  • Select Access Keys and Create a new Access Key

  • The key Secret is only available on Creation. Save it somewhere.

  • Now we have our necessary info, let us move on to Salesforce.

Salesforce Setup for DynamoDB Connection

Setup Named Credentials

  • Setup>Security>Named Credentials

    • Click New Named Credentials

  • Fill out the Name and Label. Make sure that the URL starts with http:// or https:// and put in your endpoint URL

  • Identity Type —> Named Principal

    • Authentication Protocol —> AWS Signature Version 4

    • Enter Access Key Id and Key Secret from the information you retrieved from AWS

    • AWS Region should be the region you retrieved from AWS

    • AWS Service is always lowercase “dynamodb” for DynamoDB

  • Make sure Generate Authorization Header is checked

Setup External Data Service

  • Setup>Integrations>External Data Service

  • Click New External Data Service

    • Enter External Data Source (this is a Label)

    • Enter Name (Used in API callouts)

    • Select Amazon DynamoDB as Type

    • Select the Named Credential you just created

    • Check Writable External Objects

    • Click Save

The Connection setup is mostly done at this point.

  • You can create tables in DynamoDB and External Objects in Salesforce

  • Once these are created we will need to go back to the External Data Source and Validate and Sync

  • Check the Table you want to Sync and click Sync

  • After it syncs, a check will appear in the grayed-out box labeled Synced

Your setup is now complete, and we got the information required from AWS DynamoDB, set up our Named Credentials and External Data in Salesforce, and then synced them. Making the connection is not a complex process, and now that data can be served up to your customers or employees. DynamoDB and its connection to Salesforce make for a great pairing for large extensible data storage and retrieval. Enjoy this feature and expand your data possibilities.


Recent Posts
bottom of page