fromWhizlabs Flashcards

1
Q

Best services to implement serverless applications

A
  • API Gateway

- Lambda

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

What is the best option to encrypt global secondary indexes at minimum cost?

A

DynamoDB uses the CMK to generate and encrypt a unique data key for the table, known as Table Key. AWS owned are free while AWS managed are chargeable.

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

What is the best option to monitor the incoming API connections to an elastic load balancer?

A

Use AWS Cloudtrail with your ELB. It captures all API calls fot the ELB as events.

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

Correct format for stage variables to an HTTP url

A

Always:
${stageVariables.}
as
a full uri, a full domain, a subdomain, a path, a querystring

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

Which options are required to have Cognito Events push to Kinesis Streams?

A

You can use an existent or new Kinesis Stream and create an IAM Role which grants permissions to Cognito to publish to the stream

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

How can you improve the performance of an application designed to make scans against a DynamoDB?

A
  • Use parallel scans (if you cannot avoid them)

- Design to use queries

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

What is the best option If you want to move gradually from a version of APIs served by API gateway to newer versions?

A

Create another Stage in the API Gateway. An API stage is a logical reference to a lifecycle state of your API (for example dev, prod, v2, beta) API stages are identified by API ID and stage name.

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

How Cognito evalues multiple rules for each role which gets assigned to users?

A

Rules are evaluated in sequential order & IAM role for first matching rule is used, unless a CustomRoleArn is specified to override the order

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

Which is required to deploy a Lambda function using serverless deployment?

A
  • Place the function code at the root level of the working directory along with the yaml file
  • Use the cloudformation package command to package the deployment.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which is required to automate CodeDeploy to deploy an application requiring secure parameters stored in ssm?

A

Use aws ssm get-parameters with the –with-decryption option. This allows CodeDeploy to decrypt the password so it can be used in the application. Also use IAM roles to ensure the CodeDeploy service can access the KMS service.

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

How can be fixed if queries to a DynamoDB table are using attributes which are not the partition key?

A

Add a global secondary index to the table.
Change all the queries to use the partition key is not an ideal approach, because involves changing the code
Global tables won’t work either because they are used o disaster recovery scenarios.

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

How can you ensure that traffic is shifted slowly from one lambda function to another?

A

You can create or update an ALIAS with the –routing-config parameter.

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

To enable CORS on a resource using API Gateway, for GET method, which action is required for all types of response except 200 ?

A

You have to manually configure to return Access-Control-Allow-Origin header with ‘*’ or specific origins to fulfill pre-flight handshakes.
The OPTIONS method is added for 200 responses only

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

What can you use to save strings that exceed 400 kb on DynamoDB tables?

A

You can use S3. Exceeded items can be saved in buckets while an object identifier is saved in the table which points to an item in S3

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

For applications that requires high-performance reads, what can be used to have consistent data writes and and avoid unpredictable spikes in DynamoDB?

A

Use Write Through Cache using DAX. As a write-through cache, DAX allows you to issue writes directly, so they are immediately reflected in the item cache. Also manage cache invalidations for you.

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

How can you encrypt at rest a DynamoDB Table?

A

DynamoDB encryption is mandatory at the time of table creation itself and it is two types:

  • Default method: AWS owned CMK
  • AWS managed CMK
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the best option to diagnose performance between a backend that calls to a database?

A

Use the X-Ray service. It can be used to see the call trace and time spend on each layer.

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

If you need to configure common values on different nodes across a redis cluster using elasticache service, which component you would use?

A

Using Parameters groups, which ensures all the nodes in the cluster are configured in the same way.

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

What do you need to do if you have a program that needs to call different version of lambda functions for testing purposes?

A

Create one or more ALIAS. An alias is like a pointer to an specific lambda function version.

20
Q

At deploying using Elastic Beanstalk, what you must use to ensure the type of instance to be deployed?

A
  • The Launch Configuration

- The environment manifest file. A yaml formatted file in the root of your application source bundle.

21
Q

A consumer is an application that processes all data from a Kinesis Data Streams. How much throughput receives consumers using Enhanced Fan-out?

A

They receive records with throughput up to 2MB per second per shard with average message propagation delay of 70 ms for all consumers

22
Q

Whit default Sampling rule, how many request X-Ray can records?

