Services Flashcards

1
Q

What are Step Functions?

A

Step Functions allow you to visualize and test your serverless applications. Step Functions provide a graphical console to arrange and visualize the components of your application as a series of steps. This makes it simple to build and run multistep applications. Step Functions automatically triggers and tracks each step, and retries when there are errors, so you application executes in order and as expected. Step Functions logs the state of each step, so when things do go wrong, you can diagnose and debug problems quickly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is X-Ray?

A

X-Ray is a service that collects data about requests that your application serves, and provides tools you can use to view, filter and gain insights into that data to identify issues and opportunities for optimization. For any traced request to your application, you can see detailed information not only about the request and response, but also about calls that your application makes to downstream AWS resources, microservices, databases and HTTP web APIs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does the X-Ray architecture work?

A

You have your application, and you have the X-Ray SDK installed. The SDK then sends bits of information to the X-Ray daemon (can be installed on Linux, Windows, Mac OS X), It’s listening on UDP and takes the JSON it gets from the SDK and sends it to the X-Ray API. The API stores all the data and creates the visualization that you can see in the X-Ray console.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the X-Ray SDK provide?

A

The X-Ray SDK provides:

Interceptors to add to your code to trace incoming HTTP requests.
Client handlers to instrument AWS SDK clients that your application uses to call other AWS services.
An HTTP client to use to instrument calls to other internal and external HTTP web services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What services does X-Ray integrate with?

A

X-Ray integrates with Elastic Load Balancing, Lambda, API Gateway, EC2 and Elastic Beanstalk.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What languages are supported by X-Ray?

A

Java, Go, Node.js, Python, Ruby, .Net

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is streaming data?

A

Streaming data is data that is generate continously by thousands of data sources, which typically send in the data records simultaneously, and in small sizes (order of kilobytes).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are some examples of streaming data?

A
Purchases from online stores. 
Stock prices. 
Game data (as the gamer plays).
Social network data.
Geospatial data (Uber).
iOT sensor data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Kinesis?

A

Kinesis is a platform on AWS to send your streaming data to. Kinesis makes it easy to load and analyze streaming data, and also providing the ability for you to build your own custom applications for you business needs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the core Kinesis services?

A

Kinesis Streams, Kinesis Firehose and Kinesis Analytics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Kinesis Streams?

A

Imagine you have several data producers (like EC2 instances, cell phones, laptops, etc.) that are sending data to a Kinesis Stream. Kinesis Streams store this data, by default for 24 hours, but also up to 7 days.

The data is stored in shards. The data is then sent to a fleet of EC2 instances (consumers) which take your data and turn it into something useful (perform calculations, etc.). Once they’ve done their useful thing, they can send the data to be stored in DynamoDB, S3, EMR or Redshift.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are shards?

A

Kinesis Streams consist of shards. Shards basically has two purposes: 1) a certain amount of capacity/throughput and 2) an ordered list of messages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the data capacity of your Kinesis Stream?

A

The data capacity of your stream is a function of the number of shards that you specify for the stream. The total capacity of the stream is the sum of the capacities of its shards.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Kinesis Firehose?

A

Just as with Kinesis Streams, you have producers sending data to your Kinesis Firehose. But unlike Streams, you don’t have shards (this is automated for you). You also don’t have to worry about consumers going in and analyzing your data (you can analyze the data using Lambda in real time). Once the data has been analyzed you can send it directly to S3 (analyzing is optional). There’s not data retention window, when you send data to Kinesis Firehose, it’s either analyzed using Lambda, or sent directly to S3, Redshift, Elasticsearch Cluster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Kinesis Analytics?

A

Kinesis Analytics allows you to run SQL queries on the data as it exists in your Stream or Firehose and then you can use that SQL query to store that data in S3, Redshift or Elasticsearch cluster. So it’s a way of analyzing data inside Kinesis using SQl type querying language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can you define a Kinesis data stream?

A

It is a set of shards. A shard is a sequence of data records in a stream, each data record has a unique sequence number.

17
Q

What is Kinesis Stream consumer?

A

A consumer is an EC2 instance that is consuming data of your stream. On your consumer instances, you have the Kinesis Client Library running. This tracks the number of shards in your stream and discovers new shards when you reshard.

18
Q

When using Kinesis Stream, when should you scale out your consumers?

A

It’s fine if the number of shards exceeds the number of instances. Don’t think that just because you reshard, that you need to add more instances. Instead, CPU utilization is what should drive the quantity of consumer instances you have, NOT the number of shards in your Kinesis Stream. Best practice would be to use an auto scaling group, and base scaling decisions on CPU load of your consumers.

19
Q

What does the Kinesis Client Library do?

A

The Kinesis Client Library running on your consumers creates a record processor for each shard that is being consumed by your instance. If you increase the number of shards, the KCL will add more record processors on your consumers, and it will split them equally between the number of consumers that you have.

20
Q

What is Elastic Beanstalk?

A

Elastic Beanstalk is a service for deploying and scaling web applications developed in many popular languages: Java, .NET, PHP, Node.js, Python, Ruby, Go and Docker onto widely used application server platforms like Apache Tomcat, Nginx, Passenger, Puma and IIS.

