{"action":"opened","issue":{"url":"https://api.github.com/repos/aws/amazon-cognito-identity-js/issues/249","repository_url":"https://api.github.com/repos/aws/amazon-cognito-identity-js","labels_url":"https://api.github.com/repos/aws/amazon-cognito-identity-js/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/aws/amazon-cognito-identity-js/issues/249/comments","events_url":"https://api.github.com/repos/aws/amazon-cognito-identity-js/issues/249/events","html_url":"https://github.com/aws/amazon-cognito-identity-js/issues/249","id":200103266,"number":249,"title":"Integration with DynamoDB","user":{"login":"howardya","id":24837610,"avatar_url":"https://avatars.githubusercontent.com/u/24837610?v=3","gravatar_id":"","url":"https://api.github.com/users/howardya","html_url":"https://github.com/howardya","followers_url":"https://api.github.com/users/howardya/followers","following_url":"https://api.github.com/users/howardya/following{/other_user}","gists_url":"https://api.github.com/users/howardya/gists{/gist_id}","starred_url":"https://api.github.com/users/howardya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howardya/subscriptions","organizations_url":"https://api.github.com/users/howardya/orgs","repos_url":"https://api.github.com/users/howardya/repos","events_url":"https://api.github.com/users/howardya/events{/privacy}","received_events_url":"https://api.github.com/users/howardya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-11T14:11:50Z","updated_at":"2017-01-11T14:11:50Z","closed_at":null,"body":"Hi, can I ask, how can I integrate this package with the DynamoDB? I only want authenticated users to have access to my dynamo database. Greatly appreciate any advice or help with this.\r\n\r\n``` jsx\r\nimport {AuthenticationDetails, CognitoUser, CognitoUserPool} from 'amazon-cognito-identity-js';\r\n\r\nconst userPool = new CognitoUserPool({\r\n  UserPoolId: 'myuserpoolid',\r\n  ClientId: 'myclientid,\r\n});\r\n\r\nconst authenticationDetails = new AuthenticationDetails({\r\n  Username: 'username',\r\n  Password: ''password'\r\n});\r\n\r\nconst userData = {\r\n  Username: 'username',\r\n  Pool: userPool\r\n};\r\n\r\nconst cognitoUser = new CognitoUser(userData);\r\n\r\ncognitoUser.authenticateUser(authenticationDetails, {\r\n  onSuccess(result) {\r\n    // success\r\n    const dynamodb = new DynamoDB();\r\n    // **how to pass the credentials to DynamoDB**\r\n  },\r\n  onFailure(err) {\r\n    // error\r\n  },\r\n});\r\n\r\n```\r\n"}}
{"actor":{"display_login":"howardya"}}