CINXE.COM
Getting started with the AWS CLI - AWS Command Line Interface
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Getting started with the AWS CLI - AWS Command Line Interface</title><meta name="viewport" content="width=device-width,initial-scale=1" /><meta name="assets_root" content="/assets" /><meta name="target_state" content="cli-chap-getting-started" /><meta name="default_state" content="cli-chap-getting-started" /><link rel="icon" type="image/ico" href="/assets/images/favicon.ico" /><link rel="shortcut icon" type="image/ico" href="/assets/images/favicon.ico" /><link rel="canonical" href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html" /><meta name="description" content="Get started with the AWS CLI version 2 with instructions on how to install the AWS CLI and the prerequisites needed to run AWS CLI commands." /><meta name="deployment_region" content="IAD" /><meta name="product" content="AWS Command Line Interface" /><meta name="guide" content="User Guide for Version 2" /><meta name="abstract" content="The AWS CLI is an open source tool built using the AWS SDK for Python (Boto) that provides commands for interacting with AWS services. With minimal configuration, you can start using all of the functionality provided by the AWS Management Console from your favorite terminal program. This guide provides instructions for installing, configuring, and using the AWS CLI on Windows, macOS, and Linux. Learn how to use the AWS CLI to access the public API of any AWS service and write scripts to manage your AWS resources." /><meta name="guide-locale" content="en_us" /><meta name="tocs" content="toc-contents.json" /><link rel="canonical" href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html" /><link rel="alternative" href="https://docs.aws.amazon.com/id_id/cli/latest/userguide/cli-chap-getting-started.html" hreflang="id-id" /><link rel="alternative" href="https://docs.aws.amazon.com/id_id/cli/latest/userguide/cli-chap-getting-started.html" hreflang="id" /><link rel="alternative" href="https://docs.aws.amazon.com/de_de/cli/latest/userguide/cli-chap-getting-started.html" hreflang="de-de" /><link rel="alternative" href="https://docs.aws.amazon.com/de_de/cli/latest/userguide/cli-chap-getting-started.html" hreflang="de" /><link rel="alternative" href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html" hreflang="en-us" /><link rel="alternative" href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html" hreflang="en" /><link rel="alternative" href="https://docs.aws.amazon.com/es_es/cli/latest/userguide/cli-chap-getting-started.html" hreflang="es-es" /><link rel="alternative" href="https://docs.aws.amazon.com/es_es/cli/latest/userguide/cli-chap-getting-started.html" hreflang="es" /><link rel="alternative" href="https://docs.aws.amazon.com/fr_fr/cli/latest/userguide/cli-chap-getting-started.html" hreflang="fr-fr" /><link rel="alternative" href="https://docs.aws.amazon.com/fr_fr/cli/latest/userguide/cli-chap-getting-started.html" hreflang="fr" /><link rel="alternative" href="https://docs.aws.amazon.com/it_it/cli/latest/userguide/cli-chap-getting-started.html" hreflang="it-it" /><link rel="alternative" href="https://docs.aws.amazon.com/it_it/cli/latest/userguide/cli-chap-getting-started.html" hreflang="it" /><link rel="alternative" href="https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-chap-getting-started.html" hreflang="ja-jp" /><link rel="alternative" href="https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-chap-getting-started.html" hreflang="ja" /><link rel="alternative" href="https://docs.aws.amazon.com/ko_kr/cli/latest/userguide/cli-chap-getting-started.html" hreflang="ko-kr" /><link rel="alternative" href="https://docs.aws.amazon.com/ko_kr/cli/latest/userguide/cli-chap-getting-started.html" hreflang="ko" /><link rel="alternative" href="https://docs.aws.amazon.com/pt_br/cli/latest/userguide/cli-chap-getting-started.html" hreflang="pt-br" /><link rel="alternative" href="https://docs.aws.amazon.com/pt_br/cli/latest/userguide/cli-chap-getting-started.html" hreflang="pt" /><link rel="alternative" href="https://docs.aws.amazon.com/zh_cn/cli/latest/userguide/cli-chap-getting-started.html" hreflang="zh-cn" /><link rel="alternative" href="https://docs.aws.amazon.com/zh_tw/cli/latest/userguide/cli-chap-getting-started.html" hreflang="zh-tw" /><link rel="alternative" href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html" hreflang="x-default" /><meta name="feedback-item" content="AWS Command Line Interface" /><meta name="this_doc_product" content="AWS Command Line Interface" /><meta name="this_doc_guide" content="User Guide for Version 2" /><script defer="" src="/assets/r/vendor4.js?version=2021.12.02"></script><script defer="" src="/assets/r/vendor3.js?version=2021.12.02"></script><script defer="" src="/assets/r/vendor1.js?version=2021.12.02"></script><script defer="" src="/assets/r/awsdocs-common.js?version=2021.12.02"></script><script defer="" src="/assets/r/awsdocs-doc-page.js?version=2021.12.02"></script><link href="/assets/r/vendor4.css?version=2021.12.02" rel="stylesheet" /><link href="/assets/r/awsdocs-common.css?version=2021.12.02" rel="stylesheet" /><link href="/assets/r/awsdocs-doc-page.css?version=2021.12.02" rel="stylesheet" /><script async="" id="awsc-panorama-bundle" type="text/javascript" src="https://prod.pa.cdn.uis.awsstatic.com/panorama-nav-init.js" data-config="{'appEntity':'aws-documentation','region':'us-east-1','service':'cli'}"></script><meta id="panorama-serviceSubSection" value="User Guide for Version 2" /><meta id="panorama-serviceConsolePage" value="Getting started with the AWS CLI" /></head><body class="awsdocs awsui"><div class="awsdocs-container"><awsdocs-header></awsdocs-header><awsui-app-layout id="app-layout" class="awsui-util-no-gutters" ng-controller="ContentController as $ctrl" header-selector="awsdocs-header" navigation-hide="false" navigation-width="$ctrl.navWidth" navigation-open="$ctrl.navOpen" navigation-change="$ctrl.onNavChange($event)" tools-hide="$ctrl.hideTools" tools-width="$ctrl.toolsWidth" tools-open="$ctrl.toolsOpen" tools-change="$ctrl.onToolsChange($event)"><div id="guide-toc" dom-region="navigation"><awsdocs-toc></awsdocs-toc></div><div id="main-column" dom-region="content" tabindex="-1"><awsdocs-view class="awsdocs-view"><div id="awsdocs-content"><head><title>Getting started with the AWS CLI - AWS Command Line Interface</title><meta name="pdf" content="/pdfs/cli/latest/userguide/aws-cli.pdf#cli-chap-getting-started" /><meta name="rss" content="aws-cli-user-guide-updates.rss" /><meta name="forums" content="https://repost.aws/tags/TASjhA8h35SAyOPVeqNO2b4Q" /><meta name="feedback" content="https://docs.aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=AWS%20Command%20Line%20Interface&topic_url=https://docs.aws.amazon.com/en_us/cli/latest/userguide/cli-chap-getting-started.html" /><meta name="feedback-yes" content="feedbackyes.html?topic_url=https://docs.aws.amazon.com/en_us/cli/latest/userguide/cli-chap-getting-started.html" /><meta name="feedback-no" content="feedbackno.html?topic_url=https://docs.aws.amazon.com/en_us/cli/latest/userguide/cli-chap-getting-started.html" /><meta name="keywords" content="AWS CLI,AWS Command Line Interface,AWS CLI configuration,AWS Command Line Interface configuration,AWS CLI getting started,AWS Command Line Interface getting started,AWS CLI quickstart" /><script type="application/ld+json"> { "@context" : "https://schema.org", "@type" : "BreadcrumbList", "itemListElement" : [ { "@type" : "ListItem", "position" : 1, "name" : "AWS", "item" : "https://aws.amazon.com" }, { "@type" : "ListItem", "position" : 2, "name" : "AWS Command Line Interface", "item" : "https://docs.aws.amazon.com/cli/index.html" }, { "@type" : "ListItem", "position" : 3, "name" : "User Guide for Version 2", "item" : "https://docs.aws.amazon.com/cli/latest/userguide" }, { "@type" : "ListItem", "position" : 4, "name" : "Getting started with the AWS CLI", "item" : "https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html" } ] } </script></head><body><div id="main"><div style="display: none"><a href="/pdfs/cli/latest/userguide/aws-cli.pdf#cli-chap-getting-started" target="_blank" rel="noopener noreferrer" title="Open PDF"></a></div><div id="breadcrumbs" class="breadcrumb"><a href="https://aws.amazon.com">AWS</a><a href="/index.html">Documentation</a><a href="/cli/index.html">AWS Command Line Interface</a><a href="cli-chap-welcome.html">User Guide for Version 2</a></div><div id="main-content" class="awsui-util-container"><div id="main-col-body"><awsdocs-language-banner data-service="$ctrl.pageService"></awsdocs-language-banner><h1 class="topictitle" id="cli-chap-getting-started">Getting started with the AWS CLI</h1><div class="awsdocs-page-header-container"><awsdocs-page-header></awsdocs-page-header><awsdocs-filter-selector id="awsdocs-filter-selector"></awsdocs-filter-selector></div><p>This chapter provides steps to get started with version 2 of the AWS Command Line Interface (AWS CLI) and provides links to the relevant instructions. </p><div class="orderedlist"> <ol><li> <p><b><a href="./getting-started-prereqs.html">Complete all prerequisites</a></b> - To access AWS services with the AWS CLI, you need at minimum an AWS account and IAM credentials. To increase the security of your AWS account, we recommend that you do not use your root account credentials. You should create a user with least privilege to provide access credentials to the tasks you'll be running in AWS. </p> </li><li> <p>Install or gain access to the AWS CLI using one of the following methods:</p> <div class="itemizedlist"> <ul class="itemizedlist"><li class="listitem"> <p><b>(Recommended)</b> <a href="./getting-started-install.html">Installing or updating to the latest version of the AWS CLI</a>.</p> </li><li class="listitem"> <p><a href="./getting-started-version.html">Installing past releases of the AWS CLI version 2</a>. Installing a specific version is primarily used if your team aligns their tools to a specific version.</p> </li><li class="listitem"> <p><a href="./getting-started-source-install.html">Building and installing the AWS CLI from source</a>. Building the AWS CLI from GitHub source is a more in-depth method that is primarily used by customers who work on platforms that we do not directly support with our pre-built installers.</p> </li><li class="listitem"> <p><a href="./getting-started-docker.html">Running the official Amazon ECR Public or Docker images for the AWS CLI</a>.</p> </li><li class="listitem"> <p>Access the AWS CLI version 2 in the AWS console from your browser using AWS CloudShell. For more information, see the <a href="https://docs.aws.amazon.com/cloudshell/latest/userguide/">AWS CloudShell User Guide</a>.</p> </li></ul></div> </li><li> <p><a href="./getting-started-quickstart.html">After you have access to the AWS CLI, configure your AWS CLI with your IAM credentials for first time use</a>.</p> </li></ol></div><div class="awsdocs-note"><div class="awsdocs-note-title"><awsui-icon name="status-info" variant="link"></awsui-icon><h6>Troubleshooting installer or configure errors</h6></div><div class="awsdocs-note-text"><p>If you have issues after installing, uninstalling, or configuring the AWS CLI, see <a href="./cli-chap-troubleshooting.html">Troubleshooting errors for the AWS CLI</a> for troubleshooting steps.</p></div></div><div class="highlights"><h6>Topics</h6><ul><li><a href="./getting-started-prereqs.html">Prerequisites to use the AWS CLI version 2</a></li><li><a href="./getting-started-install.html">Installing or updating to the latest version of the AWS CLI</a></li><li><a href="./getting-started-version.html">Installing past releases of the AWS CLI version 2</a></li><li><a href="./getting-started-source-install.html">Building and installing the AWS CLI from source</a></li><li><a href="./getting-started-docker.html">Running the official Amazon ECR Public or Docker images for the AWS CLI</a></li><li><a href="./getting-started-quickstart.html">Setting up the AWS CLI</a></li></ul></div><awsdocs-copyright class="copyright-print"></awsdocs-copyright><awsdocs-thumb-feedback right-edge="{{$ctrl.thumbFeedbackRightEdge}}"></awsdocs-thumb-feedback></div><noscript><div><div><div><div id="js_error_message"><p><img src="https://d1ge0kk1l5kms0.cloudfront.net/images/G/01/webservices/console/warning.png" alt="Warning" /> <strong>Javascript is disabled or is unavailable in your browser.</strong></p><p>To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions.</p></div></div></div></div></noscript><div id="main-col-footer" class="awsui-util-font-size-0"><div id="doc-conventions"><a target="_top" href="/general/latest/gr/docconventions.html">Document Conventions</a></div><div class="prev-next"><div id="previous" class="prev-link" accesskey="p" href="./welcome-resources.html">Additional documentation and resources</div><div id="next" class="next-link" accesskey="n" href="./getting-started-prereqs.html">Prerequisites</div></div></div><awsdocs-page-utilities></awsdocs-page-utilities></div><div id="quick-feedback-yes" style="display: none;"><div class="title">Did this page help you? - Yes</div><div class="content"><p>Thanks for letting us know we're doing a good job!</p><p>If you've got a moment, please tell us what we did right so we can do more of it.</p><p><awsui-button id="fblink" rel="noopener noreferrer" target="_blank" text="Feedback" click="linkClick($event)" href="https://docs.aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=AWS Command Line Interface&topic_url=https://docs.aws.amazon.com/en_us/cli/latest/userguide/cli-chap-getting-started.html"></awsui-button></p></div></div><div id="quick-feedback-no" style="display: none;"><div class="title">Did this page help you? - No</div><div class="content"><p>Thanks for letting us know this page needs work. We're sorry we let you down.</p><p>If you've got a moment, please tell us how we can make the documentation better.</p><p><awsui-button id="fblink" rel="noopener noreferrer" target="_blank" text="Feedback" click="linkClick($event)" href="https://docs.aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=AWS Command Line Interface&topic_url=https://docs.aws.amazon.com/en_us/cli/latest/userguide/cli-chap-getting-started.html"></awsui-button></p></div></div></div></body></div></awsdocs-view><div class="page-loading-indicator" id="page-loading-indicator"><awsui-spinner size="large"></awsui-spinner></div></div><div id="tools-panel" dom-region="tools"><awsdocs-tools-panel id="awsdocs-tools-panel"></awsdocs-tools-panel></div></awsui-app-layout><awsdocs-cookie-banner class="doc-cookie-banner"></awsdocs-cookie-banner></div></body></html>