Certified Developer Associate Flashcards

1
Q

What can be enabled in X-Ray to get filtered output?

A

Annotations -> key-value pairs indexed to use with filter expressions

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

In CodeBuild, how can we override a build command when code is not reachable?

A

Run the start build AWS CLI command with buildspecOverride property set to the new buildspec.yml file.

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

What is canary deployment type when deploying a new version of a lambda function?

A

Traffic is shifted in two increments:
- 1st: a given percentage of traffic is shifted to new version of lamnda
- 2nd: remaining traffic is shifted after a given interval
Ex: Canary10Percent30Minutes means that first 10% of traffic is shifted to new version, then remaining traffic is shifted after 30 mn.

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

What is immutable deployment?

A

Immutable deployments perform an immutable update to launch a full set of new instances running the new version of the application in a separate Auto Scaling group, alongside the instances running the old version.

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

What is rolling deployment?

A

Rolling deployment deploys the new version in batches of instances. Each batch is taken out of service during the deployment phase, new version is deployed on them, and then instances are reattached.

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

What is rolling with additional batch deployment?

A

Using Rolling with additional batch deployment, a new batch of the Amazon EC2 instance is launched before taking a batch of instances out of service for deploying a new version. Once all Amazon EC2 instances are upgraded to a new version of the application, this additional batch of Amazon EC2 instances is terminated.

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

What must be defined in CloudWatch to set an alarm?

A
  • Period (in second): length of time to evaluate the metric to create each individual data point.
  • Evaluation Period (in unit): number of most recent data points to evaluate when determining alarm state.
  • Datapoints to Alarm (in unit): number of data points within the evaluation period that must be breached to cause the alarm to go to the ALARM state.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to configure server-side encryption for artifacts stored in S3 for CodePipeline

A
  • CodePipeline creates an S3 artifact bucket and default AWS managed key when you create a pipeline using the Create Pipeline wizard. The AWS managed key is encrypted along with object data and managed by AWS.
  • You can create and manage your own customer managed key.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In API Gateway, how can we control the behavior of front-end interactions and back-end interactions?

A

For front-end : modify configuration of Method request & response
For back-end : modify configuration of Integration resquest & response (data mappings between a method and its corresponding integration)

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

What is the encryption method of AWS Envelope Encryption?

A

First, the data is encrypted using a plaintext Data Key. The Data Key is then further encrypted using a plaintext Master Key. This plaintext Master key is securely stored in AWS KMS and known as Customer Master Keys.

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

What do AWS Cognito User pools provide?

A

User pools provide:
- Sign-up and sign-in services.
- A built-in, customizable web UI to sign in users.
- Social sign-in with Facebook, Google, and log in with Amazon, as well as sign-in with SAML identity providers from your user pool.
- User directory management and user profiles.
- Security features such as multi-factor authentication (MFA), checks for compromised credentials, account takeover protection, and phone and email verification.
- Customized workflows and user migration through AWS Lambda triggers.

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

How is managed encryption at rest in DynamoDB?

A

All user data stored in Amazon DynamoDB is fully encrypted at rest. This includes tables, primary key, local and global secondary indexes, streams, global tables, backups, and DynamoDB Accelerator (DAX) clusters. When creating a new table, we can choose one of the following AWS KMS keys:
- AWS owned key (owned by DynamoDB)
- AWS managed key (managed by AWS KMS)
- Customer managed key (managed by AWS KMS-CMS)

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

List the deployment methods in Elastic Beanstalk

A
  • All at once (fastest)
  • Rolling
  • Rolling with additional batch (preserve full capacity)
  • Immutable
  • Blue/Green
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the best way to pre-process streaming data?

A

Use Kinesis with AWS Lambda functions to pre-process the data. It enables to query the data in stream or build entire streaming applications using SQL. Customers use Kinesis Analytics for things like filtering, aggregation, and anomaly detection.

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

How can we encrypt application data in EBS resources associated to EC2 instances?

A

Ensure that Encryption is enabled during volume creation time. Data key is generated by AWS KMS, and CMK is not required.

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

What is Lamda@Edge?

A

Lambda@Edge is an extension of AWS Lambda, a compute service that lets you execute functions that customize the content that CloudFront delivers. You can author functions in one region and execute them in AWS locations globally closer to the viewer, without provisioning or managing servers.

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

How to specify in AWS CodeDeploy the version of Lambda to deploy?

A

Specify the version to be deployed in the AppSpec file.

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

How can we monitor calls to DynamoDB for latency detection?

A

Enable X-Ray tracing on Lambda, use the AWS SDK inside Lambda code to monitor DynamoDB API calls in X-Ray, send this information to CloudWatch, and create a metric that triggers an SNS alert if the response times get too high.

It is not possible to enable X-Ray in DynamoDB.

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

What is the field in CloudFormation template which specify the method called by Lambda to execute the function?

A

Handler. This is the name of the method within a code that Lambda calls to execute the function.

20
Q

How can we monitor the incoming client connections to the Elastic Load Balancer?

A

Enable access logs on the load balancer.

21
Q

In a S3 bucket A hosting a static website, how can we allow this website to access data hosted by another bucket B?

A

Enable CORS on the bucket B.
Browsers will block javascript from allowing requests made to another bucket (or any other website), unless CORS check (or preflight check) is positive.

22
Q

In API Gateway, how can we use stage variables in URI and sub-domain?

A

http://example.com/${stageVariables.<variable_name>}/prod
http://${stageVariables.<variable_name>}.example.com/dev/operation</variable_name></variable_name>

23
Q

What is Chef and Puppet, and which AWS service integrates this platform?

A

Chef and Puppet are automation platforms that allow you to use code to automate the configurations of your servers.
OpsWorks lets you use Chef and Puppet to automate how servers are configured, deployed, and managed across your Amazon EC2 instances or on-premises compute environments.

24
Q

What must be done to ensure that a Lambda function can access resources in a VPC?

A

Ensure that
- the Subnet IDs
- the Security Group IDs
are configured in the Lambda function.

25
Q

What is Packer?

A

Packer is an open-source tool for creating machine images for many platforms, including AMIs for Amazon EC2.
It is used for creating its own Elastic Beanstalk platform.

26
Q

In DynamoDB, considering that items have a size of 15.5 KB, and that an application write 10 items every seconds, what would be the required provisioned write throughput for best performance?

A

160.
Items must be divided in blocks of 1 KB, so each item requires 16 blocks. For 10 items, we must have a write throughput of 16 x 10.

27
Q

What is the default timeout of a Lambda function?

A

3 seconds

28
Q

What is Amazon Cognito Events?

A

A service that allows dev to execute AWS Lambda function in response to important events in Amazon Cognito. Amazon Cognito raises the Sync Trigger event when a dataset is synchronized. Dev can use the Sync Trigger event to take an action when a user updates data.

29
Q

Amazon Cognito Events: what is the cause of LambdaSocketTimeoutException?

A

When Lambda function doesn’t respond within 5 seconds. Timeout value cannot be increased.

30
Q

Amazon Cognito Events: what is the cause of LambdaThrottledException?

A

When Lambda is throttled. The sync operation must be tried again to update the record.

31
Q

In CodeDeploy, what is the run order of hooks for a ECS deployment?

A

BeforeInstall > Install > AllowTestTraffic > AfterAllowTestTraffic > BeforeAllowTraffic > AllowTraffic > AfterAllowTraffic

32
Q

In CodeDeploy, what is the run order of hooks for a Lambda deployment?

A

BeforeAllowTraffic > AllowTraffic > AfterAllowTraffic

33
Q

In CodeDeploy, what is the run order of hooks for a EC2/On-Premises deployment WITHOUT Classic load balancer?

A

ApplicationStop > DownloadBundle > BeforeInstall > Install > AfterInstall > ApplicationStart > ValidateService

34
Q

In CodeDeploy, what is the run order of hooks for a EC2/On-Premises deployment WITH Classic load balancer?

A

BeforeBlockTraffic > BlockTraffic > AfterBlockTraffic > Application Stop > DownloadBundle > BeforeInstall > Install > AfterInstall > ApplicationStart > ValidateService > BeforeAllowTraffic > AllowTraffic > AfterAllowTraffic

35
Q

What are the options -r, -t, -b, -o for xray-daemon command?

A

-r : assume an IAM role while saving results in different accounts.
-t : bind a different TCP port for the X-Ray service
-b : bind a different UDP port for the X-Ray service
-o : skip checking Amazon EC2 instance metadata (to run daemon locally)

36
Q

What is Kinesis Data Streams?

A

Kinesis Data Streams allows to collect and process large streams of data records in real time. It’s used for rapid and continuous data intake and aggregation. The type of data used can include IT infrastructure log data, application logs, social media, market data feeds, and web clickstream data.

37
Q

What is Kinesis Data Firehose?

A

Amazon Kinesis Data Firehose is a fully managed service for delivering real-time streaming data to destinations such as Amazon Simple Storage Service (Amazon S3), Amazon Redshift, Amazon OpenSearch Service, Splunk, and any custom HTTP endpoint or HTTP endpoints owned by supported third-party service providers, including Datadog, Dynatrace, LogicMonitor, MongoDB, New Relic, and Sumo Logic.

38
Q

What is the configuration file used in Beanstalk to deploy multiple Docker containers in one EC2 instance running ECS?

A

Dockerrun.aws.json version 2

39
Q

In S3, which request header must be provided to request server-side encryption, when using the object creation REST APIs?

A

x-amz-server-side-encryption

40
Q

Which service is used to request temporary security credentials? Which items are included in temporary credentials?

A

AWS Security Token Service (AWS STS).
STS API operations create a new session with temporary security credentials that include an access key pair and a session token. The access key pair consists of an access key ID and a secret key.

41
Q

In X-Ray, what is the segment document? Which fields are mandatory?

A

A segment document is a JSON formatted string that contains information about the work that your application does in service of a request.
At a minimum, a segment contains :
- name
- id
- start_time
- trace_id
- end_time
- in_progress

42
Q

In Elastic Beanstalk, how to set up a traffic-splitting deployment with configuration file?

A
  • Create file .ebextensions/traffic-splitting.config
  • Fill it with :
    option_settings:
    aws:elasticbeanstalk:command:
    DeploymentPolicy: TrafficSplitting
    aws:elasticbeanstalk:trafficsplitting:
    NewVersionPercent: “<percent>"
    EvaluationTime: "<health>"</health></percent>
43
Q

What should be implemented in order to allow an application running on EC2 instance to access AWS resources?

A

Use IAM roles :
- Create the role
- Define which accounts or AWS services can assume the role.
- Define which API actions and resources the application can use after assuming the role.
- Specify the role when you launch your instance, or attach the role to a running or stopped instance.
- Have the application retrieve a set of temporary credentials and use them.

44
Q

How to test a resource policy with IAM Policy simulator?

A

Include the resource & copy resource policy in the IAM policy simulator.
You cannot type or copy a resource-based policy into the simulator. To use a resource-based policy in the simulator, you must include the resource in the simulation. You must also select the check box to include that resource’s policy in the simulation.

45
Q

In Lambda, how can we configure the traffic weights between two function versions?

A

Use the create-alias and update-alias AWS CLI lambda commands. When creating or updating an alias pointing to version 1, the option –routing-config gives the ability to route a part of traffic to version 2.

46
Q

What is the combination of command to use for deploying a serverless application model?

A

“sam package” which returns a SAM template,
“sam deploy” for deploying this template.