Moodle Container Connexion
Install the SSM CLI en Ubuntu
1. Download ssm plugin
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb"2. Install ssm plugin
sudo dpkg -i session-manager-plugin.deb3. Verify ssm plugin instalation
session-manager-plugin --versionInstall the SSM CLI en Windows
1. Download ssm installer
https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/SessionManagerPluginSetup.exe2. Download ssm intaller in zip
https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/SessionManagerPlugin.zip3. Install ssm plugin
Execute SessionManagerPluginSetup.exe Follow the instructions
3. Verify ssm plugin instalation
Open windows CMD and execute the command.
session-manager-plugin --versionConnect to the Container
Test Connect
TASK_ID=$(aws ecs list-tasks --cluster ae-test-moodle_cluster --desired-status running --profile test | jq -r '.taskArns[0] | split("/")[-1]') echo $TASK_ID aws ecs execute-command --cluster ae-test-moodle_cluster --task $TASK_ID --container ae-test-moodle_container --command "bash" --interactive --profile testProd Connect
TASK_ID=$(aws ecs list-tasks --cluster ae-moodle_cluster --desired-status running --profile prod | jq -r '.taskArns[0] | split("/")[-1]') aws ecs execute-command --cluster ae-moodle_cluster --task $TASK_ID --container ae-moodle_container --command "bash" --interactive --profile prod