Practice Tests Flashcards

1
Q

You need to setup a RESTful API service in AWS that would be services via the following url: https://democompany.com/customer. Which of the following of services can be used for development and hosting of the RESTful service?

A. AWS Lambda and AWS API Gateway
B. AWS Cloudfront and Elastic Load Balancer
C. AWS EC2 and AWS Elastic Load Balancer
D. AWS SQS and Cloudfront

A

AWS Lambda and AWS API Gateway,
and AWS EC2 and AWS Elastic Load Balancer.

Lambda can be used to host the code, and API gateway can be used to access the APIs which point to the Lambda.

You can also create your own API service, host it on an EC2 instance and then use the AWS Application Load Balancer to do path based routing.

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

Which of the following is the right sequence of hooks that get called in AWS CodeDeploy?

A. ApplicationStop -> BeforeInstall -> AfterInstall -> ApplicationStart
B. BeforeInstall -> AfterInstall -> ApplicationStop -> ApplicationStart
C. BeforeInstall -> AfterInstall -> ValidateService -> ApplicationStart
D. BeforeInstall -> ApplicationStop -> ValidateService -> ApplicationStart

A

A. ApplicationStop -> BeforeInstall -> AfterInstall -> ApplicationStart

The full sequence is 
ApplicationStop
DownloadBundle
BeforeInstall
Install
AfterInstall
ApplicationStart
ValidateService
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the sequence of hooks that gets called in AWS CodeDeploy without Classic load balancer in the deployment group?

A

The full sequence is

ApplicationStop
DownloadBundle
BeforeInstall
Install
AfterInstall
ApplicationStart
ValidateService
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the sequence of hooks that gets called in AWS CodeDeploy with a classic load balancer in the deployment group?

A

The full sequence is

BeforeBlockTraffic
BlockTraffic
AfterBlockTraffic
ApplicationStop
DownloadBundle
BeforeInstall
Install
AfterInstall
ApplicationStart
ValidateService
BeforeAllowTraffic
AllowTraffic
AfterAllowTraffic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What’s best practice for working with external dependencies in AWS Lambda?

A

Minimize your deployment package size to its runtime necessities. This will reduce the amount of time that it takes for your deployment package to be downloaded and unpacked ahead of invocation. For functions authored in Java or .NET Core, avoid uploading the entire AWS SDK library as part of your deployment package. Instead, selectively depend on the modules which pick up components of the SDK you need ( (e.g. DynamoDB, Amazon S3 SDK modules and Lambda core libraries).

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

You are developing a function that will be hosted in AWS Lambda. The function will be developed in .NET. There are a number of external libraries that are needed for the code to run. Which of the following is the best practice when it comes to working with external dependencies for AWS Lambda?

A. Make sure that the dependencies are put in the root folder
B. Selectively only include libraries that are required
C. Make sure the libraries are installed in the beginning of the function.
D. Place the entire SDK dependencies in S3.

A

B. Selectively only include libraries that are required.

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

Your team has a CodeCommit repository in your account. You need to give developers in another account access to your CodeCommit repository. Which of the following is the most effective way to grant access?

A. Create IAM users for each developer and provide access to the repository.
B. Create an IAM group, add the IAM users and then provide access to the repository.
C. Create a cross account role, give the role the privileges, provide the role ARN to the developers.
D. Enable public access to the repository

A

C. Create a cross account role, give the role the privileges, provide the role ARN to the developers.

When you provide access to a CodeCommit repository for IAM users and groups in another AWS account, this is often referred to as cross account access.

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

How do you create access to a CodeCommit repository for IAM users and groups in another AWS account?

A

There are three sets of actions that need to be taken:

  1. Actions by the administrator for the account that owns the repository.
  2. Actions by the administrator in the account that the IAM users/groups are.
  3. Actions for the repository users in the other account.
  • . Account A administrator must. 1) Create a policy in account A that grants access to the repository. 2) Create a role in account A that can be assumed by IAM users and groups in account B. 3) Attach the policy to the role.
  • Account B administrator must 1) Create an IAM group for repository access for accountB users. 2) Create a policy and add users to the IAM group.

– Repository users in account B must configure their local computers for repository access.

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

Your company is planning on using the Simple Storage service to host objects that will be accessed by users. There is speculation that there would be roughly 6,000 GET requests per second. Which of the following could be used to ensure optimal performance? Choose 2.

A. Use a CloudFront distribution in front of the S3 bucket.
B. Use sequential data-based naming for your prefixes.
C. Enable versioning for the objects.
D. Enable cross region replication for the bucket

A

A & B: Use a Cloudfront distribution in front of the S3 bucket. Use sequential date-based naming for your prefixes.

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

How many PUT/POST/DELETE and GET requests can an S3 bucket handle?

A

Your application can achieve at least 3,500 PU/POST/DELETE and 5,500 GET requests oer second per prefix in a bucket. There are no limits to the number of prefixes in a bucket. It is simple to increase your read or write performance exponentially. E.g., if you create 10 prefixes in an Amazon S3 bucket to parallelize reads, you could scale your read performance to 55,000 read requests per seconds.

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

You are working on an application which uses Amazon Cognito. Data in Amazon Cognito needs to be further analyzed using Amazon Redshift. You are planning to use Kinesis Streams for this purpose. Which of the following can be performed to have Amazon Cognito Events push events to Kinesis Streams to get analyzed data from Amazon Redshift?

A. Only use an existing Kinesis Stream and create an IAM role which grants Amazon Cognito permission to publish to this existing Stream.
B. Use an existing Kinesis Stream or create a new Kinesis Stream & create an IAM role which grants Amazon Cognito permission to publich to Stream.
C. Create a new kinesis stream instead of using existing Kinesis stream and create an IAM user with permissions to Amazon Cognito to publish to this new stream.
D. Create a new Kinesis stream and enable an Amazon Cognito Streams which will automatically start putting events in the selected stream.

A

B. Use an existing Kinesis Stream or create a new Kinesis Stream and create an IAM role which grants Amazon Cognito permission to publish to the stream.

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

What is Amazon Cognito Streams and how can it be used?

A

Cognito Streams gives developers control and insight into their data stored in Amazon Cognito. Developers can configure a Kinesis Stream to receive events as data is updated and synchronized. Amazon Cognito can push each dataset change to a Kinesis stream you own in real time. Using Cognito Streams, you can move all of our Sync data to Kinesis, which can then be streamed to a data warehouse tool such as Amazon Redshift for further analysis.

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

A DynamoDB table has a read throughput capacity of 5 RCU. Which of the following read configuration will provide us the maximum read throughput?

A. Read capacity set to 5 for 4KB reads of data at strong consistency.
B. Read capacity set to 5 for 4KB reads of data at eventual consistency.
C. Read capacity set to 15 for 1KB reads of data at strong consistency.
D. Read capacity set to 5 for 1KB reads of data at eventual consistency.

A

B. Read capacity set to 5 for 4KB reads of data at eventual consistency.

This is how you would calculate each option.
A. Read capacity (5) * amount of data (4) = 20KB/s
B. Read capacity (5) * amount of data (4) * 2 = 40 KB/s
C. Read capacity (15) * amount of data (1) = 15 KB/s
D. Read capacity (5) * amount of data (1) * 2 = 10 KB/s

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

Your team is developing a solution that will make use of DynamoDB tables. Due to the nature of the application, the data is needed across a couple of regions across the world. Which of the following would help reduce the latency of requests to DynamoDB from different regions?

A. Enable multi-az for the dynamoDB table
B. Enable global tables for DynamoDB
C. Enable indexes for the table
D. Increase the read and write throughput for the table

A

B. Enable global tables for DynamoDB

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

What are DynamoDB global tables?

A

DynamoDB global tables provide a fully managed solution for deploying a multi-region, multi-master database, without having to build and maintain your own replication solution. When you create a global tables, you specify the AWS regions where you want the table to be available. DynamoDB performs all of the necessary tasks to create identical tables in these regions, and propagate ongoing data changes to all of them.

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

