Connect Akto with AWS Lambda
Last updated
Was this helpful?
Last updated
Was this helpful?
AWS Lambda is Amazon’s serverless compute service that lets you run code without provisioning or managing servers. Integrating AWS Lambda with Akto via the Golang Runtime API Proxy Extension enables automatic discovery of all API traffic processed by your Lambda functions.
To connect Akto with AWS Lambda functions, please follow these steps:
Before configuring the AWS Lambda Traffic Connector Extension, you must deploy the Akto Data-Ingestion Service. Ensure that the service is running and accessible via a publicly available URL.
SSH into the instance where you want to deploy the data-ingestion service and run these commands:
DATABASE_ABSTRACTOR_SERVICE_TOKEN
Navigate to the Quick Start tab from the left panel.
Select Hybrid SaaS Connector and copy the token from the Runtime Service Command section.
docker-mini-runtime.env
FileOpen the docker-mini-runtime.env
file and replace token
with the DATABASE_ABSTRACTOR_SERVICE_TOKEN
you retrieved earlier.
Run the following command to start the data-ingestion service:
Ensure the instance is accessible from the network where your AWS Lambda functions will send traffic. Note the public IP address or public DNS name.
Now that the Akto Data-Ingestion Service is deployed, follow these steps to setup and connect your AWS Lambda functions with Akto.
Clone the repository containing the Golang Lambda Runtime API Proxy Extension to your local machine or CI/CD environment:
Makefile
Update the following variables inside the provided Makefile
:
FUNCTION_NAME
: Provide your target AWS Lambda function name.
Optionally, update AKTO_MIRRORING_URL
later during function configuration to point to your deployed Akto Data-Ingestion Service.
Run the following command to build and package the extension:
This will:
Build the extension binary for Linux (amd64
) architecture.
Package the binary and wrapper script into a zip file inside the out/
directory.
After building, publish the extension as a Lambda Layer by running:
This command will output the Layer Version ARN needed in the next step.
Finally, run:
This will:
Attach the newly published layer to your Lambda function.
Set necessary environment variables:
AWS_LAMBDA_EXEC_WRAPPER=/opt/wrapper-script.sh
AKTO_MIRRORING_URL=https://<your-ingestion-service-address>/api/ingestData
(Replace with your Akto Data-Ingestion Service address)
Example:
Invoke your Lambda function manually or through an event.
Confirm that API traffic data (requests and responses) are captured on the Akto dashboard under the respective project.
Check logs of your Lambda function for any initialization messages from the extension.
If you face any issues, ensure:
The Akto Data-Ingestion Service is reachable publicly.
The correct ingestion URL is set in AKTO_MIRRORING_URL
.
Proper IAM permissions are granted if needed for the Lambda function.
There are multiple ways to request support from Akto. We are 24X7 available on the following:
In-app intercom
support. Message us with your query on intercom in Akto dashboard and someone will reply.
Contact help@akto.io
for email support.
Log in to the .
Join our for community support.
Contact us .