Simple AWS CDK setup for testing CloudFront integration.
- AWS CLI configured with credentials:
aws configure - Node.js 18+ installed
- PowerShell 7+ (already installed on Windows 11)
cd Tests/Infrastructure/CloudFront .\deploy.ps1
This script will:
- ✅ Check prerequisites
- ✅ Install npm dependencies
- ✅ Bootstrap AWS CDK (if needed)
- ✅ Deploy CloudFront distribution
- ✅ Configure .NET user secrets automatically
After deployment completes:
- Edit
Tests\Services\CDN\CloudFrontCdnServiceTests.cs - Remove the
[Ignore]attribute from the test class - Run:
cd ...... # Back to Tests folder dotnet test --filter "TestCategory=CloudFront"
When done testing:
cd Tests/Infrastructure/CloudFront .\destroy.ps1
Or to also clear user secrets:
cd ........\SecretsManager .\destroy.ps1
- CloudFront Distribution - CDN for testing invalidations
- S3 Bucket - Origin storage
- IAM User - With permissions for cache invalidation
- Access Keys - Automatically configured in user secrets
~$1-2/month while active (mostly within AWS free tier)