0
0
AWScloud~5 mins

Creating an AWS account - Step-by-Step CLI Walkthrough

Choose your learning style9 modes available
Introduction
Creating an AWS account lets you use Amazon's cloud services. It solves the problem of needing a place to run websites, store files, or use computing power without buying your own servers.
When you want to start using cloud services like storage or virtual servers.
When you need a secure place to host your website or application.
When you want to try out AWS tools for learning or development.
When your company wants to move its IT resources to the cloud.
When you want to manage resources and pay only for what you use.
Commands
This command sets up your AWS CLI with your access key, secret key, region, and output format so you can use AWS services from your computer.
Terminal
aws configure
Expected OutputExpected
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-east-1 Default output format [None]: json
This command checks which AWS account and user you are currently authenticated as, confirming your setup is correct.
Terminal
aws sts get-caller-identity
Expected OutputExpected
{ "UserId": "AIDAEXAMPLEUSERID", "Account": "123456789012", "Arn": "arn:aws:iam::123456789012:user/example-user" }
Key Concept

If you remember nothing else, remember: You must create an AWS account on the website first, then configure your local AWS CLI with your credentials to use AWS services.

Common Mistakes
Trying to use AWS CLI commands before creating an AWS account and getting credentials.
Without an account and credentials, AWS CLI cannot authenticate and will fail.
First create an AWS account on aws.amazon.com, then generate access keys in the IAM console, and finally run 'aws configure' with those keys.
Entering wrong or incomplete credentials during 'aws configure'.
Incorrect credentials cause authentication errors and prevent access to AWS services.
Carefully copy and paste the access key ID and secret access key exactly as provided.
Summary
Create an AWS account on the AWS website to get access credentials.
Use 'aws configure' to set up your AWS CLI with your access key, secret key, region, and output format.
Verify your setup with 'aws sts get-caller-identity' to confirm your identity and account.