AWS Bedrock

Add a Lambda layer that screens action group invocations.

Step 1: Set up A2A TrustGate

Run the quickstart wizard — prints API key setup, MCP config, CLAUDE.md snippet, and wrapper generators:

npx a2a-trustgate quickstart

# Then run the interactive setup:
npx a2a-trustgate setup

Step 2: Add to your Lambda

import requests, os

def safety_check(cmd):
    r = requests.post("https://a2ainfrastructure.com/v1/evaluate",
        headers={"Authorization": "Bearer " + os.environ["A2A_API_KEY"]},
        json={"command": cmd})
    return r.json()["decision"] == "allow"

def lambda_handler(event, context):
    cmd = event["actionGroup"]["function"]
    if not safety_check(cmd):
        return {"statusCode": 403, "body": "Blocked by TrustGate"}
    # ... execute action group
Help

Help

Need help? Here are some quick links: