Skip to content
Discussion options

You must be logged in to vote

I got it working, thanks for your help!

Here is what my api code is (NextJS):

import { DynamoDB } from '@aws-sdk/client-dynamodb' // ES6 import
import { DynamoDBDocument } from '@aws-sdk/lib-dynamodb'
// Full DynamoDB Client
const client = new DynamoDB({
  credentials: {
    accessKeyId: process.env.ACCESS_KEY,
    secretAccessKey: process.env.SECRET_KEY,
  },
  region: process.env.REGION,
})
const ddbDocClient = DynamoDBDocument.from(client)

export default async function handler(req, res) {
  console.log('req.body in api:>> ', req.body)
  const startKey = req.body.startKey
  const params = {
    TableName: process.env.TABLE_NAME,
    KeyConditionExpression: 'typeTag = :typeTag',
    Exp…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rdyar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants