Cloud computing quickstart for data engineering
Tags: aws, python, beginners, redshift
Published: 2021-12-13 15:18:56

## What

Cloud computing is the use of a network of remote servers hosted on the internet to store, manage and process data.
+ no need to invest in hardware upfront
+ rapid provisioning of resources
+ provides efficient global access through deployments in different regions.

Cloud providers are Amazon, Microsoft, Google, Alibaba, Oracle and IBM. As Amazon is the biggest one, we are going to get an overview to get the basics needed for data engineering.

## AWS - Amazon Web Services

AWS offers more than 140 services for computation, storage, databases, networking and development tools. 
The services can be accessed in 3 ways:
- AWS MGMT console: https://console.aws.amazon.com/ - The webapp
- AWS CLI: https://aws.amazon.com/cli/ - The command line interface
- SDK's: https://aws.amazon.com/tools/ - Software development kits. Available in a lot of programming languages. The advantage of using IaC - Infrastructure as code are __sharing__, __reproducibility__, __multiple deployments__ and __maintainability__. For development with python we can use the famous [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html).

As there are over hundred services available, you might be overwhelmed at first sight. In order to make the start a bit easier we create a glossary with the services you will need for data engineering and the according links to their documentation. As there are a lot more services than the ones mentioned below, feel free to dive deeper into the AWS documentation [here](https://docs.aws.amazon.com/).

### IAM - [Identity and Access Management](https://aws.amazon.com/iam/)

#### [User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) 
A user is an entity, person or application that interacts with AWS.
#### [Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
A role can be assigned to anyone who needs it. It is not uniquely connected to an entity.

### VPC - [Virtual Private Cloud](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html)
Enables to launch AWS resources in a virtual network defined by your needs. It is a data center with the benefits of cloud infrastructure. 

### S3 - [Simple Storage Service](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)
It can store, retrieve and access any amount of objects at any time in buckets. Depending on the need there are a lot of different [storage classes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html).

#### S3 [Buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) 
A bucket is a container for objects. There are a lot of useful properties like:
- Versioning: keep multiple versions of an object in the same bucket
- Static website hosting: a very cost-effective way to serve static web content
- Requester pays: makes the requester pay for requests and data transfer costs
- Permission management
- Data management: create lifecycle rules, transitioning data,  archive or delete data
- Metrics for usage, request, data transfer, bucket size, number of objects
- Access points: Create access points to share the bucket at scale

#### S3 [Objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingObjects.html)
An object is a file and any meta that describes that file.

### EC2 - [Elastic Cloud Compute](https://aws.amazon.com/ec2/?ec2-whats-new.sort-by=item.additionalFields.postDateTime&ec2-whats-new.sort-order=desc)
A web service that provides secure, resizable compute capacity in the cloud. If we want to use the cloud self-managed we can use EC2 + Postgresql, EC2 +  Unix FS instead of Amazon RDS or Amazon DynamoDB and Amazon S3. 

### RDS - [Relational Database Service](https://aws.amazon.com/rds/)
A relational database service that manages common database administration tasks, resizes automatically, and is cost-friendly.

### [Redshift](https://docs.aws.amazon.com/redshift/latest/mgmt/welcome.html)
- it is a column-oriented storage
- MPP (massive parallel processing) database
- good to store OLAP workloads, summing over a long history
- internally it is a modified postgresql

### [IaC - Infrastructure as Code Example with boto3](https://github.com/BarbaraJoebstl/data-engineering-nd/blob/master/data-warehouse/lesson3-cloud-computing/IaC_Redshift.ipynb)