Deploy to AWS Lambda
Serverless deployment on AWS using SAM (Serverless Application Model).
Prerequisites
- 1. AWS account — aws.amazon.com/free
- 2. AWS CLI — docs.aws.amazon.com
- 3. AWS SAM CLI — Install SAM CLI
- 4. AWS credentials configured via
aws configure
Step-by-step
1
Install AWS CLI and SAM CLI
# macOS brew install awscli aws-sam-cli # Linux pip install aws-sam-cli # Verify installation aws --version sam --version
2
Configure AWS credentials
aws configure # Enter your: # AWS Access Key ID # AWS Secret Access Key # Default region (e.g., us-east-1) # Default output format (json)
Get your access keys from the AWS IAM Console.
3
Create your project with AWS Lambda target
npx agentvoy create my-project --build-mode app --deploy-target aws-lambda --yes
4
Configure your .env
cd my-project-app cp .env.example .env # Add your API key to .env
5
Deploy
agentvoy deploy --target aws-lambda
AgentVoy runs sam build and sam deploy --guided for you.
6
Access your API
# Get the API Gateway URL sam list stack-outputs --stack-name my-project # View logs sam logs -n AgentFunction --stack-name my-project --tail
Generated files
+ Dockerfile
+ .dockerignore
+ deploy/template.yaml (SAM template)
+ deploy/lambda_handler.py
Important notes
AWS Lambda has a 15-minute maximum execution timeout. Long-running agent tasks may need to be broken into smaller steps.
The DevTools WebSocket endpoint (/ws/trace) is not available on Lambda since it does not support persistent connections. Use CloudWatch Logs instead.