Troubleshooting and Optimisation Flashcards

(43 cards)

1
Q

Amazon X-ray annotations

A
  • indexed key-value pairs that are used to filter traces
  • designed to be used for querying X-Ray traces, enabling you to find traces that match specific conditions
  • apply annotations to include important attributes such as user IDs, order IDs, account IDs, or any other attribute that you might want to quickly filter and search for during trace analysis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Amazon X-ray metadata

A
  • used to store additional information that is not indexed and is more contextual than annotations
  • key-value pairs that provide supplemental data to your traces and segments for more detailed analysis and debugging
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Amazon Athena

A

interactive query service provided by Amazon Web Services (AWS) that allows you to analyze data directly in Amazon S3 using standard SQL

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

X-ray BatchGetTraces API

A

this API retrieves a list of traces specified by ID

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

Sampling Rules in the AWS X-Ray Console

A

sampling rules tell the X-Ray SDK how many requests to record for a set of criteria

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

X-ray GetTraceSummaries API

A

GetTraceSummaries operation retrieves IDs and annotations for traces available for a specified time frame using an optional filter

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

API Gateway Private Integrations

A
  • makes it easier to expose your HTTP/HTTPS resources behind an Amazon VPC for access by clients outside of the VPC
  • you can enable access to HTTP/HTTPS resources within a VPC without detailed knowledge of private network configurations or technology-specific appliances
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

AWS WAF

A
  • web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to an Amazon API Gateway API, Amazon CloudFront or an Application Load Balancer
  • lets you control requests to your content (eg. allow all except x, block all except x)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Amazon GuardDuty

A

a threat detection service that continuously monitors malicious activity and unauthorized behavior to protect your AWS accounts and workloads

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

AWS Firewall Manager

A

simplifies your AWS WAF and AWS Shield Advanced administration and maintenance tasks across multiple accounts and resources

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

Network Access Control List

A

optional layer of security for your VPC that acts as a firewall for controlling traffic in and out of one or more subnets

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

CloudWatch vs Enhanced Monitoring Metrics for RDS

A
  • CloudWatch gathers metrics about CPU utilization from the hypervisor for a DB instance, and Enhanced Monitoring gathers its metrics from an agent on the instance
  • you might find differences between the measurements, because the hypervisor layer performs a small amount of work
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

VPC Flow Logs

A
  • enables you to capture information about the IP traffic going to and from network interfaces in your VPC
  • Flow log data can be published to Amazon CloudWatch Logs and Amazon S3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

CloudTrail

A
  • enables you to track and log all actions taken within your AWS environment
  • includes API calls made through the AWS Management Console, AWS SDKs, command-line tools, and other AWS services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

AWS Inspector

A
  • automated security assessment service that helps improve the security and compliance of applications deployed on AWS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Amazon CloudWatch

A
  • enables you to collect both system metrics and log files from AWS services
  • take note that CloudWatch does not monitor the memory, swap, and disk space utilization of your instances
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

CloudWatch detailed monitoring for EC2

A
  • sends metric data for your instance to CloudWatch in 1-minute periods instead of 5 minute periods
  • does not include the memory utilisation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which environment variables are used by AWS Lambda to facilitate communication with X-Ray?

A
  • AWS_XRAY_CONTEXT_MISSING (x-ray sdk usis this to determine behaviour in the event your function tries to record X-ray data but tracing header is not available, LOG_ERROR by default)
  • _X_AMZN_TRACE_ID (tracing header = contains sampling decision, trace ID, parent segment ID)
19
Q

cron.yaml

A

You can define periodic tasks in a file named cron.yaml in your source bundle to add jobs to your worker environment’s queue automatically at a regular intervals

20
Q

appspec.yml

A
  • defines how the CodeDeploy deployment should proceed
  • it specifies the deployment process, including which files should be deployed, where they should be deployed, and any scripts or hooks that should be executed during the deployment
21
Q

env.yaml

A

this is primarily used to configure the environment name, solution stack, and environment links to use when creating your environment in Elastic Beanstalk.

22
Q

Dockerrun.aws.json

A

primarily used in multi-container Docker environments that are hosted in Elastic Beanstalk

23
Q

X-ray segment document

A
  • JSON formatted string that contains information about the work that your application does in service of a request
  • your application can record data about the work that it does itself in segments or work that uses downstream services and resources in subsegments
24
Q

What is an X-ray segment?

A
  • The compute resources running your application logic send data about their work as segments
  • A segment provides the resource’s name, details about the request, and details about the work done
25
CloudWatch namespace
- container for CloudWatch metrics - Metrics in different namespaces are isolated from each other so that metrics from different applications are not mistakenly aggregated into the same statistics
26
X-Forwarded-For header
If a load balancer or other intermediary forwards a request to your application, X-Ray takes the client IP from the X-Forwarded-For header in the request instead of from the source IP in the IP packet
27
API Gateway 504 errors with Lambda function
Maximum integration timeout for API gateway is 29 seconds, so if Lambda does not respond in this time API gateway will return 504 gateway timeout
28
The AWS X-Ray daemon is a software application that listens for traffic on ...
UDP port 2000, gathers raw segment data, and relays it to AWS X-ray API
29
How to enable X-ray on EC2 instances?
Use a user data script to run the daemon automatically
30
How to enable X-ray on ECS cluster?
Create a Docker image to run the X-ray daemon
31
How to enable X-ray on Elastic Beanstalk environment?
Enable the X-Ray daemon by including the xray-daemon.config configuration file in the .ebextensions directory of your source code
32
What is CloudFront Count metric?
Total number of API requests in a given period
33
What is CloudFront Latency metric vs IntegrationLatency metric?
Latency measures responsiveness of API calls whereas IntegrationLatency measures responsiveness of the backend
34
What is CloudFront CacheMissCount and CacheHitCount?
CacheMissCount gets the number of requests served from the backend in a given period when API caching is enabled, CacheHitCount fetches the number of requests served from the API cache in a given period
35
Which environment variables are used by AWS Lambda to facilitate communication with X-Ray?
_X_AMZN_TRACE_ID: contains trace ID, segment ID, sampling decision AWS_XRAY_CONTEXT_MISSING: X-Ray SDK uses this variable to determine its behavior in the event that your function tries to record X-Ray data, but a tracing header is not available AWS_XRAY_DAEMON_ADDRESS: exposes the X-Ray daemon’s address in the following format: IP_ADDRESS:PORT
36
What is Lambda@Edge for?
- lets you run code at AWS edge locations - speeds up distribution of your website's content to users globally - can tailor content dynamically based on user attributes
37
What does projection expression do in dynamoDB?
Allows you to return only some item attributes when querying the table eg. if you only want course_title, price
38
What is expression attributes names in dynamoDB?
Expression Attribute Names are like nicknames you give to your attribute names. They help avoid problems when your attribute names clash with reserved words or contain special characters that DynamoDB doesn't like. Eg. can't use name, so specify #N instead (always starts with #)
39
What are Lambda ENIs?
ENIs allow your Lambda functions to access resources inside your VPC, such as databases, file systems, and other services that require VPC-level security (automatically configured by AWS when you configure a Lambda function to connect to VPC)
40
What is a NAT gateway?
service provided by AWS that allows instances within a private subnet in your Virtual Private Cloud (VPC) to securely connect to the internet or other AWS services, while preventing the internet from initiating connections to those instances
41
How would you refactor your application to use Scan operations in a way that minimises impact on request rate?
reduce the impact of the scan operation by setting a smaller page size as a Scan operation reads an entire page
42
How big can a segment document be?
64kb
43
What do you set namespace field to for X-ray subsegments?
set to 'aws' for AWS SDK calls and 'remote' for other downstream calls