You are using Amazon Cognito identity pools to assign authenticated SAML users a temporary access for downloading data from Amazon S3 buckets. For this you have created multiple rules for each role which gets assigned to users. Which of the following criteria is matched for evaluating these rules?

A. Rules are evaluated in sequential order and rule with lower value is preferred.
B. Rules are evaluated in sequential oerder and IAM role for first matching rule is used, unless a standard attribute is specified to override the order.
C. Rules are evaluated in sequential order and rule with higher value is preferred.
D. Rules are evaluated in sequential order & IAM role for first matching rule is used, unless a “CustomRoleArn” is specified to override the order.

A

D. Rules are evaluated in sequential order and IAM role for first matching role 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
17
Q

What’s the difference between Cognito User Pools and Identity Pools?

A

User pools are for authentication (identity verification). With a user pool, your app users can sign in through the user pool or federate through a third-party identity provider (IdP). Identity pools are for authorization (access control). You can use identity pools to create unique identities for users and give them access to other AWS services.

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

When should you use Cognito user pools?

A

Use a user pool when you need to:

  • Design sign-up and sign-in webpages for your app.
  • Access and manage user data.
  • Track user device, location and IP address, and adapt to sign-in requests of different risk levels.
  • Use a custom authentication flow for your app.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

When should you use Cognito identity pools?

A

Use an identity pool when you need to:

  • Give your users access to AWS resources, such as an S3 bucket or DynamoDB table.
  • Generate temporary AWS credentials for unauthenticated users.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

You are developing a common Lambda function that will be used across several development environments such as dev, q, staging, etc. The Lambda function needs to interact with each of these development environments. What is the best way to develop the Labda function?

A. Create a Lambda function for each environment so that each function can point to its respective environment.
B. Create one Lambda function and use environment variables for each environment to interact.
C. Create one Lambda function and create several versions for each environment.
D. Create one Lambda function and create several ALIAS for each environment.

A

B. Create one Lambda function and use environment variables for each environment to interact.

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

What are environment variables in Lambda and how are they used?

A

Environment variables for Lambda functions enable you to dynamically pass settings to your function code and libraries, without making changes to your code. Environment variable are key-value pairs that you create and modify as part of your function configuration. Lambda then makes these key value pairs available to your Lambda function code using standard APIs supported by the language, like process.env for Node.js functions.

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

You just developed code in AWS Lambda that makes use of recursive functions. After several invocations, you are beginning to see throttling errors in the metrics. Which of the following should be done to resolve this issue?

A. Place the recursive function in a separate package.
B. Use versioning for the recursive function.
C. Avoid using recursive code altogether.
D. Use the API gateway to call the recursive code.

A

C. Avoid using recursive code altogether.

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

Why should you avoid using recursive code in your Lambda function?

A

Using recursive code in your Lambda function, wherein the function automatically calls itself until some arbitrary criteria is met, could lead to unintended volume of function invocation and escalated costs.

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

When calling an API operation on an EC2 instance, the following error message was returned:

A client error (UnathorizedOperation) occurred when calling the RunInstances operation: You are not authorized to perform this operation. Encorded authorization failure message: alesjfliaseuroiaewjfkjsdfkSKHSHFKJSDHFKLSRT43857897JDFKJSDNFJDSNFKSDJFSD89ER8

Which of the following can be used to get a human-readable error message?

A. Use the command aws sts decode-authorization-message
B. Use the command aws get authorization-message
C. Use the IAM policy simulator.
D. Use the comman aws set authorization-message

A

A. Use the comman aws sts decode-authorization-message

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

You are planning on deploying an application to the worker role in Elastic Beanstalk. Moreover, this worker application is going to run the periodic tasks. Which of the following is a must have as part of the deployment?

A. An appspec.yaml file
B. A cron.yaml file
C. A cron.config file
D. An appspec.json file

A

When you use Elastic Beanstalk to deploy a new application or application version, you’ll need to upload a source bundle that meets the following criteria (consist of a single zip file or WAR file (you can have multiple WAR files in one zip file), not exceed 512 MB, not include a parent folder or top-level directory (subdirectories are fine)).
If you want to deploy a worker application that process periodic background tasks, your application source bundle must also include a cron.yaml file.

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

You have developed a web based application which makes calls to a backend API. Which of the following heads are required by web browsers to be set up in each API method which has CORS enabled?

A. Access-Control-Allow-Headers
B. Access-Control-Allow-CORS
C. Access-Control-Expose-Headers
D. Access-Control-Expose-Origin
E. Access-Control-Allow-Origin
A

A & E.

Access-Control-Allow-Headers and Access-Control-Allow-Origin.

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

Your application currently points to several Lambda functions in AWS. A change is being made to one of the Lambda functions. You need to ensure that application traffic is shifted slowly from one Lambda function to the other. Which of the following steps would you carry out?

A. Create an ALIAS with the -routing-config parameter.
B. Update the ALIAS with the -routing-config parameter.
C. Create a version with the -routing-config parameter.
D. Update the version with the -routing-config parameter.
E. Update the function with -config parameter

A

A & B.
Create an ALIAS with the -routing-config parameter.
Update the ALIAS with the -routing-config parameter.

By default, an alias points to a single Lambda function version. When the alias is updated to point to a different function version, incoming request traffic in turn instantly points to the updated version. This exposes that alias to any potential instabilities introduced by the version. To minimize this impact, you can implement the routing-config parameter of the Lambda alias that allows you to point to two different versions of the Lambda function and dictate what percentage of incoming traffic is sent to each version.

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

You are developing an application that would be used to upload images from users. You need to effectively store the images and also the name of the user who uploaded the image. How would you accomplish this?

A. Store the images in DynamoDB
B. Store the images in S3
C. Store the name of the user in S3
D. Store the name of the user in DynamoDB

A

A & D. Store the images in S3 and the name of the user in DynamoDB.

29
Q

Which section of the AWS Serverless Application Model template would you use to describe the configuration of a Lambda function and an API Gateway endpoint, if you were deploying your application using AWS SAM?

A. Transform
B. Templates
C. Sam
D. Functions

A

A Transform.

Use the Transform section to describe your Serverless functions when using the serverless application model. Under the Transform section, you define the resources you want to deploy.

30
Q

What are the differences between AWS SAM templates and AWS CloudFormation templates?

A

The primary differences between AWS SAM templates and AWS CloudFormation templates are the following:

Transform declaration: The declaration Transform: AWS::Serverless-2016-10-31 is required for AWS SAM templates. This declaration identifies an AWS Cloudformation template as an AWS SAM template.

Globals section. The Globals section is unique to AWS SAM. It defines properties that are common to all your serverless functions and APIs. All the AWS::Serverless::Function, AWS::Serverless::Api and AWS::Serverless::SimpleTable resources inherit the properties that are defined in the Globals section.

Resources section. In AWS SAM templates, the Resources section can contain a combination of AWS CloudFormation resources and AWS SAM resources.

31
Q

What are the different template sections of an AWS SAM template?

A
Transform (required)
Globals
Description
Metadata
Parameters
Mappings
Conditions
Resources (required)
Outputs
32
Q

What are the different template sections of a CloudFormation template?

A
AWSTemplateFormatVersion
Description
Metadata
Parameters
Mappings
Conditions
Transform
Resources (required)
Outputs
33
Q

Which DynamoDB feature allows you to set an expiry on table items so that they can automatically be deleted to reduce storage costs?

A

DynamoDB TTL. TTL for DynamoDB allows you to define when items in a table expire so that they can automatically be deleted from the database. TTL is provided at no extra cost as a way to reduce storage usage and reduce the cost of storing irrelevant data without using provisioned throughput. With TTL enabled on a table, you can set a timestamp for deletion on a per-item basis, allowing you to limit storage usage to only those records that are relevant.

34
Q

How do you upgrade an application that was deployed using Elastic Beanstalk?

A

You upload a zip file containing the new version of your code using the “Upload and deploy” button in the Elastic Beanstalk console.

When you use the Elastic Beanstalk console to deploy a new application version, you’ll need to upload a source bundle. Your source must consist of a single zip file or WAR file which does not exceed 512 MB. By using Docker with Elastic Beanstalk, you have an infrastructure that automatically handles the details of capacity provisioning, load balancing, scaling and application health monitoring.

35
Q

When you use Elastic Beanstalk to deploy a new application or an application version, what requirements does your source bundle need to meet?

A

It must consist of a single zip file or WAR file (you can include multiple WAR files inside your ZIP file). It cannot exceed 512 MB. It cannot include a parent folder or top-level directory (subdirectories are fine). If you want to deploy a worker application that processes periodic background tasks, your application source bundle must also include a cron.yaml file.

36
Q

You’re deploying an application using Elastic Beanstalk.. What is a reason you’d need to include a cron.yaml file in your application source bundle?

A

You will need to include a cron.yaml file in your application source bundle if you want to deploy a worker application that processes periodic background tasks.

37
Q

What are microservices?

A

Microservices are an architectural and organizational approach to software development where software is composed of small independent services that communicate over well-defined APIs. These services are owned by small, self-contained teams. Microservices architectures make applications easier to scale and faster to develop, enabling innovation and accelerating time-to-market for new features.

38
Q

What are SQS delay queues?

A

Delay queues let you postpone the delivery of new messages to a queue for a number of seconds. If you create a delay queue, any messages that you send to the queue remain invisible to consumers for the duration of the delay period.

39
Q

How can you manage large SQS messages?

A

You can use Amazon S2 and the AMazon SQS Extended Client Library for Java to manage SQS messages. This is especially useful for storing and consuming messages p to 2 GB in size.

40
Q

Can an EBS back instance be stopped and restarted?

A

Yes, an EBS-back instance can be stopped and restarted without losing the data on the volume. The instance store is ideal for temporary storage, because the data stored in instance store volumes is not persistent through instance stops, terminations or hardware failures.

41
Q

What are sticky sessions?

A

When you’re using sticky sessions, it means that requests which are part of the same session get routed to the same target. This may cause the host to become throttled. You can avoid this if you store session state in an ElastiCache cluster. ElastiCache can be accessed by multiple servers, allowing the load to be distributed more evenly.

42
Q

How can you configure AWS WAF logs to get detailed information about traffic that is analyzed by the we ACLs?

A

In order to enable and configure AWS WAF logs, a Kinesis Data Firehose is required for delivery of the logs to the destination.

43
Q

What is Web ACL?

A

Web ACL stands for Web Access Control List. A web access control list gives you fine-grained control over the web requests that your Amazon CloudFront distribution, API Gateway or Application Load Balancer responds to. You can use criteria like the following to allow or block requests:

IP address origin of the request
Country of origin of the request
String match or regex match in a part of the request
Size of a particular part of the request
Detection of malicious SQL code or scripting

You can block of count web requests that not only meet the specified conditions, but also exceed a specified number of requests in any 5-minute period.

44
Q

What information is included in the WAF logs about traffic that is analyzed by your web ACLs?

A

Information that is contained in the logs include the time that AWS WAF received the request from your AWS resource, detailed information about the request, and the action for the rule that each request matched.

45
Q

How do you enable logging of your Web ACL traffic information?

A

To get started, you set up an Amazon Kinesis Data Firehose. As part of that process, you choose a destination for storing your logs. Next, you choose the web ACL that you want to enable logging for. After you enable logging, AWS WAF delivers logs through the firehose to your storage destination.

46
Q

What are the three possible CloudWatch alarm states?

A

OK, INSUFFICIENT_DATA and ALARM.

OK - The metric or expression is within the defined threshold.
ALARM - The metric or expression is outside of the defined threshold.
INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.

47
Q

What’s the 504 error code?

A

Gateway Timeout

48
Q

You are working on an application which shares video content to subscribed users. This morning you have received a number of complaints that users are unable to access your content and they are seeing an HTTP 504 status code. What is a possible explanation?

A

There is a server side error within your AWS infrastructure.

An HTTP 504 status code is a Gateway Timeout, which indicates that when CloudFront forwarded a request to the origin, because the requested object was not in the edge cache, one of the following happened: The origin returned an HTTP 504 status code to CloudFront; or, the origin didn’t respond before the request expired. This is a server-side issue, i.e. a problem or misconfiguration in your AWS infrastructure. Remember that any 5xx error indicates a server-side error, and a 4xx error indicates a client-side error.

49
Q

What is the default visibility timeout for a message in an SQS queue? What’s the max?

A

Default is 30 seconds. Max is 12 hours.

50
Q

What does visibility timeout mean, as it pertains to SQS queues?

A

When a consumer receives and processes a message from a queue, the message remains in the queue (SQS doesn’t automatically delete the messages). To prevent other consumers from processing the message again, SQS sets a visibility timeout, a period of time during which SQS prevents other consumers from receiving and processing the message.

51
Q

Your application is running on EC2 and on Linux virtual machines in your own data center. You would like to configure your application to send data to X-ray for troubleshooting and performance analysis. What do you need to do?

A

Install the X-Ray SDK and the X-Ray daemon, then instrument your application to send data to X-Ray.

You need the X-Ray SDK and the X-Ray daemon on your EC2 instances and on-premises systems, you then need to instrument your application to send the required data to X-Ray.

52
Q

You are working on a web application which needs somewhere to store user session state. Which of the following approaches is the best way to deal with user session state? Choose 2.

A. Use an ElastiCache cluster.
B. Store session state in memory
C. Store session state in RDS
D. Store session state locally on the EC2 instance.

A

A and C. Use an ElastiCache cluster, and store session state in RDS.

ElastiCache is the best option for storing session state as it is scalable, highly available and can beaccessed by multiple web servers. RDS is not optimal, but could be used for storing session state. Since you need to provide 2 answers, this is the only other viable answer.

53
Q

What is DynamoDB TTL?

A

TTL (Time To Live) for DynamoDB allows you to define when items in a table expire so that they can be automatically deleted from the database. TTL is provided at no extra cost as a way to reduce storage and reduce the cost of storing irrelevant data without using provisioned throughput. With TTL enabled on a table, you can set a timestamp for deletion on a per-item basis, allowing you to limit storage usage to only those records that are relevant.

54
Q

What is API caching used for?

A

You can enable API caching to cache your endpoint’s responses - this reduces the number of calls made to your endpoint and improves the latency of requests to your API.

55
Q

How does caching work in API Gateway?

A

When you enable caching for a stage, API Gateway caches the responses from your endpoint for a specified TTL period, in seconds. API Gateway then responds to the request by looking up the endpoint response from the cache instead of making a request to your endpoint. The default TTL value for API caching is 300 seconds. The max is 3600 seconds.

56
Q

Which of the following approaches can improve the performance of your Lambda function?

A. Package all dependencies with your deployment package.
B. Only include the libraries you need to minimize the size of your deployment package.
C. Establish your database connections from within the Lambda execution environment to enable connection reuse.
D. Store environment variables outside the function.

A

B & C. Only include the libraries you need to minimize the size of your deployment package. AND Establish your database connections from within the Lambda execution environment to enable connection reuse.

Establishing connections within the execution environment allows them to be reused next time the function is invoked, which saves time. Only including the libraries you need will minimize the time taken for Lambda to unpack the deployment package.

57
Q

What is the AWS Lambda execution context?

A

The execution context is a temporary runtime environment that initializes any external dependencies of your Lambda function code, such as database connections or HTTP endpoints. This means that subsequent invocations see better performance because there is no need to “cold-start” or initialize those dependencies.

58
Q

What happens when AWS Lambda executes your Lambda function?

A

When AWS Lambda executes your Lambda function, it provisions and manages the resources need to run your Lambda function. When you create a Lambda function, you specify configuration information, such as the amount of memory and maximum execution time that you want to allow for your Lambda function. When a Lambda function is invoked, AWS Lambda launches an execution context based on the configuration settings you provide.

59
Q

How do signed URLs work in CloudFront?

A
  1. In your CloudFront distribution, specify one or more trusted signers, which are the AWS accounts that you want to have permission to create the signed URLs.
  2. Develop your application to determine whether a user should have access to your content, i.e. when your user is entitled to a signed URL.
  3. A user requests a file for which you want to require signed URLs.
  4. Your application verifies that the user is entitled to access the file; they’ve signed in, they’ve paid for access, etc.
  5. Your application creates and returns a signed URL to the user.
  6. The signed URL allows the user to download or stream the content.
60
Q

What programming languages and web containers does Elastic Beanstalk provide platforms for?

A

Elastic Beanstalk provides platforms for the following programming languages: Java, PHP, Python, Ruby, Go, Node.js
Elastic Beanstalk provides platforms for the following web containers/application servers: Tomcat, Passenger, Puma

It also provides a platform for Docker containers.

61
Q

How does Elastic Beanstalk work?

A

Elastic Beanstalk provisions the resources needed to run your application, including one or more EC2 instances. The software stack running on the EC2 instance depends on the specific platform version you’ve selected for your environment.

62
Q

What’s in the E/B folder (Elastic Beanstalk)

A

E/B has configuration options for before, during and after environment creation. These files are loaded from configuration files in the .ebextensions folder at the root of the application source bundle.

63
Q

You are importing an existing API to API Gateway. Which format is supported for API definition files?

A

OpenAPI v2.0, OpenAPI v3.0 and Swagger. The Import API feature supports OpenAPI v2.0 and OpenAPI v3.0 definition files. Swagger is a common toolset that originally defined the OpenAPI v2.0 specification. AWS uses the name interchangeable with Open API v2.0

64
Q

Your Lambda function requires a few libraries that are not available as standard in the Lambda runtime environment. How can you make these available to your function?

A

You use a deployment package. A deployment package is a zip archive that contains your function code and dependencies. You need to create a deployment package if you use the Lambda API to manage functions, or if you need to include libraries and dependencies other than the AWS SDK. You can upload the package directly to Lambda, or you can use an S3 bucket, and then upload it to Lambda. If the deployment package is larger than 50 MB, you must use S3.

65
Q

What is ECS?

A

ECS stands for Elastic Container Service. It’s a service that manages running Docker containers on a group of your EC2 instances.

66
Q

What are the deployment options for CodeDeploy?

A

In-place and blue/green.

67
Q

What are the deployment options for Elastic Beanstalk?

A

All at once.
Rolling
Rolling with an additional batch
Immutable

68
Q

A developer needs to share an EBS volume with a second AWS account. What actions need to be performed to accomplish this task in the most optimal way?

A

Create an EBS volume snapshot. Modify EBS snapshot permissions and add the second AWS account ID to share the snapshot. In the second AWS account, create an EBS volume from the snapshot.

It is not possible to directly share an EBS volume with another account. In order to accomplish the required task, it is required to create an EBS volume snapshot and grant permissions to that snapshot to the second AWS account.

69
Q

In the AWS Shared Responsibility Model, what are some responsibilities of the customer?

A

Security and Compliance is a shared responsibility between AWS and the customer. The customer assumes responsibility and management of the guest operating system (including updates and security patches), other associated application software as well as the configuration of the AWS-provided security group firewall. Customers are responsible for managing their data (including encryption options), classifying their assets, and using IAM tools to apply the appropriate permissions.

AWS is responsible for protecting the infrastructure that runs all of the services offered in the AWS cloud. This infrastructure is composed of the hardware, software, networking and facilities that run AWS cloud services.