# AWS Application Services and Serverless Notes

Hello Readers,

This is the final part of the 5-part Series on cracking the AWS Solutions Architect - Associate Exam. In this section, We will be covering notes on the topics: Application services like SQS, SES, SNS, SWS, Kinesis, Elastic Transcoder, Cognito, and Lambda.
As a bonus, In the end, We will also have some common exam notes.

[Click here](https://blog.hellokarthic.com/aws-dns-vpc-ha-notes)  for part 4 - AWS Route53, VPC, and HA.

I've divided the notes into a 5 part series.

- **Part 1:**  [Introduction and AWS S3](https://blog.hellokarthic.com/aws-saa-notes) 
- **Part 2:**  [AWS EC2](https://blog.hellokarthic.com/aws-ec2-notes) 
- **Part 3:**  [Databases](https://blog.hellokarthic.com/aws-db-notes) 
- **Part 4:**  [DNS, VPC, and HA(High-Availability)](https://blog.hellokarthic.com/aws-dns-vpc-ha-notes) 
- **Part 5:**  [Application Services and Serverless + Bonus](https://blog.hellokarthic.com/aws-applications-serverless-notes) 

### Application Services Notes
---
#### SQS Notes
- A message queuing service, Is used to decouple the infra
- SQS supports up to 256 KB, over that limit, goes to S3, and points the object ID.
- Messages retention period - 1 to 14 days max; Default = 4 days
- Visibility Timeout - Max 12 hours
- For existing Message queue users(like RabbitMQ etc), If it's hard to rewrite the application for SQS, Then simply use Amazon MQ
- Two types:
	- Standard; unlimited transactions/second, no same order, maybe delivered twice.
	- FIFO; limited to 300 transactions/second, same order, delivered only once.

#### SWS Notes
- Amazon Simple Workflow Service, It’s a task-oriented API.
- Used in Amazon warehouses. For locating the package and labeling the address on it.
- **If there is a use case that involves human interaction to it, Then SWS is used.**
- Workflow executions can last up to 1 year. Imagine the whole process of ordering a book on amazon to reach your hand - The package workflow can last up to 1 year.
- SQS Actors
	- Workflow Starters - imagine a website initiating the purchase of a book
	- Deciders - They who controls the flow of activity
	- Activity Workers - Executes the tasks

#### Elastic Transcoder
- Media Transcoder in the cloud
- Convert media files from the source format to various format that fit different devices

#### Amazon Cognito
- Web Identity Federation Service
- Basically allows you to do single sign-on using Facebook, google, etc
- Two types:
	- User pool - Similar to IAM User.
	- Identity pool - temporary access to a particular AWS Service.

#### Kinesis
- Stream data to, easy to load & analyze data
- 3 types of Kinesis
	- Kinesis Streams - Data persistence up to 24 hours
	- Kinesis Firehose - No Data persistence
		- It can capture, transform, and load streaming data into S3, Redshift, Elasticsearch Service, and Splunk, enabling near real-time analytics
	- Kinesis Analytics  (Kinesis Streams + Firehose)

### Serverless Notes
---

#### Lambda
- Run in 2 ways:
	- Event-driven- Runs based on event triggers from S3 bucket/dynamo DB.
	- Compute Service - Runs based on HTTP Req using API gateway/AWS SDK.
- Pricing is based on the number of requests, RAM and, duration of each request
- AWS X-Ray Service - Helps you to debug lambda function.
- Amazon Polly - For text to speech 

#### Types of Lambda triggers:
- **Synchronous triggers**
	- Elastic Load Balancing (Application Load Balancer)
	- Amazon Cognito
	- Amazon Lex
	- Amazon Alexa
	- Amazon API Gateway
	- Amazon CloudFront (Lambda@Edge)
	- Amazon Kinesis Data Firehose
- **Asynchronous triggers**
	- Amazon Simple Storage Service
	- Amazon Simple Notification Service
	- Amazon Simple Email Service
	- AWS CloudFormation
	- Amazon CloudWatch Logs
	- Amazon CloudWatch Events
	- AWS CodeCommit
	- AWS Config
- **Poll-based triggers**
	- Amazon Kinesis
	- Amazon SQS
	- Amazon DynamoDB Streams


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609074996178/e7QPpqlZ_i.png)

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1609075002912/xTNB56-tu.png)
 [Image Credit](https://www.udemy.com/course/aws-certified-solutions-architect-associate/) 

### Common Exam Notes
---
- In CDN, use OAI (Origin access identity) to prevent from accessing S3 directly. You can only access through CDN and not through S3.
- To move the master account from one AWS Organisations to other AWS Organisations, the following steps needs to be implemented,
	- Removal of all member accounts from AWS Organisations.
	- Delete the old organization.
	- Invite master account of old AWS Organisation as a member account to join the new AWS Organisation.
- Converting **Legacy Database** to **Amazon DynamoDB** will be a heterogenous conversion. Using **AWS Schema Conversion** Tool is best suited for such conversion along with **AWS DMS** to transfer data from on-premise to AWS. Using the Amazon S3 bucket will help to save any amount of data in the most cost-effective way before its uploaded to Amazon DynamoDB.
- **AWS Engine Conversion** Tool is for homogenous conversion. (you have dynamoDb on-premise and want to move to AWS DynamoDB. Then it might be helpful)

# All the best for your exams!


