# Need Help Installing Neo4j Package in AWS Lambda for Project

**URL:** <https://community.neo4j.com/t/need-help-installing-neo4j-package-in-aws-lambda-for-project/65743>\
**Category:** Ecosystem & Integrations\
**Tags:** aws, aws-lambda\
**Created:** [January 12, 2024, 8:20am UTC](https://community.neo4j.com/t/need-help-installing-neo4j-package-in-aws-lambda-for-project/65743 "2024-01-12T08:20:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivona.feit](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ivona.feit/32/30383_2.png) [@ivona.feit](https://community.neo4j.com/u/ivona.feit)\
**Post date:** [January 12, 2024, 8:20am UTC](https://community.neo4j.com/t/need-help-installing-neo4j-package-in-aws-lambda-for-project/65743/1 "2024-01-12T08:20:17Z")

</div>

Hi everyone,

I'm currently working on a project that will be hosted on AWS Lambda, and I need to connect to a Neo4j database to fetch some information. I've been trying to install the Neo4j package in Lambda by creating a virtual environment, zipping it, and adding it as a layer, but it doesn't seem to be working.

Could someone please guide me through the steps, providing a detailed, step-by-step process to properly install the Neo4j package in AWS Lambda? I specifically need to initialize the session successfully and fetch the necessary data from the Neo4j database.

Any help or advice would be greatly appreciated! Thank you in advance.

---

<div class="post-metadata">

**Author:** ![marco.looy](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/marco.looy/32/35861_2.png) [@marco.looy](https://community.neo4j.com/u/marco.looy)\
**Post date:** [September 8, 2025, 12:12pm UTC](https://community.neo4j.com/t/need-help-installing-neo4j-package-in-aws-lambda-for-project/65743/2 "2025-09-08T12:12:09Z")

</div>

Hi @ivona.feit, did you figure out how to deploy Neo4j as an AWS serverless deployment running as an AWS Lambda function?

---

<div class="post-metadata">

**Author:** ![joshcornejo](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/joshcornejo/32/34171_2.png) [@joshcornejo](https://community.neo4j.com/u/joshcornejo)\
**Post date:** [September 8, 2025, 1:29pm UTC](https://community.neo4j.com/t/need-help-installing-neo4j-package-in-aws-lambda-for-project/65743/3 "2025-09-08T13:29:17Z")

</div>

A database can’t be “serverless” - the concept of serverless implies there is no storage or central CPU.

Databases rely on shared storage, shared memory and shared CPU (in a server or a cluster).

A lambda is an ephemeral function - you need 2 tiers (one for the lambda, one for Neo4J)

---

<div class="post-metadata">

**Author:** ![marco.looy](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/marco.looy/32/35861_2.png) [@marco.looy](https://community.neo4j.com/u/marco.looy)\
**Post date:** [September 9, 2025, 6:36am UTC](https://community.neo4j.com/t/need-help-installing-neo4j-package-in-aws-lambda-for-project/65743/4 "2025-09-09T06:36:54Z")

</div>

@joshcornejo, thanks a lot for your answer.

Please be aware that “serverless” and “stateless” are different. Neo4j does run as a Docker container (serverless), and when it does, it needs a volume to preserve the state.

My question concerns a similar setup, but using AWS Lambda (a single node) instead of a Kubernetes cluster.

---

<div class="post-metadata">

**Author:** ![joshcornejo](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/joshcornejo/32/34171_2.png) [@joshcornejo](https://community.neo4j.com/u/joshcornejo)\
**Post date:** [September 9, 2025, 7:18am UTC](https://community.neo4j.com/t/need-help-installing-neo4j-package-in-aws-lambda-for-project/65743/5 "2025-09-09T07:18:12Z")

</div>

Hi Marco,

- **Stateless** is related to the functions or API logic (“they don’t hold state, any function implementation can serve any request”)

- **Serverless** is related to the abstraction of the infrastructure (“there is no dependency on a specific server to run a request”)

- Docker is a **container virtualisation** (“the server running doesn’t know the hardware is running on”)

- Neo4J running inside docker is on a linux container:

-

---

<div class="post-metadata">

**Author:** ![joshcornejo](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/joshcornejo/32/34171_2.png) [@joshcornejo](https://community.neo4j.com/u/joshcornejo)\
**Post date:** [September 9, 2025, 7:31am UTC](https://community.neo4j.com/t/need-help-installing-neo4j-package-in-aws-lambda-for-project/65743/6 "2025-09-09T07:31:27Z")

</div>

And in AWS:

- **Lambda** is to run code
- **EC2** (of different flavours) is to provision services (like Neo4J)
