|
783 | 783 | - Verify base template uses AdministratorAccess |
784 | 784 | - Verify other templates use custom IdeUserPolicy |
785 | 785 | - _Requirements: 5.6_ |
| 786 | + |
| 787 | + |
| 788 | +## VPC Endpoint Cleanup and SSM Parameters (900.x) |
| 789 | + |
| 790 | +- [x] 900.1 Create VPC Endpoint Cleanup construct |
| 791 | + - Create infra/cdk/src/main/resources/lambda/cfn-pre-delete-cleanup.py |
| 792 | + - Lambda finds GuardDuty VPC endpoints by VPC ID, deletes them, waits for deletion |
| 793 | + - Create infra/cdk/src/main/java/sample/com/constructs/CfnPreDeleteCleanup.java |
| 794 | + - Custom Resource triggers cleanup on stack delete only |
| 795 | + - _Requirements: 5.6_ |
| 796 | + |
| 797 | +- [x] 900.2 Integrate CfnPreDeleteCleanup into WorkshopStack |
| 798 | + - Add CfnPreDeleteCleanup for java-on-aws-immersion-day and java-on-amazon-eks templates |
| 799 | + - Pass VPC ID to ensure only workshop VPC endpoints are deleted |
| 800 | + - _Requirements: 5.6_ |
| 801 | + |
| 802 | +- [x] 900.3 Add workshop-vpc-id SSM parameter |
| 803 | + - Update Vpc.java to create SSM parameter with VPC ID |
| 804 | + - Parameter name: workshop-vpc-id |
| 805 | + - Available in all stacks for cross-stack reference |
| 806 | + - _Requirements: 5.6_ |
| 807 | + |
| 808 | +- [x] 900.4 Test and validate |
| 809 | + - Generate all templates: `npm run generate` |
| 810 | + - Verify CfnPreDeleteCleanup resources in EKS templates |
| 811 | + - Verify workshop-vpc-id SSM parameter in all templates |
| 812 | + - _Requirements: 5.6_ |
| 813 | + |
| 814 | + |
| 815 | +## CDK Nag Integration (1000.x) |
| 816 | + |
| 817 | +- [x] 1000.1 Add CDK Nag dependency |
| 818 | + - Add io.github.cdklabs:cdknag:2.36.2 to pom.xml |
| 819 | + - Add cdknag.version property for version management |
| 820 | + - _Requirements: 5.6_ |
| 821 | + |
| 822 | +- [x] 1000.2 Configure CDK Nag in WorkshopApp |
| 823 | + - Add AwsSolutionsChecks aspect to app |
| 824 | + - Add workshop-appropriate suppressions for: |
| 825 | + - API Gateway (APIG1-6, COG4) - no auth/logging needed for workshop |
| 826 | + - IAM (IAM4, IAM5) - managed policies and wildcards acceptable |
| 827 | + - RDS (RDS2, RDS3, RDS6, RDS10, RDS11, RDS13) - ephemeral workshop database |
| 828 | + - VPC (VPC7, EC23) - no flow logs needed |
| 829 | + - Secrets Manager (SMG4) - no rotation needed |
| 830 | + - CloudFront (CFR1-5) - HTTP origin acceptable for workshop |
| 831 | + - EKS (EKS1, EKS2) - public access and no logging for workshop |
| 832 | + - EC2 (EC28, EC29) - no autoscaling/termination protection |
| 833 | + - CodeBuild (CB4) - default CMK acceptable |
| 834 | + - S3 (S1) - no access logs needed |
| 835 | + - Lambda (L1) - CDK default runtimes acceptable |
| 836 | + - ELB (ELB2) - no ALB logs needed |
| 837 | + - ECS (ECS2, ECS4) - temporary containers, no insights |
| 838 | + - _Requirements: 5.6_ |
| 839 | + |
| 840 | +- [x] 1000.3 Enable SSL enforcement on S3 bucket |
| 841 | + - Add enforceSsl(true) to WorkshopBucket construct |
| 842 | + - Fixes AwsSolutions-S10 CDK Nag finding |
| 843 | + - _Requirements: 5.6_ |
| 844 | + |
| 845 | +- [x] 1000.4 Test and validate CDK Nag |
| 846 | + - Generate all templates: `npm run generate` |
| 847 | + - Verify no CDK Nag errors (only suppressed warnings) |
| 848 | + - All templates pass validation |
| 849 | + - _Requirements: 5.6_ |
| 850 | + |
| 851 | + |
| 852 | +## S3 HTTPS Verification (1100.x) |
| 853 | + |
| 854 | +- [x] 1100.1 Verify S3 bucket SSL enforcement |
| 855 | + - WorkshopBucket.java has enforceSsl(true) which enforces HTTPS at bucket policy level ✅ |
| 856 | + - Any HTTP requests to the bucket will be denied by AWS ✅ |
| 857 | + - _Requirements: 5.6_ |
| 858 | + |
| 859 | +- [x] 1100.2 Verify S3 client usage in Lambda |
| 860 | + - thread-dump-lambda/src/index.py uses boto3.client('s3') for put_object operations ✅ |
| 861 | + - boto3 S3 client uses HTTPS by default - no code changes needed ✅ |
| 862 | + - S3 operations: put_object for thread dumps and analysis results ✅ |
| 863 | + - _Requirements: 5.6_ |
| 864 | + |
| 865 | +- [x] 1100.3 Verify S3 permissions in CDK constructs |
| 866 | + - ThreadAnalysis.java passes bucket name to Lambda via S3_BUCKET_NAME environment variable ✅ |
| 867 | + - JvmAnalysis.java grants S3 permissions to Pod Identity role ✅ |
| 868 | + - Unicorn.java grants S3 permissions to EKS pod role ✅ |
| 869 | + - All use bucket.grantReadWrite() which doesn't affect transport protocol ✅ |
| 870 | + - _Requirements: 5.6_ |
| 871 | + |
| 872 | +- [x] 1100.4 Verify scripts don't use HTTP for S3 |
| 873 | + - tools.sh Session Manager download uses AWS-hosted URL (not our bucket) - acceptable ✅ |
| 874 | + - No scripts manually construct S3 URLs that might use HTTP ✅ |
| 875 | + - All S3 interactions go through AWS SDK/CLI which use HTTPS by default ✅ |
| 876 | + - _Requirements: 5.6_ |
| 877 | + |
| 878 | + |
| 879 | +## Unicorn Store Spring Setup (1200.x) |
| 880 | + |
| 881 | +- [x] 1200.1 Create unicorn-store-spring.sh setup script |
| 882 | + - Created infra/scripts/setup/unicorn-store-spring.sh ✅ |
| 883 | + - Copies ~/java-on-aws/apps/unicorn-store-spring to ~/environment ✅ |
| 884 | + - Logs in to ECR using aws ecr get-login-password ✅ |
| 885 | + - Builds Docker image with docker build ✅ |
| 886 | + - Tags and pushes with 'initial' tag ✅ |
| 887 | + - Tags and pushes with 'latest' tag ✅ |
| 888 | + - Emits "✅ Success: Unicorn Store Spring" for bootstrap summary ✅ |
| 889 | + - _Requirements: 5.6_ |
| 890 | + |
| 891 | +- [x] 1200.2 Integrate into java-on-aws-immersion-day template |
| 892 | + - Added Phase 4: Unicorn Store Spring to java-on-aws-immersion-day.sh ✅ |
| 893 | + - Calls unicorn-store-spring.sh after analysis setup ✅ |
| 894 | + - _Requirements: 5.6_ |
| 895 | + |
| 896 | +- [x] 1200.3 Integrate into java-on-amazon-eks template |
| 897 | + - Added Phase 4: Unicorn Store Spring to java-on-amazon-eks.sh ✅ |
| 898 | + - Calls unicorn-store-spring.sh after analysis setup ✅ |
| 899 | + - _Requirements: 5.6_ |
| 900 | + |
| 901 | + |
| 902 | +## Stack Cleanup Enhancements (1300.x) |
| 903 | + |
| 904 | +- [x] 1300.1 Enhance cleanup Lambda with CloudWatch logs and S3 cleanup |
| 905 | + - Updated cfn-pre-delete-cleanup.py to also clean up CloudWatch logs and S3 buckets ✅ |
| 906 | + - Deletes log groups with workshop- or unicornstore- prefix ✅ |
| 907 | + - Empties S3 buckets with workshop- prefix ✅ |
| 908 | + - Execution order: start VPC endpoint deletion → cleanup logs and S3 → wait for VPC endpoints ✅ |
| 909 | + - _Requirements: 5.6_ |
| 910 | + |
| 911 | +- [x] 1300.2 Update CfnPreDeleteCleanup construct with additional IAM permissions |
| 912 | + - Added logs:DescribeLogGroups and logs:DeleteLogGroup permissions ✅ |
| 913 | + - Added s3:ListAllMyBuckets, s3:ListBucket, s3:ListBucketVersions, s3:DeleteObject, s3:DeleteObjectVersion permissions ✅ |
| 914 | + - Updated Lambda description to reflect expanded cleanup scope ✅ |
| 915 | + - _Requirements: 5.6_ |
| 916 | + |
| 917 | +- [x] 1300.3 Rename construct and Lambda for clarity |
| 918 | + - Renamed VpcEndpointCleanup.java to CfnPreDeleteCleanup.java ✅ |
| 919 | + - Renamed vpc-endpoint-cleanup.py to cfn-pre-delete-cleanup.py ✅ |
| 920 | + - Updated Lambda function name to {prefix}-cfn-pre-delete-cleanup ✅ |
| 921 | + - Updated WorkshopStack.java to use new class name ✅ |
| 922 | + - _Requirements: 5.6_ |
0 commit comments