Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I connect to dynamodb ? #562

Open
PabasaraDilshan opened this issue Dec 5, 2023 · 6 comments
Open

Can I connect to dynamodb ? #562

PabasaraDilshan opened this issue Dec 5, 2023 · 6 comments

Comments

@PabasaraDilshan
Copy link

I need to connect to dynamodb from the enclave to get and save data from the db. How can I do that?

@Xavina
Copy link

Xavina commented Dec 19, 2023

Hi @PabasaraDilshan,

I need the same.

What I did was adding an entry in /etc/nitro_enclaves/vsock-proxy.yaml, like this:

- {address: dynamodb.eu-central-1.amazonaws.com, port: 443}

Then re-start the vproxy, but I had not much luck. Maybe I did it in a wrong way. Have you tried that?

Thanks

@PabasaraDilshan
Copy link
Author

Hi @Xavina
I just written a service on parent instance to connect with the enclave via vsock and get and save data to dynamodb.

@Xavina
Copy link

Xavina commented Dec 20, 2023

Hi @PabasaraDilshan,

Yes, we did the same, a process in the EC2 host that communicates with the enclave through the vSock to send the Encrypted data, then the Enclave Decrypts it and returns back the Decrypted data to be stored in DynamoDB by the host.

We tried to communicate with DynamoDB from the Enclave, but looks like to not be possible at all, I guess it makes sense per design.

Thanks!

@dpdornseifer
Copy link

Hi @Xavina, hi @PabasaraDilshan,

The enclave can directly communicate with any AWS service using the provided vsock-proxy.
In this example I'm using viproxy to tunnel out the https connection required for AWS DynamoDB connection.
https://github.com/aws-samples/nitro-enclave-blockchain-wallet-on-eks/blob/main/applications/ethereum-signer/cmd/key-generator_enclave/run.sh#L13-L19

Please let me know if that example helps.

Cheers

@Xavina
Copy link

Xavina commented Mar 6, 2024

Hi @dpdornseifer !!!

Super thanks for the sample I'll give it a try!!!

Thanks!

@dpdornseifer
Copy link

Perfect @Xavina, let me know if you are facing any issues.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants