Enhance AWS SSM integration and update troubleshooting guides - #119
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AWS “release mode” deployment flow to use AWS Systems Manager (SSM) Run Command for setup readiness checks instead of relying on SSH, and refreshes contributor/user docs and troubleshooting guidance (including Windows/WSL requirements) accordingly.
Changes:
- Add AWS IAM role + instance profile (with
AmazonSSMManagedInstanceCore) and attach it to the EC2 instance in release mode. - Replace the AWS SSH-based readiness wait with an SSM registration wait + SSM Run Command execution to validate setup completion.
- Expand documentation and troubleshooting steps for SSM readiness and Windows (WSL) deployment constraints.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
aws/main.tf |
Adds SSM IAM resources, attaches instance profile, and switches release readiness from SSH to SSM Run Command via local-exec. |
aws/README.md |
Documents WSL requirement on Windows and adds SSM readiness troubleshooting guidance/permissions. |
CONTRIBUTING.md |
Updates provider readiness behavior notes to reflect AWS SSM-based readiness in release mode. |
TROUBLESHOOTING.md |
Adds an AWS SSM readiness troubleshooting section and Windows/WSL guidance for the AWS path. |
Comment on lines
+370
to
+374
| set -eu | ||
| instance_id='${aws_instance.ctf_instance.id}' | ||
| region='${var.aws_region}' | ||
| command_file='${path.module}/.terraform/linux-ctfs-ssm-readiness-command.json' | ||
|
|
Comment on lines
+377
to
+381
| ping_status=$(aws ssm describe-instance-information \ | ||
| --region "$region" \ | ||
| --filters "Key=InstanceIds,Values=$instance_id" \ | ||
| --query 'InstanceInformationList[0].PingStatus' \ | ||
| --output text 2>/dev/null || true) |
Comment on lines
+446
to
+451
| status=$(aws ssm get-command-invocation \ | ||
| --region "$region" \ | ||
| --command-id "$command_id" \ | ||
| --instance-id "$instance_id" \ | ||
| --query 'Status' \ | ||
| --output text 2>/dev/null || true) |
…fix for better compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the AWS deployment process to use AWS Systems Manager (SSM) Run Command for release-mode setup readiness, replacing the previous SSH-based readiness check. It also adds new IAM resources for SSM, improves documentation for Windows users (requiring WSL), and provides troubleshooting steps for SSM-related issues.
AWS Release Mode Setup Readiness via SSM:
aws/main.tfto create an EC2 instance profile with theAmazonSSMManagedInstanceCorepolicy, enabling the instance to register as an SSM managed node.aws_instanceresource to attach the SSM instance profile when not in local setup mode.release_setup_readyresource with alocal-execprovisioner that waits for SSM registration and uses SSM Run Command to check setup readiness.Documentation and Troubleshooting Improvements:
aws/README.mdandCONTRIBUTING.mdto explain the new SSM-based readiness check, required permissions, and the need for WSL on Windows. [1] [2] [3] [4]TROUBLESHOOTING.md, including common causes and diagnostic commands. [1] [2] [3]These changes ensure more robust and cloud-native setup readiness checks for AWS deployments and provide clearer guidance for contributors and users.