Giter VIP home page Giter VIP logo

Comments (6)

smirnoal avatar smirnoal commented on August 17, 2024 1

the new version has not been deployed with managed Lambda runtimes yet. Meantime, you can use either OCI deployment or wrapper to package 1.1.5 along with your function

from aws-lambda-java-libs.

mo7ty avatar mo7ty commented on August 17, 2024 1

Hi @smirnoal!
Didn't had the chance yet to include this update in the pipeline - is planned to be included during 2024 Q2 maintenance.
From my side, consider this issue closed, as it is working locally.

from aws-lambda-java-libs.

mo7ty avatar mo7ty commented on August 17, 2024

Answering my own question...

Why?

Because the DynamodbEvent.DynamodbStreamRecord and nested classes are not registered in LambdaEventSerializers#NESTED_CLASS_MAP.

Refer to Add support for DynamodbEvent.DynamodbStreamRecord serialization #455

from aws-lambda-java-libs.

mo7ty avatar mo7ty commented on August 17, 2024

After Add support for DynamodbEvent.DynamodbStreamRecord serialization #455 included in aws-lambda-java-serialization v1.1.5, although everything works locally and all added tests pass successfully, when running in AWS Lambda (runtime Java17) the DynamodbEvent.DynamodbStreamRecord#dynamodb is still not parsed correctly:

{
    "eventID": "_Event::Id_",
    "awsRegion": "eu-west-1",
    "eventSourceARN": "arn:aws:dynamodb:eu-west-1:_AWS::Account_:table/_DDB::Table_/stream/_DDB::Stream::Id_",
    "eventVersion": "1.1",
    "eventSource": "aws:dynamodb",
    "eventName": "REMOVE",
    "userIdentity": null,
    "dynamodb": {
        "streamViewType": null,
        "sequenceNumber": null,
        "approximateCreationDateTime": null,
        "newImage": null,
        "keys": null,
        "oldImage": null,
        "sizeBytes": null
    }
}

Using:

import com.amazonaws.services.lambda.runtime.events.DynamodbEvent;
LambdaEventSerializers.serializerFor(DynamodbEvent.DynamodbStreamRecord.class,
                                     Thread.currentThread().getContextClassLoader());
                                     // using ClassLoader.getSystemClassLoader() fails with:
                                     // com.amazonaws.services.lambda.runtime.serialization.util.ReflectUtil$ReflectException:
                                     //     java.lang.ClassNotFoundException: org.joda.time.DateTime

Why? What am I missing?

from aws-lambda-java-libs.

mo7ty avatar mo7ty commented on August 17, 2024

the new version has not been deployed with managed Lambda runtimes yet. Meantime, you can use either OCI deployment or wrapper to package 1.1.5 along with your function

Thanks @smirnoal

from aws-lambda-java-libs.

smirnoal avatar smirnoal commented on August 17, 2024

just checking if it works in the managed runtime now

from aws-lambda-java-libs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.