Is DynamoDB a required import? Can data be stored in SQLite? #3137
-
The sample code describes how to load data from svc := dynamodb.NewFromConfig(cfg) // create DynamoDB client
// query the db / build the request
resp, err := svc.ListTables(
context.TODO(),
&dynamodb.ListTablesInput{
Limit: aws.Int32(5),
}) But is not explicitly stated if DynamoDB is a requirement (i assume not). Does this work as well? ncruces/go-sqlite3
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I'm not sure I understand your question. If you want to interact with DynamoDB (read or write from it), you use the DynamoDB client. If you want to read or write to SQLite, you use a SQLite client.
The sample code is about using the Go v2 SDK for listing DynamoDB tables in an AWS account, it's not a general tool to list databases, so it wouldn't work if you were to try to use it with SQLite or other database solutions |
Beta Was this translation helpful? Give feedback.
-
My wording is unfortunate. To rephrase my question: What if i do not want to use Can "CGO" issues be avoided with |
Beta Was this translation helpful? Give feedback.
-
Ah, I see. You're trying to use a Lambda in Go and want to identify what's the best driver to use SQLite. Lambda Go is a separate repository handled by a separate team, unrelated to the SDK. The AWS SDK doesn't have a SQLite tool, so we don't have a recommendation on what to use. Next time, open an issue on their GitHub repository if you need support with Lambda Go. That said, the CGO issue you mentioned is just a limitation on what you need to do to compile it, not a hard blocker. If you want to use |
Beta Was this translation helpful? Give feedback.
Ah, I see. You're trying to use a Lambda in Go and want to identify what's the best driver to use SQLite.
Lambda Go is a separate repository handled by a separate team, unrelated to the SDK. The AWS SDK doesn't have a SQLite tool, so we don't have a recommendation on what to use. Next time, open an issue on their GitHub repository if you need support with Lambda Go.
That said, the CGO issue you mentioned is just a limitation on what you need to do to compile it, not a hard blocker. If you want to use
ncruces/go-sqlite3
to not have to compile your Lambda with CGO, you are free to do so. Lambda Go team would not have a recommendation here, since this is completely up to what you want to ach…