Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EBS attached ECS tasks #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thaim
Copy link

@thaim thaim commented May 6, 2024

The script check-ecs-exec.sh currently encounters a subnet ID parsing error when used with ECS tasks that have EBS volumes attached. The error arises because the script incorrectly assumes that the attachments array includes only network interfaces.

An error occurred (InvalidSubnetID.NotFound) when calling the DescribeSubnets operation: The subnet ID '' does not exist

The check-ecs-exec.sh script is designed to parse only ElasticNetworkInterface from the attachments array returned by the aws ecs describe-tasks command. If an ECS task has an EBS volume attached, the array might also contain AmazonElasticBlockStorage objects, which can lead to incorrect parsing if these are listed before any network interfaces.

Update the parsing logic within check-ecs-exec.sh to accurately handle multiple types of attachments, focusing specifically on ElasticNetworkInterface objects for subnet ID extraction. This ensures the script disregards any AmazonElasticBlockStorage objects or other non-network-related attachments that could interfere with the correct parsing process.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant