0
votes

Are kafka commands through the awscli not supported in ubuntu? Do we have to use 'Amazon Linux 2 AMI (HVM), SSD Volume Type' for any consumers/producers interacting with MSK?

When we stood up an Ubuntu 18.04 instance it saying that

awscli is already the newest version (1.14.44-1ubuntu1).

and aws kafka help shows:

ubuntu@ip-xxxxxxxxx:~/kafka_2.12-2.1.0$ aws kafka help usage: aws [options] [ ...] [parameters] To see help text, you can run:

aws help aws help aws help aws: error: argument command: Invalid choice, valid choices are:

acm | alexaforbusiness apigateway | application-autoscaling appstream | appsync athena | autoscaling autoscaling-plans | batch budgets
| ce cloud9 | clouddirectory cloudformation | cloudfront cloudhsm
| cloudhsmv2 cloudsearch | cloudsearchdomain cloudtrail | cloudwatch codebuild | codecommit codepipeline | codestar cognito-identity
| cognito-idp cognito-sync | comprehend cur | datapipeline dax
| devicefarm directconnect | discovery dms | ds dynamodb | dynamodbstreams ec2
| ecr ecs | efs elasticache
| elasticbeanstalk elastictranscoder | elb elbv2 | emr es
| events firehose | gamelift glacier
| glue greengrass | guardduty health
| iam importexport | inspector iot
| iot-data iot-jobs-data | kinesis kinesis-video-archived-media | kinesis-video-media kinesisanalytics | kinesisvideo kms
| lambda lex-models | lex-runtime lightsail | logs machinelearning
| marketplace-entitlement marketplacecommerceanalytics | mediaconvert medialive | mediapackage mediastore | mediastore-data meteringmarketplace | mgh mobile
| mq mturk | opsworks opsworkscm
| organizations pinpoint | polly pricing | rds redshift
| rekognition resource-groups | resourcegroupstaggingapi route53 | route53domains sagemaker | sagemaker-runtime sdb | serverlessrepo servicecatalog | servicediscovery ses | shield sms | snowball sns | sqs ssm
| stepfunctions storagegateway | sts support | swf transcribe | translate waf
| waf-regional workdocs | workmail workspaces | xray s3api
| s3 configure | deploy configservice
| opsworks-cm runtime.sagemaker | history help

1

1 Answers

4
votes

It looks like you installed awscli using apt. This will give you the version that the Ubuntu maintainers chose, which is going to be significantly behind the present.

To see just how far behind, you can run aws --version. Here's the output from a recently-updated installation:

> aws --version
aws-cli/1.16.153 Python/3.6.7 Linux/4.15.0-1037-aws botocore/1.12.143

I recommend running apt remove awscli to uninstall the version that comes from Ubuntu, and following these instructions to install the latest distribution from AWS (this installs it in /usr/local/bin and requires that you have sudo access; if you just want to install it for your user you can use pip as described here.