Reputation: 1297
I have a program which interacts with AWS Console(EMR/S3) and everything works fine when using the following versions for AWS CLI:
aws-cli/1.3.9 Python/2.6.9 Linux/3.14.20-20.44.amzn1.x86_64
However, due to an existing configuration whatever was successfully ran with the above version, needs to run with an earlier verson of AWS CLI:
aws-cli/1.3.2 Python/2.6.5 Linux/2.6.32-71.el6.x86_64
The command that fails is :
aws emr add-steps --cluster-id xxxxxxxxx --steps xxxxx
and the error looks like :
aws: error: argument operation: Invalid choice, valid choices are:....
(correct if I am wrong) which basically means that some of the steps that are supported with 1.3.9
are not supported with 1.3.2
. I tried to then ''translate'' this to the earlier version by replacing with some functions that seemed to be the substitutes of the earlier version but this introduced more complexity, such as not recognizing some of the existing parameters and so on:
For example replacing add-steps command(1.3.9) with add-job-flow-steps command(1.3.2) would still not work and complain about the cluster-id parameter, and require a job flow id, and to me suddenly this becomes ugly.
We have many scripts that are running with the old AWS CLi version 1.3.2
. The question is on what approach should we take in order to make the above situation work. Shall we just upgrade the version? This however might break things.
An alternative would be to install the new version side by side with the existing one, but I am not entirely confident with this. Anyone had a similar issue or encountered a similar situation?
Upvotes: 0
Views: 1766
Reputation: 2327
I had the similar issue while running aws s3 cp
command in a shell activity from data pipeline, and resolved it by giving Image Id
as ami-63b25203
in Resources section. Actually this happens when the ec2 machine has old ami versions which support old commands and not the newer commands.
Upvotes: 1