aws-samples / aws-samples/sample-aws-modernization-with-qumulo
Add s3 sync wait loop to LinuxInstance UserData
- Dominant language
- Shell
- Stars
- 3
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
The LinuxInstance UserData runs `aws s3 sync` from the workshop bucket. While the instance has `DependsOn: CopyWorkshopFiles`, the `CopyWorkshopFiles` resource is a Qumulo-hosted Lambda (`Custom::CopyFiles`). If the Lambda returns success before files are fully available in S3, the sync could fail.
## Affected Files & Lines
- `static/infrastructure/qumulo-workshop-deployment-cft.yaml`
- Lines 905-906: `aws s3 sync` commands
- Line 956: `DependsOn: CopyWorkshopFiles` (exists but may not be sufficient)
- Lines 1394-1401: `CopyWorkshopFiles` custom resource definition
## Required Change
Add a defensive wait loop before the s3 sync:
```bash
until aws s3 ls s3://${WorkshopUtilityBucket}/terraform/ 2>/dev/null; do
echo "Waiting for workshop files..."
sleep 10
done
aws s3 sync s3://${WorkshopUtilityBucket}/terraform/ /home/ssm-user/qumulo-workshop/terraform/ --region ${AWS::Region}
```
## AWS Documentation
- [CloudFormation: DependsOn attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html)
- [CloudFormation: Custom resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html)
## Reviewer
Aaron Dailey (aaronda) — March 4, 2026
Contributor guide
Research direction
Open static/infrastructure/qumulo-workshop-deployment-cft.yaml and inspect the aws s3 sync commands around lines 905-906, the DependsOn entry near line 956, and the CopyWorkshopFiles definition around lines 1394-1401. Compare the resource ordering with the linked AWS documentation, then add the wait behavior before the sync and validate that the UserData waits for the workshop files to become available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, shell
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100