SQS, SNS, Kenesis, ActiveMQ Flashcards
Which service is a queue?
Which service is a pub/sub?
Which service supports a real time streaming model?
SQS
SNS/Active MQ
Kinesis
What is throughput of SQS?
How many messages can be in a queue in SQS?
What is the retention time for messages in SQS?
What is the size limitation on messages in SQS?
Does SQS protect you from duplicate messages or have strict ordering?
How many messages can an SQS consumer consume at a time
Unlimited
Unlimited
Min - 1 min, Max 14 days
256kb
No
10
Who can consume SQS messages?
How can an ASG scale based on a queue?
Any application that can read from the que, on-prem applications, applications running on EC2, lambda functions
Set a cloudwatch alarm to scale the ASG when the metric ApproximateNumberOfMessages is over a certain length (Queue Length). THIS WOULD BE A CUSTOM METRIC!!!
How does SQS support encryption in transit and at rest?
In transit encryption is supported by using the HTTPS API. It supports at rest encryption using KMS. Client side encryption could also be used.
How can you provide access to the queue from an external account or from service within your account
By creating an SQS access policy.
How can S3 push a notification after an event has occured?
By configuring a bucket event. It would then publish a message to SQS, SNS or a Lambda function
What is the message visibility timeout?
How can this timeout be extended by an application?
The time that a message is invisible to other consumers after one consumer poles that message. It defaults to 30 seconds.
By calling the ChangeMessageVisibility API. That will restart the message visibility timeout clock.
What happens when a message hits the MaximumReceives threshold?
Can messages in the DLQ expire?
The message will go to the Dead Letter Queue (DLQ)
Yes, it has the same expiration time as a normal queue with a max of 14 days
What is a delay queue?
It will delay messages so consumers don’t see them immediately.
What is long poling and why would you use it?
How can long polling be configured?
Long polling is when a consumer stays connected to the queue until there is a message to consume. This reduces the number of API requests made to the queue, it also decreases the processing latency.
It can be configured on the queue, or at the API level using WaitTimeSeconds
How can you implement a Request-Response system using SQS?
By using the SQS Temporary Queue Client
How can you guarantee the order of messages and enable only once delivery?
What is a group ID in FIFO?
What is the consequence if you do not use group IDs when using a SQS FIFO?
What is the limitation on messages that can be consumed per second from SQS FIFO?
By using a First In First Out Queue (FIFO)
You can assign a group ID to messages so that different groups of messages can be consumed by different consumers but all messages will be consumed in order.
You can only have one consumer
300 (or 3,000 if using batching)
What is SNS?
What can subscribe to SQS topics?
SNS allows provides topics that can be subscribed to. Similar to active MQ, these topics can be subscribed to by email, web app, SQS
SNS Kenesis Firehose HTTP/HTTPS site. Lambda SMS Email/Email JSON Mobile notifications
How can you publish to a mobile app?
Use the DirectPublish SDK. This will publish to GCM/APNS
How can you control access to SNS?
IAM Policies and SNS Topic Policies
How can you have guaranteed ordering from SNS topics and what types of subscribers does this apply to?
What can a subscriber do to only receive relevant messages from a queue?
Use FIFO Topics and it only applies to SQS subscribers.
Apply a filter
What is a good use-case for using AmazonMQ?
What is the limitation of AmazonMQ?
How can you configure AmazonMQ for HA?
When you want to migrate an on prem application that uses MQTT, AMQP, STOMP, OpenWire, WSS to the cloud
It’s not as scalable as SQS or SNS
Configure 2 instances and have them both point to the same EFS drive
What is Kinesis?
What is Data Streams?
What is Data Firehose?
What is Kinesis Data Analytics?
Makes it easy to collect, process and analyze streaming data in real time such as application logs, metrics, website clickstreams, IoT telemetry data
^^^^^^
Load data streams into aws data stores.
Analyze data streams with SQL or Apache Flink?
How can you get more throughput in a stream?
What is the throughput per shard?
What are the producers of Kinesis streams?
What are the consumers of Kinesis Data Streams?
How many consumers can you have per shard?
By increasing the number of shards
1MB per sec/ 1000 msg/sec per shard
Any client using the Kinesis library or sdk, clients running the agent
Apps using the SDK or library, Lambda, Kinesis Data Firehose, Kinesis Data Analyitics
1
What are the 2 types of consumption for Kinesis data streams?
How are you billed for Kinesis?
What is the retention period for Kinesis data streams?
Can a datastream be deleted?
2MB per shard Shared (Slower), 2MB per shared per consumer (Faster - It will increase with the number of consumers per shard)
Per shard provisioned
1 - 365 days. This gives you the ability to replay data
No
What are the sources for firehose?
How can you transform the data stream before it is batch written?
What are the destinations from Firehose?
Where can you send failed data from Firehose?
Kinesis data streams is the most common, but data can come directly from the sdk, client, agent as well as Cloud watch logs and events and AWS IoT
By using a lambda function
S3, Redshift though S3, Amazon ElasticSearch, or a custom HTTP endpoint
To an S3 bucket
What is Kinesis Data Analytics?
What are the sources for Kinesis Data Analytics
What are some use-cases for KDA?
It allows you to perform queries on data streams and output the result of that query to another datastream or firehose.
Kinesis Data Streams or Firehose
Time-series analytics, real-time dashboards, real-time metrics.