Skip to main content
10 min Comprehensive security guidelines for deploying and operating Aletyx Decision Control on AWS Marketplace.

Network Security

1. Restrict Access by IP

Recommendation: Always limit application access to trusted IP ranges. Sandbox Edition:
Example: 203.0.113.45/32 (single IP address) Production Edition:
Example: 10.0.0.0/8 (corporate network) Important:
  • Never use 0.0.0.0/0 except for Let’s Encrypt validation on port 80
  • Use VPN or corporate network CIDR for team access
  • Update CIDR when your IP changes

2. Use Private Subnets (Production)

For production deployments, consider this architecture:
  • EC2 in Private Subnet: No direct internet access
  • NAT Gateway: For outbound internet (updates, Docker pulls)
  • Application Load Balancer: In public subnet
  • RDS in Private Subnet: Never publicly accessible
Benefits:
  • EC2 instances not directly exposed to internet
  • Defense in depth security model
  • Better compliance posture

3. Enable VPC Flow Logs

Monitor network traffic for security analysis:
Use Cases:
  • Detect unusual traffic patterns
  • Investigate security incidents
  • Meet compliance requirements

IAM Security

1. Prefer SSM Session Manager Over SSH

Why:
  • No SSH keys to manage or lose
  • All access logged to CloudTrail
  • IAM-based access control
  • No need to open port 22
How to Connect:
Benefits:
  • Centralized access management
  • Automatic session logging
  • Works without public IP
  • No key rotation needed

2. Least Privilege IAM Policies

The CloudFormation templates create minimal IAM roles: Instance Role Permissions:
  • AmazonSSMManagedInstanceCore - SSM Session Manager
  • CloudWatchAgentServerPolicy - Log shipping
  • AWS MarketplaceMetering - Billing integration
Do NOT add:
  • Admin permissions
  • S3 full access
  • EC2 instance manipulation
  • IAM policy modification

3. Enable CloudTrail

Track all API calls for audit and compliance:
What Gets Logged:
  • Instance start/stop
  • Security group changes
  • IAM role modifications
  • SSM session starts
  • Database access patterns

Data Protection

1. EBS Encryption

Default: Enabled in all CloudFormation templates Verify encryption:
Benefits:
  • Data encrypted at rest
  • No performance impact
  • Automatic key management via AWS KMS

2. RDS Encryption (Production)

Enable in CloudFormation:
Verify:
What’s Encrypted:
  • Database storage
  • Automated backups
  • Read replicas
  • Snapshots

3. RDS Automated Backups

Configure Retention:
Recommendations:
  • Development: 7 days
  • Production: 14-30 days
  • Compliance: 30-35 days
Backup Window:
Choose low-traffic hours for your timezone.

4. Multi-AZ RDS (Production High Availability)

Enable:
Benefits:
  • Automatic failover (30-120 seconds)
  • Synchronous replication
  • Zero data loss
  • 99.95% uptime SLA
  • Automated backups from standby

Application Security

1. Change Default Database Password

After Deployment:
Password Requirements:
  • Minimum 12 characters
  • Mix of uppercase, lowercase, numbers, special characters
  • No dictionary words
  • Rotate every 90 days

2. Enable HTTPS for Production

Always use custom domain with SSL/HTTPS for production:
See SSL/HTTPS Configuration for details. Why:
  • Encrypt data in transit
  • Prevent man-in-the-middle attacks
  • Meet compliance requirements
  • Build user trust

3. Keep AMI Updated

Subscribe to Updates:
  • AWS Marketplace notifications
  • Aletyx security bulletins
  • CVE database alerts
Update Process:
  1. Review release notes
  2. Test in non-production
  3. Schedule maintenance window
  4. Update CloudFormation stack
  5. Verify application functionality

4. Regular Security Patching

OS Updates (via SSH/SSM):
Docker Image Updates:
  • New AMI versions include updated containers
  • Update to latest AMI for security patches

Access Control

1. Security Group Best Practices

Production Security Group Rules: Never Allow:
  • Port 22 from 0.0.0.0/0 (SSH to internet)
  • Port 3306/5432 from 0.0.0.0/0 (database to internet)
  • Outbound to suspicious IPs

2. Database Access Control

Best Practices:
  • RDS only accepts connections from EC2 security group
  • No public IP on RDS instance
  • Use IAM database authentication where possible
  • Enable SSL/TLS for database connections
Verify RDS is Private:

3. SSH Key Management

If using SSH access: Protect Keys:
Rotate Keys:
  1. Create new EC2 key pair
  2. Add public key to ~/.ssh/authorized_keys on instance
  3. Test new key works
  4. Remove old key
  5. Delete old key pair from AWS
Better: Use SSM Session Manager (no keys needed)

Monitoring and Auditing

1. Enable CloudWatch Alarms

Production templates include automatic alarms:
  • High CPU: CPU > 80% for 5 minutes
  • High Database Connections: > 80% of max connections
  • Low Disk Space: Free storage < 10%
Add Custom Alarms:

2. Review CloudWatch Logs

Application Logs:
System Logs:

3. Enable AWS Config

Track configuration changes:
Tracks:
  • Security group changes
  • IAM policy modifications
  • Resource deletions
  • Compliance deviations

Compliance

1. Data Residency

Control Data Location:
  • Deploy in specific AWS regions
  • Use region-locked S3 buckets
  • Configure RDS in desired region
  • Verify no cross-region replication

2. Encryption Requirements

At Rest:
  • EBS volumes encrypted (default)
  • RDS storage encrypted (enable)
  • S3 buckets encrypted (if used)
In Transit:
  • HTTPS for application access
  • SSL/TLS for database connections
  • VPC peering for private networks

3. Audit Trail

Maintain Logs For:
  • Access attempts (CloudTrail)
  • Configuration changes (AWS Config)
  • Application events (CloudWatch Logs)
  • Database queries (RDS logs)
Retention:
  • Development: 30 days
  • Production: 90 days
  • Compliance: 1-7 years

Incident Response

1. Isolate Compromised Instance

2. Collect Forensics

3. Recovery Process

  1. Isolate: Remove instance from production
  2. Investigate: Analyze logs, snapshots, network traffic
  3. Remediate: Patch vulnerability, update AMI
  4. Deploy: Launch new instance from clean AMI
  5. Monitor: Watch for reinfection signs
  6. Document: Create incident report

Security Checklist

Before going to production:
  • IP restrictions configured (AllowedCidr not 0.0.0.0/0)
  • HTTPS enabled with valid SSL certificate
  • Database password changed from default
  • EBS encryption verified
  • RDS encryption enabled (production)
  • Multi-AZ RDS configured (production)
  • Automated backups enabled (7-30 days retention)
  • CloudWatch alarms configured
  • CloudTrail logging enabled
  • VPC Flow Logs enabled
  • Security groups follow least privilege
  • RDS not publicly accessible
  • SSM Session Manager tested
  • SSH keys secured (chmod 400) or disabled
  • AMI up to date with security patches
  • Incident response plan documented

Resources

Next Steps

Support

For security concerns: