-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Bug Description
The CloudFormation template in chapter16/template.yaml assumes the existence of Node.js applications in /home/ec2-user/worker/
and /home/ec2-user/server/
directories, but these directories and the required application code are not created during instance launch.
Current Behavior
- Template deploys successfully
- EC2 instances launch (both server and worker)
- Web interface loads and allows file uploads
- Files upload to S3 bucket successfully
- SQS messages go into "in-flight" state but never get processed
- When SSH'ing into worker instance, the error shows:
sh-4.2$ cd /home/ec2-user/worker
sh: cd: /home/ec2-user/worker: Not a directory
Expected Behavior
The UserData script should either:
- Install required Node.js applications and code
- OR documentation should clearly indicate pre-requisite steps for installing the required application code before deploying the template
Steps to Reproduce
- Clone repository
- Deploy chapter16/template.yaml using CloudFormation
- Access the web interface through ALB URL
- Upload an image
- Image stays in "uploaded" state
- Check SQS queue - messages remain "in-flight"
- SSH into worker instance - worker directory doesn't exist
Additional Context
The template's UserData sections assume the existence of:
- /home/ec2-user/worker/worker.js
- /home/ec2-user/server/server.js
But these files and their containing directories are not created during instance launch.
Metadata
Metadata
Assignees
Labels
No labels