Sei sulla pagina 1di 4

SQS (Simple Queue Service) :

Message can be a max of 256 KB(max is 2GB but then they use S3)
Can be linked to Automatic Scaling Groups (based on the number of messages in the
queue perhaps)

1. Pull based.
2. SNS is push based
3. Messages can be kept in the que from 1 minute to 14 days; the default is 4 days.
4. Visibility Timeout: the time period in which if the message has not been deleted, the
message will reappear on the queue. Maximum is 12 hours.
5. Long poll will not return until a message arrives in the queue while short poll returns.

Standard Queues:
1. Default queue type
2. Nearly unlimited number of transactions per second.
3. Messages are delivered at least once.
4. More than one message might be delivered out of order.
5. Strive to deliver messages in the order they came in.
FIFO Queues :
1. Offers exactly-once processing
2. Doesn’t allow duplicate messages
3. Support message groups
4. Limited to 300 transactions per second (TPS)

SWF (Simple WorkFlow) : A webservice that makes it easy to coordinate work across
distributed application components. (media processing, web applications back-ends, business
process workflows, analytical pipelines.

Think of the “human element”, “human interaction”

● Retention period is 14 days; workflow executions can last up to 1 year.


● SWF offers a task oriented API, where as SQS offers a message oriented API.
● SWF ensures that a task is assigned only once and is never duplicated. This is not the
case with SQS.
● SWF keeps track of all the tasks and events in an application. With Amazon SQS,
developer needs to implement application-level tracking, especially if the application
uses multiple queues.
● Task oriented API
● “Domain” means collection of related workflows.

SWF Actors
Workflow Starters: An application that could initiate a workflow. E-commerce website or a
mobile app etc.

Deciders :
Activity Workers: carry out the activity tasks

SNS (Simple Notification Service)


Instantaneous push based delivery.

Pay as you go.

SNS could used to send push notification to Apple, google, Fire OS, Windows devices, android
devices in China with Baidu Cloud Push.

SNS could also deliver SMSs oe email to Amazon SQS or to any HTTP endpoint.

To prevent the messages from being lost, SNS stores the messages redundantly across
multiple availability zones.

Elastic Transcoder

Used to transcode media files into various formats.

Charged based on the minutes of usage and the resolution.

API Gateway

Uses:
1. Could expose HTTP endpoint to expose a restful API
2. Serverlessly connect to services like Lambda & DynamoDB
3. Could send each API endpoint to a different target.
4. Run sufficiently with low cost
5. Scale effortlessly
6. Track and control usage by API key
7. Throttle request to prevent attacks
8. Connect to CloudWatch to log all requests for monitoring
9. Maintain multiple versions of the API.
Steps:
1. Define an API (container)
2. Define resources and nested resources (URL paths)
a. Select supported HTTP methods (verbs)
b. Set security
c. Choose target (such as EC2, Lambda, DynamoDB, etc)
3. Set request response transformation.

Deploying API gateway:


1. Deploy API to stage:
a. USes API gateway domain, by default
b. Can use custom domain
c. Supports AWS certificate Manager: free SSL/TLS

Browsers guard against XSS attacks but tools like cURL and Postman don’t.

Has caching capability for TTL seconds.

Scalable

CORS header are the way to enables multiple domains (s3.fdfsdsds.amazon.com,


cludfront.dsdsdsdsdsd.amazon.com, etc) in the same application to be treated like they are from
the same origin.

How CORS works:


1. Browser makes an HTTP OPTIONS call for a URL
2. Server returns response that says: “These other domains are approved to GET this
URL”
3. Error: “Origin policy cannot be read at the remote source?” means the CORS should be
enabled on API gateway.

Kinesis

1. Kinesis streams: Data is stored on streams


2. Kinesis Firehose: Data is analysed as it comes in. No storage. Uses Lambda function.
3. Kinesis Analytics: Works with both Streams and Firehose and analyses the data as it
comes in.
Cognito

Uses silent push notifications to sync user data (like email or password)

User Pools:User based. Users could directly sign in to user pool. Generates JWT.
Authentication, account recovery
Identity pools: Authorization. Grants AWS credentials in the form of IAM role.

Potrebbero piacerti anche