A

One request per second, and five percent of any additional request per host.

23
Q

Which services you need if you want an application based on Microservices architecture pattern using Docker orchestrated containers?

A
  • ECS
  • EC2
  • ALB
24
Q

How you ensure better performance when surge an increase of GETs request to an S3?

A

Place a cloudfront distribution in front of your S3 bucket

25
Q

If you are getting the error ServiceException with your lambda function, what you must use?

A

Retry code with only “Errorsequals” string

26
Q

How many PUT and GET S3 requests you have per second per prefix?

A

3500 PUT and 5500 GET requests per prefix. So if you place 3 prefixes you get the triple performance on those requests.

27
Q

What you must to do if you have encryption at Rest in your Redshift cluster?

A

Just enable encryption for the cluster.

28
Q

What you need to do if you need encrypted traffic between viewer and cloudfront and in between the origin?

A
  • The viewer protocol policy need to be set to HTTPS only or redirect HTTP to HTTPS
  • Ensure that the origin protocol policy is set to HTTPS only
29
Q

How can you increase performance and reduce latency on an S3 bucket?

A

Use Cloudfront. You can use prefixes but it will only increase performance and will not reduce latency

30
Q

What you can do if you receive a message CodeStorageExceededException at uploading a lambda package?

A
  • Reduce the size of your code

- Raise a call with aws support to increase the limit on the storage

31
Q

Which services are required for Monitoring and Troubleshooting of Lambda Functions?

A
  • X-Ray

- Cloudwatch

32
Q

How you can schedule Lambda functions?

A

Using Cloudwatch events

33
Q

If you need to update an S3 notification configuration to a lambda function which version changed, what must be set?

A

When using Lambda Alias ARN in the notification configuration of S3, you only need to update the ALIAS ARN to point to the new lambda version. No changes are required in S3.

34
Q

How you ensure CodePipeline picks up code from S3 with all data encrypted at rest and the keys are managed by customer?

A
  • Configure KMS with CMKs and use it for S3 bucket encryption
  • Ensure that SSE is enabled on S3 bucket and data is encrypted at-rest on the CodeBuild environment using customer managed CMK
35
Q

How envelope encryption works?

A

Data is encrypted using plaintext data key and then data key is encrypted using plaintext master key

36
Q

If you want to analyze the information stored in Cognito what you must use?

A

Cognito streams. These can be pushed in real time into kinesis streams.

37
Q

Which two pair of services can be used to set Restful api service?

A
  • Lambda + API Gateway
  • EC2 + ELB
    Don’t think on S3 because is used to serve static content
38
Q

If you need on a messaging system that need to be processed in order as received

A

Use the SQS FIFO queues.

Note that fifo cannot be enabled on standard queues FIFO is a queue type

39
Q

During automatic CodeDeploy rollback, it will try to retrieve files that where part of the previous versions. If they were deleted or missing, what you need to do?

A

Manually required files to the instance or create a new application revision.

40
Q

Which are the best practices when it comes to make cost effective use of SQS queues?

A
  • Group the SQS Api operations in batches

- Use long Polling

41
Q

How do you specify a search criteria on a DynamoDB Table?

A

You have to specify a key condition expression in the query, this is a string that determines the items to be read from the table or index.
And also you must to specify a partition key name and value in the equality condition

42
Q

If you need to delegate to containers the encryption of data using the KMS service, which command you need to invoque?

A

GenerateDataKey

GenerateDataKey WithoutPlaintext

43
Q

If you need to change the configuration options on a running Elastic BeanStalk environment, what is required?

A

Change the configuration from the AWS Console

44
Q

How do you perform a Blue/Green deployment for a new version of an application deployed with Elastic BeanStalk?

A

Create a new environment in the application (clone or launch a new one) with the updated version and perform a swap

45
Q

You need that all the data to a bucket is encrypted at rest and also the keys are managed by you. What is required?

A
  • Client side encryption
  • Server side encryption with customer provided keys
  • Server side encryption with AWS KMS keys

Avoid any saying aws managed

46
Q

If you expect to have 400 read request on a S3 bucket what you must do to ensure the service will handle the workload?

A

Nothing. S3 can handle that. Remember S3 can support 5500 GET and 3500 PUT per second