Open bzang opened 1 year ago
I have the same issues. I want to custom endpoint and region for arc.tables()
.
@bzang @hungds99 a big update is about to land in Arc Functions: 8.0 drops the AWS SDK (and stock DynamoDB client) in favor of aws-lite
. More details:
aws-lite
: https://aws-lite.org/services/dynamodbFor whatever it's worth, under the hood aws-lite
uses the AWS-flavored JSON marshall/unmarshall utilities. Can you present a use case scenario we can look at within the aws-lite
implementation? Specifically: some code / data that isn't currently working that should work?
hi @ryanblock , I am try to using aws-lite for my Shopify App Remix project but I got this issue : Property 'DynamoDB' does not exist on type 'AwsLiteClient'.
import AwsLite from '@aws-lite/client';
const awsLiteClient = async () => {
const aws = await AwsLite({ region: 'us-west-1' });
// Easily interact with the AWS services your application relies on
await aws.DynamoDB.PutItem({
TableName: '$table-name',
Item: {
// AWS-lite automatically de/serializes DynamoDB JSON
pk: '$item-key',
data: {
ok: true,
hi: 'friends',
},
},
});
};
Did you install @aws-lite/dynamodb
?
@ryanblock Yes, my dependencies:
"@aws-lite/client": "^0.14.0",
"@aws-lite/dynamodb": "^0.3.1",
"@aws-lite/dynamodb-types": "^0.3.1",
I wonder if that's because Remix is bundling things – I'd suggest getting started without bundling so you can isolate issues as you pick up the new SDK. From there you may need to specify a path to the DynamoDB plugin with the plugins
configuration (see: https://aws-lite.org/configuration#general-config).
Actually, I may have also misread your issue above. So the DynamoDB call works ok, it's the types that are broken? If so, can you open an issue in the aws-lite
project with steps to reproduce (including code editor, version, etc.)?
@ryanblock Sure, I have another question. Currently, I am using arc
for deployment to AWS but I see the table name have specific ID like this BAppAdminRemixProduction-ShopSessionsTable-359Z4PXN3ZOU
. Can I use aws-lite
dynamodb interact with table in arc
deploy ?
Is your feature request related to a problem? Please describe. In certain situations I need to use the Dynamodb option to
removeUndefinedValues
. Currently it doesn't seem like we can pass these options in thearc.tables()
.Describe the solution you'd like I'd like to be able to pass config parameters to the
tables()
call in order to pass these option to where the Client and DocClient are being instantiated. Maybe something likeDescribe alternatives you've considered If it set up my own Dynamo client instance instead of using the arc provided
tables()
call, users would still have problems because we'd lose the advantages of the main arcfunctions
package.