AWS | Using DynamoDB results in “ERROR TypeError: Cannot convert undefined or null to object”
up vote 0 down vote favorite Im trying to utilize AWS JS SDK in my Angular application. Consider the following code: import * as AWS from 'aws-sdk'; import Component, OnInit from '@angular/core'; declare let AWSCognito: any; @Component( selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] ) export class AppComponent implements OnInit private _dynamodb; constructor() AWS.config.region = 'eu-west-2'; // Region AWS.config.credentials = new AWS.CognitoIdentityCredentials( IdentityPoolId: 'eu-west-2:xxyyzz' ); this._dynamodb = new AWS.DynamoDB.DocumentClient(); ngOnInit() this._dynamodb.get(TableName: 'somename', Key: projectId: 123321, (err, data) => ) When the above code is executed the following error appears: ERROR TypeError: Cannot convert undefined or null to object I can see that it's this._dynamodb.get that makes the system crash. Any idea what ...