How to test your YouTube video Locally (not using invoke)?

I want to test this function locally described in this video:

How can I modify this SDK conifig setup so that it will work:

const AWS = require("aws-sdk")
const uuid = require("uuid")
const dynamoDb = new AWS.DynamoDB.DocumentClient()

var myCredentials = new AWS.CognitoIdentityCredentials({IdentityPoolId:'IDENTITY_POOL_ID'});
var myConfig = new AWS.Config({
  credentials: myCredentials, region: 'us-west-2'

var data = {text:3}

const timestamp = new Date().getTime()

const params = {
  TableName: 'todos',
  Item: {
    id: uuid.v1(),
    text: data.text,
    checked: false,
    createdAt: timestamp,
    updatedAt: timestamp,