AWS quickstart

August 12, 2024 (10mo ago)

"Cloud computing" plays a vital role in the creation of software products and services.It's also one of the most highly sought-after skills in the tech industry.

In fact, most of the projects on this site will require cloud interaction of some sort—particularly with AWS's serverless products.

Getting Started

To use AWS in these projects, we'll need to set up an account, the CLI, and the SDK.

Create an account

Install the CLI

The AWS CLI is a command-line application that lets you interact with your AWS account from the terminal.It's available on all platforms.

If you are a proficient Python user, you can just install it with pip.

pip install awscli

Otherwise, check out theofficial instructions.

Once installed, you should be able to run this command from the terminal to see its version.

aws --version

Create an IAM user

The CLI will access your AWS account via an "IAM user." You can create one from the ** Users ** page in yourIAM console.

Once the user is created, you'll need to generate access keys (passwords, essentially) for it.

*Creating an Admin IAM User *Creating access keys for a user Your access keys should look something like this:

Access key ID: AKIAIOSFODNN7EXAMPLE
Secret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Configure the CLI

Next you need to configure the CLI so that it can access your AWS account via the IAM user.

Basically, just run this command and paste in your access keys.

aws configure

Additionally, you'll also be asked for a default region and default output format.

You may leave them empty—but generally I like to use:

Default region name [None]: us-east-1
Default output format [None]: json

Configuration files

Once configured, the AWS CLI saves the credentials and region/format profiles to your computer. They are typically in these locations:

~/.aws/credentials
~/.aws/config

You can open them up and edit them if you like or just run aws configure again to change them.

Test the CLI!

Now you should be able to use your CLI to access AWS.For example, I should be able to see the S3 buckets I have in us-east-1:

aws s3 ls
 
2020-12-09 22:36:32 blog.pixegami.com
2020-12-27 00:04:52 cloud-archiver.5dac84a54677.archivetest

Generally, everything that can be done in the console can also be done in the CLI.Check out thefull reference guide here.

AWS SDK

Finally, to use AWS directly from your application code, you need to download the SDK for the language you work with.

The SDKs can be configured in different ways as well, but by default it usually uses the same profiles and credentials stored by your aws configure.

That's it!

You're all set to start using AWS.

Why AWS?

When we bring "the cloud" into a project, it's usually because there's some capability we'd like to add.

And there's many viable solutions to choose from—Azure, Google Cloud, Firebase, Digital Ocean.

So why could you chooseAWS over any of these alternatives? From a new user's perspective:

On the flip - side, the biggest drawback is its upfront complexity.

Personally though, the reason I use AWS is because it's the technology I'm most familiar with.

Why Serverless ?

** It's cheaper.** Most cloud "getting started" guides will show you how to spin up a server—a mercenary rented computer that stays online 24/7 to do your bidding.

But for most of my projects, I'm going utilize technology that doesn't require a hosted server.In particular:

| Service | Purpose | | --- | --- | | S3 | File storage | | DynamoDB | Database | | Lambda | Compute engine |

Continue Learning