Docket Docs

Maintenance

Keep your AWS Docket deployment healthy.

AWS Maintenance

Monitoring

CloudWatch Logs

Docket outputs structured JSON logs. Send them to CloudWatch:

npm start | aws logs push --log-group docket --log-stream $(hostname)

CloudWatch Metrics

Key metrics to alarm on:

  • Bedrock invocation errors
  • DynamoDB throttled requests
  • SQS queue depth
  • S3 4xx/5xx errors

DynamoDB Metrics

Monitor in the DynamoDB console:

  • Consumed Read/Write Capacity
  • Throttled requests
  • Table size

Scaling

DynamoDB

Switch to on-demand for unpredictable workloads:

aws dynamodb update-table \
  --table-name docket \
  --billing-mode PAY_PER_REQUEST

For predictable workloads, use provisioned capacity with auto-scaling:

aws dynamodb update-table \
  --table-name docket \
  --provisioned-throughput ReadCapacityUnits=100,WriteCapacityUnits=50

S3

S3 scales automatically. Monitor request rates and consider:

  • S3 Transfer Acceleration for global users
  • CloudFront in front of S3 for caching

SQS

For high throughput:

  • Use batching: SendMessageBatch instead of SendMessage
  • Enable long polling: ReceiveMessageWaitTimeSeconds=20
  • Set up dead-letter queues for failed jobs

Cost Control

ServiceCost Driver
BedrockInput + output tokens per model
DynamoDBStorage + read/write capacity
S3Storage + requests + egress
SQSNumber of API requests

Set up AWS Budgets alerts at 80% of expected spend.

Backups

DynamoDB

Enable point-in-time recovery:

aws dynamodb update-continuous-backups \
  --table-name docket \
  --point-in-time-recovery-specification PointInTimeRecoveryEnabled=true

S3

Enable versioning:

aws s3api put-bucket-versioning \
  --bucket docket-blobs-your-account-id \
  --versioning-configuration Status=Enabled

Cross-Region Replication

For disaster recovery, replicate DynamoDB and S3 to a secondary region.

On this page