SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Greenplum Data Warehouse Administration and SQL Development tutorials, guides and code samples, tools and downloads for SQL Database Professionals

How to Install AWS CLI on Greenplum Cluster Node EC2 Instance

This tutorial shows Pivotal Greenplum administrators how to install AWS CLI tool on Greenplum cluster master node. AWS CLI is the command line interface for developers to use the AWS APIs to manage AWS services like Amazon S3, etc. Since the AWS CLI is not installed on Greenplum cluser nodes by default, especially if you are using the Pivotal Greenplum Data Warehouse platform on AWS cloud the CLI tool will help you ease your tasks.

Since I make file transfers between Greenplum leader node and AWS S3 buckets, I frequently use the AWS CLI tool. In this guide I will show how easy it is to install the Command Line Interface tool in a few steps.

First of all let's check if AWS CLI is installed or not on your Greenplum node EC2 instance.
Connect to the Greenplum master node via SSH as you are connecting to an EC2 instance on AWS.
Recently, when I execute "aws" command to see if AWS CLI is installed and configured on a new Greenplum cluster master node, I got the error message "No module named awscli.clidriver" indicating that the AWS CLI is not installed on the server.

[gpadmin@mdw lib]$ aws
Traceback (most recent call last):
File "/usr/local/bin/aws", line 19, in <module>
  import awscli.clidriver
  ImportError: No module named awscli.clidriver

ImportError: No module named awscli.clidriver

To install the AWS CLI version 2 on the Greenplum node (EC2 instance), I prefer to use the home directory.
You can go to home directory using:

cd /home

Then using sudo download the AWS CLI version 2 using curl command as follows:

sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

download AWS CLI on Greenplum Linux EC2 instance

Unzip the compressed file awscliv2.zip using unzip command and sudo

sudo unzip awscliv2.zip

After the download setup file is unzipped, we can now install the AWS CLI tool by executing below install command

sudo ./aws/install

install AWS CLI on EC2 instance

If you get the following return message, then the installation is successful.

You can now run: /usr/local/bin/aws --version

Developers can validate the AWS CLI setup by running the version display command as follows

aws --version

The output is as follows

aws-cli/2.0.8 Python/3.7.3 Linux/3.10.0-1062.18.1.el7.x86_64 botocore/2.0.0dev12

display AWS CLI v2 version information

Since in the AWS CLI (Command Line Inferface) installation steps, there is nothing special to Greenplum database, developers building applications on cloud or on-prem other than Pivotal Greenplum too, who require access to AWS resources can install the AWS CLI as shown in this tutorial.

Greenplum DWH

Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.