using py 13
-
Install Dependencies
pip install -t lambda-neo4j-keepalive -r requirements.txt
-
Package the Lambda Code
Compress-Archive -Path .\lambda-neo4j-keepalive\* -DestinationPath code_temp.zip
-
Create a Lambda Function in AWS
- Set runtime to Python 3.13
-
Upload Your Code
- Upload the
code_temp.zipfile to your Lambda function in the AWS Console.
- Upload the
-
Add IAM Policy to the Lambda Role
| Action | Resource | Description | |---------------|--------------------|--------------------------------------| | s3:PutObject | <your_s3_bucket> | Allow Lambda to upload objects to S3 |
-
add env var
-
Add an EventBridge Trigger
- Go to AWS Lambda Console
- Select your Lambda function
- Go to Configuration > Triggers
- Click Add Trigger
- Select EventBridge (CloudWatch Events)
- Choose Create a new rule
- Set rule type to Schedule expression
- Enter your preferred schedule expression (e.g.,
rate(10 minutes))
Tip: Adjust the schedule using cron or rate expressions as needed.