AWS

Command Completion

AWS Services

  1. Computing

    • EC2
    • Lambda
    • Elastic Beanstalk
  2. Networking

    • VPC
    • Route 53
  3. Storage

    • S3
    • Cloudfront
    • Glacier
    • EFS
  4. Security

    • IAM
    • KMS

Common Acronyms

AWS Global Infrastructure

Types of Cloud Computing


Regions

AWS Points of Presence (Edge Locations)

AWS IAM

EC2

EC2, Amazon's Elastic Compute Cloud, is a virtual server that can perform computations remotely. The compute capacity is easy to resize, and you only pay for the computing capacity that is used.

Recently, AWS announced support for Mac EC2 instances. What's more, these instances aren't limited to using the computer exclusively through the console. You can even connect to your instance using VNC.

AWS CLI

aws configure --profile tommy

The AWS Console will check for these variables in your shell environment:

  1. AWS_ACCESS_KEY_ID otherwise specified in ~/.aws/credentials or inside ~/.aws/config as aws_access_key_id
  2. AWS_SECRET_ACCESS_KEY otherwise specified in ~/.aws/credentials or inside ~/.aws/config as aws_secret_access_key
  3. AWS_SESSION_TOKEN otherwise specified in ~/.aws/credentials or inside ~/.aws/config as aws_session_token
  4. AWS_PROFILE otherwise specified with aws --profile tommy
  5. AWS_DEFAULT_REGION otherwise specified with aws --region us-east-1 or inside ~/.aws/config as aws_default_region
  6. AWS_DEFAULT_OUTPUT otherwise specified with aws --output json or inside ~/.aws/config as aws_default_output

--query

When the AWS CLI returns output, it's typically formatted as JSON. You can use --query supplied with JMESPath, a query language for JSON.

AWS SageMaker

AWS SageMaker allows you to make cloud-hosted Jupyter notebooks, which can easily be connected to S3 buckets and EC2 instances available on your account.

You can use Amazon's SDK for Python, known as boto3 to perform operations between AWS services within a python script, such as a Jupyter notebook.

# Import the AWS SDK boto3
import boto3
s3 = boto3.resource('s3')

# Print all of the available S3 buckets
for bucket in s3.buckets.all():
  print(bucket.name)

# Specify the name of the S3 bucket
bucket = s3.Bucket('example')

# List all of the objects in a bucket
for obj in bucket.objects.all():
  print(obj.key)

# Download the S3 file, and save it to the Jupyter notebook
bucket.download_file('/s3bucket/path/to/sample.json', '/path/to/sample.json')

# Open the file inside the Jupyter notebook
my_file = open('/path/to/sample.json')
import json
my_object = json.load(my_file)

# View properties of the object
print(my_object)

IAM

Vocabulary:

IAM Policy Structure has a few key components:

By default, all permissions are denied. It must be specifically allowed. If the action you are trying to perform is being denied, it could be a result of the policy's surrounding any of the above components. Maybe the current ARN doesn't have permission for that action, or it would if a different condition was in place.

Types of Policies:

IAM on the Command-Line

AWS S3

AWS Lambda

EC2

Configure

Documentation

It's worth noting that you can specify which SSO profile name to use in two different ways:

  1. By passing a name to the --profile option, (e.g. --profile tommy)

  2. By assigning a name to the environment variable AWS_DEFAULT_PROFILE

Cloud9

AWS has an in-browser IDE called Cloud9, which you can power using an existing EC2 instance. Supposedly it supports pair programming as well.

Organizations

API Gateway

SQS