AWS Basics
A simple introduction of Amazon Web Services. We will see a few of its main services and we will also start setting up our development environment to build applications.
Join the DZone community and get the full member experience.
Join For FreeIntroduction to AWS
In this post, we will get a high-level introduction to Amazon Web Services (AWS). We will see a few of its main services and we will also start setting up our development environment to build applications with AWS.
Amazon Web Services is a subsidiary of Amazon providing on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered pay-as-you-go basis.
To start with AWS services, you will need an AWS account, which is very easy to setup and you can use free-tier for some of the upcoming demos. Free-tier is great when you are just starting with AWS. It allows you to try some AWS services free of charge and once you are comfortable with AWS, you can run bigger workloads and you will be invoiced accordingly. You can find more information about billing on the official AWS website.
AWS is a collection of over 200+ services to choose from and develop with. AWS provides on-demand cloud computing platforms and APIs on a metered pay-as-you-go basis. Most services can operate independently or by integrating with other services. Few of the popular services offered by AWS are:
- EC2
- S3
- RDS
- DynomoDB
- ElasticCache
- AWS Lambda
Most services in AWS are accessed with a TCP connection. Often this might simply be HTTP.
Each instance of service often called a resource, is give a local IP address with which other services can communicate. This IP is not connected with the outside world but you can assign an external IP if needed.
Alternatively, some services should be referenced by their ARN (Amazon Resource Name) instead of IP.
AWS Tooling
Options available to us are:
- Web Console
- CLI
- SDKs
Even though most AWS can be worked with TCP connection, SDKs make this work even easier. There are SDKs available for .NET, Java, or other popular programming languages.
These SDKs provide robust APIs that enable you to interact with services and resources inside your codebase. SDK APIs are very similar in different languages.
In order to connect your local code to the cloud, we will need to use an AWS access key to properly configure the SDK to access our account in the cloud. AWS access-key gives access to SDK and CLI.
Elastic Compute Cloud (EC2)
The core of the web of AWS is EC2. You can think of this as a service that provides servers where your applications will be running.
EC2 also forms the basis of many other services as well, such as
- Relational Database Service (RDS).
- Elastic Bean Stack.
- etc.
Compute refers to compute or server resources:
- Application Server.
- Web Server.
- Database Server.
- Mail Server.
- Media Server.
- File Server.
In AWS they are called EC2 instances instead of servers.
Instances are pay as you go. You only pay for running instances and only for the time they are running. EC2 instances comes with some built-in options:
- Broad selection of HW/SW.
- Global Hosting.
Identity and Access Management (IAM)
- Configure and manage users.
- This service is an integral part of AWS.
Cloud Watch
- Used for alarms and logging.
- Also integrated very deeply in many AWS services.
- With cloud watch, you can configure alarms to notify you or trigger automatic activity if service goes down, overloaded, or acting crazy.
- Cloud watch can be used with SNS to send alerts to end-points (e.g. email, SMS).
AWS Lambda
AWS Lambda is a compute service that runs your code in response to events, for example, when data is inserted in a DynamoDB table or when a file is uploaded to S3 or whenever a request hits one of the API endpoints and automatically manage the compute resources for you, making it easy to build applications that respond quickly to new information.
Lambda Core Features:
- Runs code on demand.
- No Servers: Servers, OS Maintenance, Scaling, Provisioning, and Deployment is managed for you.
- Code starts running within milliseconds of receiving the event trigger.
Simple Storage Service (S3)
Amazon S3 is a storage service that can also function as a web server.
In S3, you put your files in buckets.
CloudFront
CloudFront is a Content Delivery Network (CDN) service that will copy your app to edge locations around the world to improve the speed at which your app is served to your users.
API Gateway
API Gateway is a service that allows creating a REST API fully managed by AWS that acts as the front-end for other services.
It makes it easy for developers to publish, maintain, monitor, and secure APIs at any scale. In other words, it allows you to create API endpoints for your backend application without having to manage the backend servers themselves.
Also, when we use API Gateway, we did not just build a single system with finite resources, but a fault-tolerant scalable system behind the scenes to support and grow our APIs.
Install AWS Command Line
I am using windows and for other OS you can refer to the AWS website for instructions. Download installer from AWS's official website and install CLI. After install you can check the installation by running the following command:
aws --version
Next, we configure AWS by using the credentials we got earlier:
aws configure
This will ask you to provide user access-key-id and secret-key and you can enter those details. Once it's completed, you will see the following files on your machine:
Install AWS Toolkit for Visual Studio
If you are using Visual Studio for development purposes, you can install the tool-kit from within the visual studio extension menu item:
After installing the extension, you can open AWS explorer inside visual studio and access AWS Resources:
Summary
In this post, we covered a few of the AWS resources and we also started setting up our development environment. In the next posts, we will continue from this baseline. If you have some questions or comments, feel free to ask. Till next time, Happy Coding.
Published at DZone with permission of Jawad Hasan Shani. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments