Skip to content

Commit cd74d79

Browse files
committed
add the check for pidMode
1 parent b1d163b commit cd74d79

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ The `check-ecs-exec.sh` doesn't support checking this item for shared VPC subnet
128128
19. **🟡 Environment Variables : defined**
129129
SSM uses the AWS SDK which uses the [default chain](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html#credentials-default) when determining authentication. This means if AWS_ACCESS_KEY, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY are defined in the environment variables and the permissions there do not provide the required permissions for SSM to work, then the execute-command will fail. It is recomended not to define these environment variables.
130130

131+
20. **🟡 PidMode : task**
132+
If you are [sharing a PID namespace in a task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#other_task_definition_params), you can only start ECS Exec sessions into one container. See the "Considerations for using ECS Exec" in [the ECS official documentation](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html#ecs-exec-considerations) for more details.
131133
## Security
132134

133135
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

check-ecs-exec.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,4 +714,15 @@ for containerName in $containerNameList; do
714714
idx=$((idx+1))
715715
done
716716

717+
# 12. Check PID mode
718+
pidMode=$(echo "${taskDefJson}" | jq -r ".taskDefinition.pidMode")
719+
printf "${COLOR_DEFAULT} PidMode | "
720+
if [[ ${pidMode} = "task" ]]; then
721+
printf "${COLOR_YELLOW}${pidMode} \n"
722+
elif [[ ${pidMode} = "host" ]]; then
723+
printf "${COLOR_GREEN}${pidMode} \n"
724+
else
725+
printf "${COLOR_GREEN}Not Configured \n"
726+
fi
727+
717728
printf "\n"

0 commit comments

Comments
 (0)