# Is it possible to monitor AWS Lambda written in Java?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-monitor-aws-lambda-written-in-java/30746>\
**Category:** Cloud platforms\
**Tags:** aws, oneagent, java\
**Created:** [March 10, 2021, 12:32pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-aws-lambda-written-in-java/30746 "2021-03-10T12:32:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shrivathsan\_Sun](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Shrivathsan\_Sun](https://community.dynatrace.com/u/Shrivathsan_Sun)\
**Post date:** [March 10, 2021, 12:32pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-aws-lambda-written-in-java/30746/1 "2021-03-10T12:32:59Z")

</div>

Hi,

Is it possible to monitor AWS Lambda written in Java with Dynatrace OneAgent? We have tried OA Extension approach but Database requests were not traced.

Thanks

---

<div class="post-metadata">

**Author:** ![khoros\_anonymous](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@khoros\_anonymous](https://community.dynatrace.com/u/khoros_anonymous)\
**Post date:** [March 10, 2021, 3:09pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-aws-lambda-written-in-java/30746/2 "2021-03-10T15:09:53Z")

</div>

Do you mean using the wrapper? “AWS\_LAMBDA\_EXEC\_WRAPPER: /opt/dynatrace” ?

> **[Trace Python, Node.js, and Java Lambda functions](https://docs.dynatrace.com/docs/ingest-from/amazon-web-services-classic/integrate-into-aws/aws-lambda-integration/aws-lambda-classic/aws-lambda-extension)**
>
> Monitor Lambda functions written in Python, Node.js, and Java.

How does the DB Calls are executed?

---

<div class="post-metadata">

**Author:** ![Shrivathsan\_Sun](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Shrivathsan\_Sun](https://community.dynatrace.com/u/Shrivathsan_Sun)\
**Post date:** [March 10, 2021, 3:18pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-aws-lambda-written-in-java/30746/3 "2021-03-10T15:18:00Z")

</div>

yes we had followed the same link and used&nbsp;AWS\_LAMBDA\_EXEC\_WRAPPER.

We use node-postgres to execute DB calls.

Note : We are not using extensions for now. We use&nbsp; [https://www.npmjs.com/package/@dynatrace/oneagent](https://www.npmjs.com/package/@dynatrace/oneagent)&nbsp;to integrate dynatrace with our Lambdas written in nodejs which works fine. Need help to integrate dynatrace for Java based lambdas.

---

<div class="post-metadata">

**Author:** ![nick\_hurt](https://avatars.discourse-cdn.com/v4/letter/n/82dd89/32.png) [@nick\_hurt](https://community.dynatrace.com/u/nick_hurt)\
**Post date:** [March 12, 2021, 3:36pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-aws-lambda-written-in-java/30746/4 "2021-03-12T15:36:31Z")

</div>

Hi Shrivathsan\_Sun,

The env var wrapper can be used to monitor java based Lambdas, however it is important to note that at least 1.5GB of RAM needs to be allocated to the Lambda function. More details available from the original link by Dante.

Does this answer your question?

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![Shrivathsan\_Sun](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Shrivathsan\_Sun](https://community.dynatrace.com/u/Shrivathsan_Sun)\
**Post date:** [March 12, 2021, 3:44pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-aws-lambda-written-in-java/30746/5 "2021-03-12T15:44:43Z")

</div>

Hi Nick,

We had tried extensions but database calls were not traced. We are using PostgreSql and Dynatrace support team&nbsp; confirmed that its driver is not yet supported in the Extensions. We had dropped the plan of using Extensions.

We have managed to integrate Dynatrace with NodeJs lambdas using OA npm module. Need help for a Lambda which is written in Java.

Thanks,

Shri

---

<div class="post-metadata">

**Author:** ![MaciejNeumann](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@MaciejNeumann](https://community.dynatrace.com/u/MaciejNeumann)\
**Post date:** [December 13, 2022, 1:55pm UTC](https://community.dynatrace.com/t/is-it-possible-to-monitor-aws-lambda-written-in-java/30746/6 "2022-12-13T13:55:16Z")

</div>

Hi&nbsp;[@Shrivathsan\_Sun](https://community.dynatrace.com/user/32737),

While the Dynatrace AWS Lambda extension has no built-in support for tracing database calls at the moment, you can&nbsp;trace such calls via OpenTelemetry interoperability. Here is a documentation article that can help you with this:  
[OpenTelemetry interoperability on AWS Lambda](https://www.dynatrace.com/support/help/shortlink/opentel-lambda)
