AWS features require
boto3:CloudWatch Logs Tracing
Structured JSON tracing to CloudWatch Logs for every FTL session.Configuration
Activated via.ftlconfig:
.ftlconfig
Span Types
The tracer emits three span types:- stage
- tool
- session
High-level orchestrator stages like snapshot, boot, agent, tests
Implementation
Source: ftl/cloudwatch.py:29-46
init() function creates a singleton CloudWatch client for the session.
Emitting Spans
Source: ftl/cloudwatch.py:48-74
Querying with CloudWatch Insights
Find all events for a session:Secrets Manager
Load credentials from AWS Secrets Manager with automatic JSON expansion.Configuration
Set a prefix in.ftlconfig:
.ftlconfig
Loading Secrets
Source: ftl/secrets.py:4-36
Secret Formats
- JSON Object
- Plain String
Secrets containing JSON objects are expanded into individual environment variables:Results in:
Secret: ftl/prod/keys/stripe
Bedrock Guardrails
Apply content safety policies to agent output using Amazon Bedrock Guardrails.Implementation
Source: ftl/guardrails.py:1-32
Return Values
The function returns a tuple:- blocked (
bool) -Trueif the guardrail intervened - findings (
list[str]) - Human-readable list of violations
Policy Types Detected
Sensitive Information Policy
Sensitive Information Policy
Detects PII entities and regex pattern matches:Examples: Credit card numbers, SSN, email addresses, phone numbers
Custom Regex Patterns
Custom Regex Patterns
Custom pattern matching from guardrail configuration:
Content Policy Filters
Content Policy Filters
Content safety filters (violence, hate speech, etc.):
Usage Example
S3 Snapshots
While not in the provided source files, FTL supports S3 for storing workspace snapshots. Check the main documentation for snapshot configuration.AWS Credentials
All AWS integrations use the standard boto3 credential chain:1
Environment variables
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN2
Shared credentials file
~/.aws/credentials and ~/.aws/config3
IAM role
EC2 instance profile or ECS task role
Feature Summary
CloudWatch Logs
Structured JSON tracing with CloudWatch Insights queries
Secrets Manager
Automatic secret loading with JSON expansion
Bedrock Guardrails
Content safety filtering for agent output
S3 Storage
Workspace snapshots in S3 buckets