- Diagram
- Access keys
- they are generated through the AWS Console
- Users manage their own access keys
- They are secret, like a password
- The 3 main ways
- The management console
- aws cli
- aws sdk
The Management Console
- AWS management console link
- link your credit card when creating your account - you can’t create an AWS account without a credit card
- You can do anything you want - start remote servers, start ml costs, use file storage services & upload files, etc
- Easy to access and navigate, no setup required. Perfect for exploring services & features
- Complex, repeated or large-scale setups can be cumbersome
AWS CLI
Cli
Command driven access instead of a GUI (in your command line shell)
- protected by access keys
- open source
- Direct access to the public APIs of AWS services
- takes some practice & is more advanced
- perfect for executing well known, possibly repeated tasks
- can simplify complex or repeated large-scale setups (you don’t have to click through some various web pages in the GUI, but just do the exact commands you want)
- you can even automate them using scripts
- An alternative - CloudShell (in the Management Console)
Setup/commands
- download the msi
aws configure
AWS Access Key ID [None]
: (enter)AWS Secret Access Key [None]
: (enter)Default region name [None]: us-east-1
Default output format [None]: json
- `aws iam list-users
- lists all users in my account
aws iam list-users --region
aws sts get-caller-identity
AWS CloudShell
Cloudshell
Browser-based shell built into the AWS management console
- scoped per region, same credentials as logged in user
- not yet available in all regions (region list)
- free
- image
Features
- You have a full repo!
- if you create a file and refresh your cloudshell, your files will stay
- Basic Bash commands
- you can download/upload files too
- preinstalled tools
- storage
- 1GB of storage free per AWS region
- Saved files and settings
- files saved in your home directory are available in future sessions for the same AWS region
- shell environments
- seamlessly switch between bash, powershell, zsh
AWS SDKs
Aws
AWS Software Development Kit
- Language-specific APIs (set of libraries)
- Writing code in various programming languages that also sends commands to AWS behind the scenes to use certain AWS services in a certain way
- JavaScript, Python, PHP, .NET, Ruby, Jaa, Go, Node.js, C++, mobile SDKs, IoT device SDKs, etc
- Programmatic access, infrastructure as code
- Not used in the terminal, but something you embed within your application
- Protected by access keys
- Perfect for automating tasks
- Ex) You can write a script in Python which will start a server, install software(s), start a process, then shut down the server once it’s done. All you have to do is run the script and everything is done manually.
- Simplify complex tasks/setups
AWS Tools for PowerShell
- Use AWS PowerShell if you’re in a Windows environment and want to leverage PowerShell scripting
API calls
- All ways listed above ultimately do the same thing - send commands, HTTP requests to an API provided by AWS
- Use services via HTTP requests to the APIs to make AWS do something
- Request configurations can be challenging (typically don’t use this method)