Skip to content

Commit b1d163b

Browse files
marek-knappeMarek Knappenathanpeck
authored
Issue #55 - added version for windows platform (#58)
Co-authored-by: Marek Knappe <[email protected]> Co-authored-by: Nathan Peck <[email protected]>
1 parent d33c97a commit b1d163b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Your ECS task has already stopped, or is shutting down. ECS Exec requires the ta
9898
Your ECS task is in the middle of its starting process. ECS Exec requires the task is in the `RUNNING` state. Wait few more seconds for the task to be ready. See also [the Task lifecycle](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html) in the ECS documentation for more details.
9999

100100
10. **_🔴 Platform Version | 1.3.0 (Required: >= 1.4.0)_**
101-
On AWS Fargate, `ECS Exec` requires the Platform version 1.4.0 or newer. If your ECS task is part of an ECS service, then you can update the platform version by specifying the `PlatformVersion` parameter for the `UpdateService` API. If your ECS task is a standalone task, then you need to re-run the ECS task with the `PlatformVersion` parameter specified for the `RunTask` API. See also [the migration guide from the previous PVs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html#platform-version-migration).
101+
On AWS Fargate, `ECS Exec` requires the Platform version 1.4.0 or higher (Linux) or 1.0.0 (Windows). If your ECS task is part of an ECS service, then you can update the platform version by specifying the `PlatformVersion` parameter for the `UpdateService` API. If your ECS task is a standalone task, then you need to re-run the ECS task with the `PlatformVersion` parameter specified for the `RunTask` API. See also [the migration guide from the previous PVs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html#platform-version-migration).
102102

103103
11. **_🔴 ECS Agent Version | x.y.z (Required: >= 1.50.2)_**
104104
You need to update the version of the ECS Container Agent for your EC2 instance where your ECS task runs. See [the ECS official documentation](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) for the details and how to update.

check-ecs-exec.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,15 @@ if [[ "${launchType}" = "FARGATE" ]]; then # For FARGATE Launch Type
363363
printf "${COLOR_GREEN}Fargate\n"
364364
# Check the PV
365365
printf "${COLOR_DEFAULT} Platform Version | "
366-
requiredPV="1.4.0"
366+
367+
# Detect platform family to use correct platform version required
368+
pf=$(echo "${describedTaskJson}" | jq -r ".tasks[0].platformFamily")
369+
if [[ ${pf} == *"Windows"* ]]; then
370+
requiredPV="1.0.0" #1.0.0 minimum for windows
371+
else
372+
requiredPV="1.4.0" #1.4.0 for others
373+
fi
374+
367375
pv=$(echo "${describedTaskJson}" | jq -r ".tasks[0].platformVersion")
368376
if equalsOrGreaterVersion "${requiredPV}" "${pv}"; then
369377
printf "${COLOR_GREEN}${pv}"

0 commit comments

Comments
 (0)