text: // get.js - Retrieve a journal entry
  //
  import * as dynamoDbLib from "./lib/dynamodb-lib";
  import {success, failure} from "./lib/response-lib";
  
  export async function main(event, context) {
    const params = {
      TableName: process.env.tableName,
      // 'Key' defines the partition key and sort key of the item to be retrieved
      // - 'userId': Identity Pool identity id of the authenticated user
      // - 'entryId': path parameter
      Key: {
        userId: event.requestContext.identity.cognitoIdentityId,
        entryId: event.pathParameters.id
      }
    };
  
    try {
      const result = await dynamoDbLib.call("get", params);
      if (result.Item) {
        // Retrieved the item
        return success(result.Item);
      } else {
        return failure({status: false, error: "Item not found"});
      }
    } catch (e) {
      return failure({status: false});
    }
  }
  