Closed daemonsy closed 6 years ago
Hi, I added a very naive PR for this.
https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/pull/140
Anyone had a chance to take a look at this?
@daemonsy Does the official SDK support alexa.dynamoDBClient
?
The official one doesn't, this is the PR #140 to attempt to add support for it
Allowing a custom AWS client to be passed in would also make this library compatible with AWS X-Ray (see https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-nodejs-awssdkclients.html).
hi, thanks everyone for the interest on this. I haven't heard anything from Amazon yet. It originally came with a PR, but now so much time's passed, not sure if the PR still works anymore.
I will strongly advise not to use my branch.
Adding another ping for Amazon here. @Amazon-tianrenz
Hi all,
thanks for all the discussion on this thread. The latest SDK release 1.0.25 has enabled developer to inject their own dynamoDB client.
Regards
@Amazon-tianrenz Is there documentation or an example for how to inject a local dynamoDB client for testing?
Hi @adamgruber,
We currently do not have such a sample. But now it's very easy to inject your own DynamoDB client into the DynamoDBPersistenceAdapter
(see here). You can setup your local DynamoDB follow this link. And then in your DynamoDBClient, just set the endpoint to point to local host.
Regards
Hey Amazon, thanks for the ASK SDK. It made skill development much nicer.
I made a skill for NYC's subway and implemented some tests.
The next feature I wanted to add was persisting state and it seems that I should be able to write some tests using DynamoDB local. I was wondering if there's any way to expose the dynamo client so we can use a local client by via something like
new AWS.DynamoDB({ endpoint: <local endpoint> })
. This will make the skill testing much more meaningful.Also, if you're willing to accept PRs, happy to take a stab at this.