|
| 1 | +# 🚀 DynamoDB Modernization Infrastructure |
| 2 | + |
| 3 | +> **CloudFormation Template for MySQL to DynamoDB Migration Workshop** |
| 4 | +
|
| 5 | +A comprehensive CloudFormation template that sets up all required infrastructure components for the database modernization workshop, simulating an on-premises environment with MySQL database and providing the complete toolkit for migration to Amazon DynamoDB. |
| 6 | + |
| 7 | +## 🔧 Infrastructure Components |
| 8 | + |
| 9 | +This (`modernizer-db.yaml`) template creates a secure development environment based on VS Code Server, accessible through a browser and protected by user authentication. Workshop materials and utilities come pre-loaded in the environment. The database layer consists of a fully configured MySQL instance populated with sample e-commerce data, along with monitoring capabilities and secure credential management. |
| 10 | + |
| 11 | +Network infrastructure is configured with appropriate security groups and VPC endpoints to ensure secure communication between services. A CloudFront distribution provides fast, secure access to the development interface. |
| 12 | + |
| 13 | +The migration components include necessary IAM roles for DynamoDB, Glue ETL processes, and Lambda functions. An S3 bucket serves as the staging area, while pre-configured Glue connections streamline the database migration process. Docker support is included for compatibility testing across environments. |
| 14 | + |
| 15 | +## 📋 Prerequisites |
| 16 | + |
| 17 | +Before deploying this CloudFormation template, ensure you have: |
| 18 | + |
| 19 | +1. **AWS Account Access**: Administrative permissions in your AWS account |
| 20 | +2. **Public IP Address**: Your current public IP address for security group configuration |
| 21 | +3. **Region Selection**: Choose a region with support for all required services |
| 22 | +4. **CloudFormation Knowledge**: Basic understanding of AWS CloudFormation |
| 23 | + |
| 24 | +## 🚀 Deployment Instructions |
| 25 | + |
| 26 | +### Step 1: Deploy CloudFormation Template |
| 27 | + |
| 28 | +1. Navigate to the AWS CloudFormation console |
| 29 | +2. Click "Create stack" > "With new resources" |
| 30 | +3. Upload the `modernizer-db.yaml` file |
| 31 | +4. Complete the parameters form with required information: |
| 32 | + - Environment name |
| 33 | + - Your public IP address for access control |
| 34 | + |
| 35 | +### Step 2: Accessing Your Development Environment. |
| 36 | +Once your CloudFormation template is CREATE_COMPLETE, access the "Outputs" tab to retrieve your environment credentials. |
| 37 | + |
| 38 | +<img width="1482" height="508" alt="image" src="https://github.com/user-attachments/assets/6d069ca9-5ee6-4f7b-ab5f-6fb2d42b6409" /> |
| 39 | + |
| 40 | +Locate these two important values: |
| 41 | + - VSCodeServerPassword - Authentication credential for your VS Code instance |
| 42 | + - VSCodeServerURLModernizer - Direct endpoint to your cloud-based IDE |
| 43 | + |
| 44 | +Your values are unique to you and will differ from the above example. |
| 45 | + |
| 46 | +Click the VSCodeServerURLModernizer to launch your development environment. Enter the password when prompted and allow approximately 60 seconds for the environment to initialize. Any startup notifications can be safely dismissed. |
| 47 | + |
| 48 | +## 🔍 Infrastructure Details |
| 49 | + |
| 50 | +### 📊 Resource Specifications |
| 51 | + |
| 52 | +| Component | Specification | Notes | |
| 53 | +|-----------|---------------|-------| |
| 54 | +| EC2 Instance | t4g.large | ARM-based for cost optimization | |
| 55 | +| Storage | 40 GB gp3 | Encrypted EBS volume | |
| 56 | +| MySQL | 8.0+ | Community edition | |
| 57 | +| Network | Default VPC | VPC endpoints for optimization | |
| 58 | +| Python | 3.13 | Latest version for compatibility | |
| 59 | +| Node.js | v18 | LTS version for stability | |
| 60 | + |
| 61 | +## 🚮 Cleanup Instructions |
| 62 | + |
| 63 | +1. After executing the workshop, you would have created three DynamoDB tables: Users, Products, Categories. Please delete them using the DynamoDB AWS console as indicated in the below picture: |
| 64 | + <img width="800" height="300" alt="image" src="https://github.com/user-attachments/assets/0c0fe99c-fb71-48d8-9d4f-4863b6ee1b99" /> |
| 65 | + |
| 66 | + If you prefer you can use below AWS CLI commands to delete the DynamoDB tables: |
| 67 | + |
| 68 | + $ aws dynamodb delete-table --table-name Categories --region us-west-2 |
| 69 | + $ aws dynamodb delete-table --table-name Products --region us-west-2 |
| 70 | + $ aws dynamodb delete-table --table-name Users --region us-west-2 |
| 71 | + |
| 72 | +3. After executing the workshop, you would have also created three Glue jobs: users_migration_job, product_migration_job, categories_migration_job. Please delete them using the Glue AWS console as indicated in the below picture: |
| 73 | + <img width="800" height="300" alt="image" src="https://github.com/user-attachments/assets/7f77fb58-c7fb-4b3a-8da6-2b0e382b70bc" /> |
| 74 | + |
| 75 | + If you prefer you can use below AWS CLI commands to delete the Glue jobs: |
| 76 | + |
| 77 | + $ aws glue delete-job --job-name categories_migration_job |
| 78 | + $ aws glue delete-job --job-name products_migration_job |
| 79 | + $ aws glue delete-job --job-name users_migration_job |
| 80 | + |
| 81 | +4. Finally, delete the CloudFormation stack you deployed as part of this workshop. You can delete the CloudFormation stack as shown in the below picture: |
| 82 | + <img width="3004" height="830" alt="image" src="https://github.com/user-attachments/assets/223e9ac8-979f-4b31-8d5e-f319a4f17044" /> |
| 83 | + |
| 84 | + If you prefer you can use below AWS CLI commands to delete the CloudFormation stack: |
| 85 | + |
| 86 | + $ aws cloudformation delete-stack --stack-name <StackName> |
0 commit comments