awslabs / awslabs/aws-sdk-rust

Amazon DynamoDB Accelerator (DAX) is not working

Open
#476 13 comments 60 reactions 0 assignees View on GitHub
feature-request p2
Dominant language
Rust
Stars
3.3k
Forks
290
Avg merge
1d 12h
Merged PRs (30d)
3

Description

### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue, please leave a comment

### What is the problem?

Hello all,

I am trying to use DAX, and I have the following problems.

I try to connect in this way.

```
let dax_endpoint = std::env::var("DAX_ENDPOINT").expect("DAX_ENDPOINT must be set");
let dynamodb_dax_config = aws_sdk_dynamodb::config::Builder::from(&config)
.endpoint_resolver(
Endpoint::immutable(dax_endpoint.parse().unwrap()),
)
.build();

let dynamodb_client = aws_sdk_dynamodb::Client::from_conf(dynamodb_dax_config);
```

Lambda Env Variables:
DAX_ENDPOINT: ****DAX_DOMAIN****:8111

I get this error:

```
thread 'main' panicked at 'scheme must be provided', /Users/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/aws-smithy-http-0.38.0/src/endpoint.rs:97:50
```

If I add the schema and I tried:
- dax://
- http://
- https://

I get time out:

```
INFO send_operation{operation="Query" service="dynamodb"}:provide_credentials{provider=default_chain}: aws_config::meta::credentials::chain: loaded credentials provider=Environment

error TimeoutError(RequestTimeoutError { kind: "API call (all attempts including retries)", duration: 5s })
```

I have tried this Node example:
https://github.com/aws-samples/amazon-dax-lambda-nodejs-sample/blob/master/template.yaml

My Rust Lambda is in the same security group and subnets of the example run in Node.

If you need more, please let me know.

Dan

### Version

v0.8.0

### Platform

Lambda arm64

### AWS Services

_No response_

### Description

_No response_

### Logs

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the aws_sdk_dynamodb::config::Builder and Endpoint::immutable calls in the report, then compare them with the linked Node Lambda sample's template.yaml and the aws-smithy-http endpoint.rs error. Reproduce the scheme failure and subsequent timeout in Lambda arm64 using the stated subnets and security group; done means the DAX connection behavior and required endpoint configuration are identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, rust
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.