INNER CODE UNIT · JavaScript

main

sensedeep/dynamodb-onetable · samples/sensedeep/src/index.js:26

async function main() {
    let logs = await Log.find()
    console.log('Logs', JSON.stringify(logs, null, 4))

    /*
        Retrieve log events for /aws/lambda/HelloWorld between Jun 10 and July 10 2021
        Note: sort keys values are of the form: `${IsoDate}:${eventId}.
    */
    let events = await Event.find(
        {
            pk: '/aws/lambda/HelloWorld',
            sk: {between: ['2021-06-10T00:00:00.000Z', '2021-07-10T00:00:00.000Z']},
        },
        {limit: 100}
    )
    console.log('Events', JSON.stringify(events, null, 4))

    /*

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…