โ† ่ฟ”ๅ›žๆ–‡็ซ ๅˆ—่กจ

CloudFront + WAF Test Environment Isolation: A Complete Record

๐Ÿ“– ้ข„่ฎก้˜…่ฏป 2 ๅˆ†้’Ÿ
๐•in

Background

The test environment and production environment shared the same EC2 instance, creating a risk of mutual interference. We needed to completely isolate the test environment and add WAF whitelist protection.

Implementation Process

  1. Create New EC2 โ€” Create an independent test instance based on the production environment AMI
  2. Configure ALB โ€” Create a dedicated Application Load Balancer and Target Group
  3. Deploy CloudFront โ€” Create a new Distribution with Origin pointing to the test ALB
  4. Configure WAF โ€” Create a Web ACL, set up IP whitelist rules to allow access only from company VPN IPs
  5. DNS Switchover โ€” Point the test domain CNAME to the new CloudFront Distribution
  6. Verification โ€” Run 10 automated checks, all passed

Results

  • Test and production environments completely isolated with zero downtime
  • WAF whitelist ensures the test environment is protected from external access

Technical Highlights

  • Environment isolation is a fundamental requirement for security baseline
  • WAF IP whitelisting is more flexible than security groups and can intercept at the CloudFront layer
  • Automated verification checklist should cover every layer of the network path โ€” ClawNOC Operations Agent Practice Notes
๐Ÿฆž ๆœฌๆกˆไพ‹ไฝฟ็”จ OpenClaw Agent ๅฎŒๆˆ ยท ไปŽๆŽ’ๆŸฅใ€ๆ‰ง่กŒๅˆฐๆ–‡ๆกฃ็”Ÿๆˆๅ…จๆต็จ‹ AI ้ฉฑๅŠจ