-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
Md. Redwan Ahmed edited this page Feb 26, 2025
·
2 revisions
-
AWS_REGION: AWS region (e.g., us-east-1) -
AWS_ACCESS_KEY_ID: AWS access key -
AWS_SECRET_ACCESS_KEY: AWS secret key
-
DYNAMODB_TABLE_NAME: Main DynamoDB table name -
DYNAMODB_BACKUP_TABLE: Backup metadata table name
-
DISCORD_BOT_TOKEN: Discord bot token -
DISCORD_CLIENT_ID: Discord application client ID -
DISCORD_NOTIFICATION_WEBHOOK_URL: Webhook URL for system notifications -
DISCORD_REPORTS_WEBHOOK_URL: Webhook URL for reports
-
TELEGRAM_BOT_TOKEN: Telegram bot token -
TELEGRAM_WEBHOOK_SECRET: Webhook verification secret
-
META_APP_ID: Meta application ID -
META_APP_SECRET: Meta application secret -
WHATSAPP_ACCESS_TOKEN: WhatsApp Business API token -
FACEBOOK_ACCESS_TOKEN: Facebook page access token -
INSTAGRAM_ACCESS_TOKEN: Instagram graph API token
-
GOOGLE_CLOUD_PROJECT_ID: GCP project ID -
GOOGLE_CLOUD_BUCKET_NAME: GCS bucket name -
GOOGLE_APPLICATION_CREDENTIALS: Path to service account key file
-
CLOUDFLARE_API_TOKEN: Cloudflare API token -
CLOUDFLARE_ACCOUNT_ID: Cloudflare account ID
-
JWT_SECRET: Secret for JWT generation (defaults to random) -
BACKUP_ENCRYPTION_KEY: 32-character hex key for backup encryption
-
ALERT_THRESHOLD_WARNING: Warning threshold percentage (default: 70) -
ALERT_THRESHOLD_CRITICAL: Critical threshold percentage (default: 90) -
ERROR_THRESHOLD: Maximum error rate before alerts (default: 5) -
MAX_RESPONSE_TIME_MS: Maximum acceptable response time (default: 5000) -
BACKUP_RETENTION_DAYS: Number of days to retain backups (default: 30)
{
"TableName": "BotAutomationSystem",
"KeySchema": [
{ "AttributeName": "id", "KeyType": "HASH" },
{ "AttributeName": "timestamp", "KeyType": "RANGE" }
],
"AttributeDefinitions": [
{ "AttributeName": "id", "AttributeType": "S" },
{ "AttributeName": "timestamp", "AttributeType": "S" },
{ "AttributeName": "type", "AttributeType": "S" }
],
"GlobalSecondaryIndexes": [
{
"IndexName": "TypeIndex",
"KeySchema": [
{ "AttributeName": "type", "KeyType": "HASH" },
{ "AttributeName": "timestamp", "KeyType": "RANGE" }
],
"Projection": { "ProjectionType": "ALL" }
}
]
}{
"TableName": "BotSystemBackups",
"KeySchema": [
{ "AttributeName": "backupId", "KeyType": "HASH" }
],
"AttributeDefinitions": [
{ "AttributeName": "backupId", "AttributeType": "S" },
{ "AttributeName": "timestamp", "AttributeType": "S" }
],
"GlobalSecondaryIndexes": [
{
"IndexName": "TimestampIndex",
"KeySchema": [
{ "AttributeName": "timestamp", "KeyType": "HASH" }
],
"Projection": { "ProjectionType": "ALL" }
}
]
}- Runtime: Node.js 22.x
- Memory: 256 MB (adjustable based on load)
- Timeout: 30 seconds
- Concurrency: 10 (adjustable)
Required permissions:
- DynamoDB: Read/Write
- CloudWatch: Logs and Metrics
- S3: Read/Write for deployments
- STS: AssumeRole
- SNS: Publish (for notifications)
- Create application at Discord Developer Portal
- Enable bot user
- Set required intents:
- Presence Intent
- Server Members Intent
- Message Content Intent
- Generate and configure webhook URLs
- Create bot via BotFather
- Set webhook URL
- Configure commands
- Set up webhook secret
- Create Meta app
- Configure webhooks
- Set up business account
- Generate access tokens
- JWT authentication for API endpoints
- Webhook signature verification
- Rate limiting configuration
- Encryption at rest (DynamoDB)
- Backup encryption (AES-256)
- Secure credential storage
- CPU usage thresholds
- Memory usage limits
- Response time thresholds
- Error rate monitoring
- Discord webhook configuration
- Alert severity levels
- Notification templates
- DynamoDB DAX settings
- In-memory cache parameters
- Rate limit cache configuration
- Memory allocation
- Concurrency limits
- Cold start optimization
Copyright Β© 2025 Md. Redwan Ahmed