1

Does anyone know how to test serverless lambda on aws? Basically, to get input and output file, but not with lambda console. So for architecture it is SQS from aws sending messages on lambda, and labda is transferring them to DB.

I want to test lambda, like first part, and then integrate more maybe on DB.

4
  • can you elaborate more? As AWS Java SDK allows to interact with AWS. Apr 15, 2022 at 8:25
  • I have edited the question
    – Gaj Julije
    Apr 15, 2022 at 17:23
  • 1
    I don't know about a proper framework but why not use a mocked DB and tie everything together with any test framework you are used to?
    – Rsf
    Apr 19, 2022 at 8:35
  • @Rsf Let say the DB is not problematic it will live in all env. (in our case in Testing env). More problematic is SQS message sending.
    – Gaj Julije
    Apr 19, 2022 at 8:53

1 Answer 1

1

Based on the aws documentation

https://docs.aws.amazon.com/lambda/latest/dg/testing-functions.html

You can test your Lambda function in the console by invoking your function with a test event. A test event is a JSON input to your function. If your function doesn't require input, the event can be an empty document ({})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.