awslabs / awslabs/aws-batch-helpers

Error "Unable to find AWS CLI executable."

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
134
Forks
40
PR merge metrics
No merged PRs in 30d

Description

# Summary

There are multiple resources available out there that reference the files in this project. I have painstakingly went through many of them attempting to find where the gap is on this issue and am hoping to save others that same pain.

The AWS CLI is _indeed_ available in the image, so the error is actually misleading. After tracing the fetch-and-run/fetch_and_run.sh script the lines below throw false positives due to the *which* command no longer being part of the [amazonlinux](https://github.com/amazonlinux/container-images/) image.

```
# Check that necessary programs are available
which aws >/dev/null 2>&1 || error_exit "Unable to find AWS CLI executable."
which unzip >/dev/null 2>&1 || error_exit "Unable to find unzip executable."
```

You could simply remove those lines and operate under the assumption that these are installed (since you are explicitly installing them anyway) or you could keep the check by modifying them to something like the following:

```
# Check that necessary programs are available
aws --version >/dev/null 2>&1 || error_exit "Unable to find AWS CLI executable."
unzip -v >/dev/null 2>&1 || error_exit "Unable to find unzip executable."
```

Contributor guide

Open the contributing guide

Research direction

Inspect fetch-and-run/fetch_and_run.sh, starting with its checks for aws and unzip and how the amazonlinux image provides those programs. Update the checks so the AWS CLI and unzip are validated without relying on which, then run fetch-and-run in the affected image to confirm neither installed executable produces a false error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, shell
Domain
cloud, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.