Developers can focus on writing code and don’t need to worry about any of the underlying infrastructure needed to run the application.

21
Q

How do you use Elastic Beanstalk?

A

You upload the code and Elastic Beanstalk will handle deployment, capacity provisioning, load balancing, auto-scaling and application health.

You retain full control of the underlying AWS resources powering your application and you pay only for the AWS resources required to store and run your applications (e.g. EC2 instances and S3 buckets).

22
Q

What are the different Elastic Beanstalk deployment policies?

A

Elastic Beanstalk supports several options for processing deployments:

All at once
Rolling
Rolling with additional batch
Immutable

23
Q

What is an All at Once deployment policy?

A

All at Once deployment updates:

  • Deploys the new version to all instances simultaneously
  • All of your instances are out of service while the deployment takes place.
  • You will experience an outage while the deployment is taking place, i.e. it’s not ideal for mission-critical production systems.
  • If the update fails, you need to roll back the changes by re-deploying the original version to all your instances.
24
Q

What is a rolling deployment policy?

A

Rolling deployment updates:

  • Deploys the new version in batches
  • Each batch of instances is taken out of service while the deployment takes place.
  • Your environment capacity will be reduced by the number of instances in a batch while the deployment takes place.
  • Not ideal for performance sensitive systems.
  • If the update fails, you need to perform an additional rolling update to roll back the changes.
25
Q

What is a rolling with additional batch deployment policy?

A

Rolling with additional batch deployment updates:

  • Launches an additional batch of instances.
  • Deploys the new version in batches.
  • Maintains full capacity during the deployment process.
  • If the update fails, you need to perform an additional rolling update to roll back the changes.
26
Q

What is the immutable deployment policy?

A

Immutable deployment updates:

  • Deploys the new version to a fresh group of instances in their own new autoscaling group.
  • When the new instances pass their health checks, they are moved to your existing auto scaling group; and finally, the old instances are terminated.
  • Maintains full capacity during the deployment process
  • The impact of a failed update is far less, and the rollback process requires only terminating the new auto scaling group
  • Preferred option for mission critical production systems.
27
Q

How can you customize your Elastic Beanstalk environment?

A

You can customize your Elastic Beanstalk environment using configuration files. E.g., you can define packages to install, create Linux users and groups, run shell commands, specify services to enable or configure your load balancer, etc.

28
Q

What formats can Elastic Beanstalk configuration files be in and where must they be saved?

A

Elastic Beanstalk configuration files are written in YAML or JSON format. They can have any filename, but must have a .config extension and be saved inside a folder called .ebextensions

29
Q

Where is the .ebextensions folder?

A

The .ebextensions folder must be included in the top-level directory of your application source code bundle. This means that the configuration files can be placed under source control along with the rest of your application code.

30
Q

What are the two supported ways of intergating an RDS database with your Beanstalk environment?

A

You can:

1) launch the RDS instance from within the Elastic Beanstalk console, which means the RDS instance is created within your Elastic Beanstalk environment, this is a good option for test/dev deployments. However, this may not be ideal for production environments because it means the lifecycle of your database is tied to the lifecycle of your application environment. If you terminate the environment, the database instance will be terminated too.
2) launch the RDS instance outside of Elastic Beanstalk. This way, you are decoupling the RDS instance from your environment, which is preferred for production environments. This options gives you more flexibility, because it allows you to connect multiple environments to the same database, provides a wider choice of database types, and allows you to tear down your application environment without affecting the database instance.

31
Q

How do you allow EC2 instances in your Elastic Beanstalk environment to connect to an outside database?

A

There are two additional configuration steps required:

1) An additional security group must be added to your environment’s auto scaling group.
2) You’ll need to provide connection string configuration information to your application servers (endpoint, password)

32
Q

What is an Application Load Balancer?

A

Application Load Balancers are best suited for load balancing of HTTP and HTTPS traffic. They operate at layer 7 and are application-aware. They are intelligent, and you can create advanced request routing, sending specified requests to specific web servers.

33
Q

What is a Network Load Balancer?

A

Network Load Balancers are best suited for load balancing of TCP traffic where extreme performance is required. Operating at the connection level (layer 4), network load balancers are capable of handling millions of requests per second, while maintaining ultra-low latencies. Used for extreme performance!

34
Q

What is a Classic Load Balancer?

A

Classic Load Balancers are the legacy Elastic Load Balancers. You can load the HTTP/HTTPS applications and use layer-7 specific features, such as X-Forwarded-For and sticky sessions. You can also use strict layer 4 load balancing for applications that rely purely on the TCP protocol.

35
Q

If your classic load balancer returns a 504 error, what could the problem be?

A

If your application stops responding, the classic load balancer returns with a 504 error. This means that the application is having issues. This could be either at the web server layer or at the database layer.

36
Q

What’s the max execution time for Lambda?

A

900 seconds. 15 min.

37
Q

What’s the max memory for a Lambda function?

A

3 GB.