dynamo-easy
  • Introduction
  • Browser vs. Node usage
  • Get Started
    • Installation
    • Jump into code
  • API Doc
    • Config
      • Dynamo-Easy Config
      • AWS SDK Config
    • Model
      • Decorators
      • Mapping Concept
      • CustomMapper
    • Dynamo Store
      • Model Requests
    • Multi-Model Requests
    • Expressions (conditions, update)
Powered by GitBook
On this page

Was this helpful?

  1. API Doc
  2. Config

AWS SDK Config

PreviousDynamo-Easy ConfigNextModel

Last updated 6 years ago

Was this helpful?

Configuration can be set directly through the AWS SDK. Just make sure it's done before instantiating a DynamoStore since a AWS. DynamoDB instance will be created which uses a snapshot of the config. Refer to the for more information about the AWS SDK configuration.

The snippet shows the configuration with Cognito Identity as auth provider without a Cognito User Pool.

import * as AWS from 'aws-sdk'

AWS.config.region = 'eu-central-1'
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
    IdentityPoolId: 'eu-central-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
})
AWS documentation