Accessing Your AWS Account Using the Web Management Console, CLI, and SDKs
There are several ways to access your AWS account and the services offered on the platform. These include the AWS web console, Command-Line Interface (CLI, and Software Development Kits (SDKs).
Let us have a look at each of these options in detail.
AWS Web Management Console
You can access your AWS account using an intuitive web interface. The URL to sign into the web console is https://aws.amazon.com/console/.
Several exercises throughout this book will be completed using the AWS web management console and you will gain hands-on experience in using the console. The following is a screenshot of the AWS Console Home page:
Figure 1.5 – AWS Management Console
To access your AWS account using the web interface, you must either use your root user account or an IAM user account (discussed in the next chapter). The root user owns the AWS account and has full access to all services and resources within the account.
As a best practice, you should not use the root user for day-to-day operations. AWS enables you to create IAM users, which are additional user accounts you can create in your AWS account. These users can represent your colleagues and act on behalf of applications needing access to AWS services. IAM users can be granted access permissions based on their roles, which allows them to interact only with the specific services required for their job responsibilities. This allows you to enforce the principle of least privileges, which may involve assigning administrative permissions to key individuals. This way, you can also ensure that the root user credentials are only used when necessary.
Next, you will explore how you can programmatically access your AWS account using the CLI.
AWS CLI
You can programmatically access your AWS account using the CLI. This allows you to issue commands directly to configure services and provision resources from your computer’s Command Prompt (if you are using Microsoft Windows) or the Terminal window (for macOS and Linux).
The AWS CLI tool needs to be downloaded and installed on your computer to use; you can access the tool at https://aws.amazon.com/cli/ for your specific operating system.
The best thing about the CLI is that you will often find it easier and quicker to get things done rather than issue multiple mouse clicks for the same set of tasks. Furthermore, with the CLI, you can still access all public Application Programming Interface (APIs) of AWS services, and you can further develop scripts to issue multiple commands to perform multiple tasks. These can be both Bash scripts and Windows PowerShell scripts.
To use the CLI, you still need to authenticate against your AWS account with a set of credentials. Unlike a username and password required for web console access, you must configure a set of access keys for use with the CLI. Each IAM user can have up to two access keys. These keys are like usernames and passwords in that they comprise an access key ID (like a username) and a secret access key (like a password).
Interestingly, you do not choose your own access keys. AWS generates these keys for you, which are specific to an IAM user of a specific AWS account. This means you do not need to specify the account ID of the AWS account you are trying to log in to, which you need to provide when using the web console.
Next, AWS also offers an online version of the CLI via its new AWS CloudShell service.
AWS CloudShell
Rather than use the command-line tools on your computer, you can use the AWS CloudShell service instead. This is a browser-based shell for interacting with AWS services and resources securely.
You access the CloudShell service via the AWS web console. This is located as a link icon in the top-right corner of the console screen, as per the screenshot shown here:
Figure 1.6 – AWS CloudShell service
When you access the AWS CloudShell service, it uses the credentials that were used to log in to the AWS web console. So, there is no need to preconfigure any access keys as you would for AWS CLI.
Next, we will look at AWS SDKs. These are sets of tools, libraries, and documentation that enable developers to build applications that integrate with the AWS ecosystem.
AWS SDKs
An SDK, otherwise known as a devkit, is a collection of tools and programs that allows developers to create an application for a specific platform. SDKs will include libraries, documentation, code samples, and processes that the developer embeds in their application to programmatically interface with a platform – in this case, AWS.
In AWS, you get different SDKs for different programming languages. So, for example, you can get an SDK for Python called Boto3, which provides Python APIs for AWS infrastructure services. This enables you to build Python applications that can interact with services such as Amazon S3, Amazon EC2, Amazon DynamoDB, and others.
This section examined various options to access your AWS account, configure services, and provision resources interactively and programmatically. In the next section, you will do a series of exercises to help you set up your AWS account and define a simple multi-account architecture.