Quick Start

Deploy the Aevum Lambda adapter using your preferred infrastructure-as-code tool. The adapter handles authentication, request validation, and payload transformation automatically.

template.yaml
AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Resources: AevumLambdaFunction: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs20.x Environment: Variables: AEVUM_API_KEY: !Sub "${AevumApiKey}" AEVUM_ENDPOINT: https://api.aevumencyclopedia.com/v2 Policies: - CloudWatchLogsFullAccess Events: APIEvent: Type: Api Properties: Path: /process Method: POST
serverless.yml
service: aevum-adapter frameworkVersion: '3' provider: name: aws runtime: nodejs20.x environment: AEVUM_API_KEY: ${ssm:/aevum/api-key} functions: handler: handler: src/handler.processArticle events: - httpApi: path: /webhook method: post
main.tf
resource "aws_lambda_function" "aevum_adapter" { filename = "dist/adapter.zip" function_name = "aevum-encyclopedia-adapter" role = aws_iam_role.lambda_role.arn handler = "index.handler" runtime = "nodejs20.x" environment { variables = { AEVUM_API_KEY = var.aevum_api_key AEVUM_REGION = "us-east-1" } } }

Environment Variables

Configure the following variables in your Lambda environment. All secrets should be injected via AWS Systems Manager Parameter Store or Secrets Manager.

Variable Type Required Description
AEVUM_API_KEY String Yes Primary authentication token for API requests
AEVUM_ENDPOINT String No Base URL for Aevum APIs. Defaults to https://api.aevumencyclopedia.com/v2
AEVUM_LOG_LEVEL Enum No Logging verbosity: DEBUG, INFO, WARN, ERROR
AEVUM_RETRY_COUNT Integer No Max retry attempts for failed API calls (default: 3)

IAM & Permissions

The Lambda execution role requires minimal permissions. Apply the principle of least privilege.

iam-policy.json
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "arn:aws:logs:*:*:*" }, { "Effect": "Allow", "Action": [ "ssm:GetParameter" ], "Resource": "arn:aws:ssm:*:*:parameter/aevum/*" } ] }
💡 Recommendation Enable VPC access only if your Lambda needs to communicate with private resources. Public API calls work without VPC configuration.

Event Payloads

All requests to Aevum endpoints must include the X-Aevum-Signature header for webhook validation. The payload structure follows JSON:API conventions.

article-submission.json
{ "data": { "type": "articles", "id": "art_8f3k29x1", "attributes": { "title": "Quantum Error Correction", "language": "en", "category": "physics", "content_markdown": "# Overview...", "metadata": { "author_id": "usr_92a4", "confidence_score": 0.94, "fact_check_status": "verified" } } } }

Monitoring & Logs

CloudWatch metrics are automatically emitted. Key metrics include:

⚠️ Rate Limits Standard tier: 1,000 requests/minute. Enterprise tier: 10,000 requests/minute. Exceeding limits returns HTTP 429 with Retry-After header.

FAQ

How do I handle cold starts?

Use AWS Lambda Provisioned Concurrency for latency-sensitive operations. The Aevum adapter initializes in <120ms on cold start.

Is TLS 1.2 required?

Yes. All Aevum endpoints enforce TLS 1.2+. Lambda runtimes Node.js 18+ and Python 3.9+ support this by default.

Can I use this for batch processing?

For batch operations (>100 items), use the /batch/ingest endpoint instead of individual Lambda invocations. See the Batch Processing guide.