AWS Dev Practice Flashcards

1
Q

What are the beanstalk deployment types?

A
All at once
Rolling
Rolling with additional batch
immutable (blue/green)
traffic splitting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

EC2 instances in an ASG have only basic monitoring enabled. Why?

A

The console was used to create the launch configuration

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

Kinesis data streams give a ‘ProvisionedThroughputException’ error. How do we fix it?

A

Configure data producer to retry w/ exponential backoff

Increase shards

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

Which db engines can use IAM db authentication?

A

RDS MySQL

RDS PostGreSQL

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

How do you retrieve only some DynamoDB items and not all?

A

use ProjectionExpression

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

What AWS service uses the appspec.yaml file?

A

Code Deploy

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

What does the ‘Transform’ section indicate in a CloudFormation template?

A

It is a SAM template

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

What type of RI can you use in addition to a savings plan?

A

Zonal RI’s

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

What service can NOT be used to authenticate w/ API gateway?

A

AWS STS

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

What DynamoDB write option should you use to ensure you don’t overwrite primary key values?

A

Conditional writes

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

What service gives temporary, limited-privilege credentials to AWS services using 3rd party idP’s?

A

Cognito Identity pools

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

What are Kinesis Firehose destinations?

A
S3
Redshift
Elasticsearch
Splunk
Custom HTTP Endpoint
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you make ‘all or nothing’ updates to DynamoDB?

A

use transactional read/write API’s

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

Can you move an EBS volume between AZ’s?

A

No

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

What is the limit of stored messages in SQS?

A

no limit - only ‘in flight’ messages have a limit (120K)

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

What credential type is NOT supported by IAM for CodeCommit?

A

IAM username and password

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

What are 2 services that can be used to deploy SSL certs?

A

IAM

Certificate Manager

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

What RI type allows you to change the instance family?

A

Convertible RI

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

JWT authorizer is used by what?

A

HTTP API

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

Can ECS or Lambda use in-place deployments with CodeBuild?

A

No, Blue-green only

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

What are DynamoDB streams?

A

Info about changes to items in a DynamoDB table

They can be used by other services to perform actions

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

Websocket API’s allow what?

A

Bi-directional communications

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

What service helps identify unused IAM roles & remove them without disrupting service?

A

Access Advisor

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

What are 2 ways to authenticate with Cognito User Pools?

A

To the user pool directly

Federated authentication using social identities to the user pool

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

What is the max message size for SQS?

A

256KB

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

What is the max data size of KMS?

A

4KB

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

What is application discovery service?

A

collects usage and config data about on-prem servers

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

What API types can use Cognito?

A

REST

Websocket

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

DynamoDB tables have high latency, how do you fix it?

A

Use Global tables

Use eventually consistent reads

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

What API call will extend the length of time an SQS job will process?

A

ChangeMessageVisibility

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

If you have a web app on EC2 with a DynamoDB table, how can you make an API call from instances if no SDK exists?

A

Sign requests with access keys and Sig V4
Make HTTP POST request to DynamoDB API
Include the JSON document in the request body

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

What is SWF?

A

Task oriented API’s

Ensures task assigned only once

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

What is SQS?

A

Message based API’s

Messages can be delivered more than once

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

EC2 auto scaling works with what kind of load balancer?

A

ALB

NLB

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

What is required for code to be executed in a Lambda function?

A

Lambda function handler

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

Your ALB is down or misconfigured, what error code doe you get?

A

503 error

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

What key requires the root user?

A

CloudFront key pair

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

How do you limit access to an API to users in a Cognito User Pool?

A

Assign an authorizer.

Assign the authorizer to the API

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

What feature of a load balancer will let you analyze incoming requests for latency & client IP patterns?

A

ALB access logs

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

How do you reduce load on web servers with high CPU?

A

Put the certificate on the ALB

Put a listener on the ALB with SSL termination

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

What are the SAM references?

A
API
Application
Function
HTTPAPI
LayerVersion
SimpleTable
StateMachine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

If multiple apps write to the same DynamoDB table and you want to send changes to an API what do you do?

A

Send changes to Kinesis data streams

Use Lambda to process changes and call an HTTP API

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

What policy types limit permissions but don’t grant them?

A

Permissions boundary

AWS Organization SCP

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

What can you change with standard RI’s?

A

Instance size
Network types
AZ

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

How do you minimize impact of a full DynamoDB table scan?

A

parallel scans

limit parameter

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

What is an immutable deployment for Beanstalk?

A

Like blue-green. New servers spun up in a new ASG

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

What are 3 options allow users to have secure access to private files in S3?

A

CloudFront signed URL’s
CloudFront Signed cookies
CloudFront OAI

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

What do you do with a Lambda function who uses libraries that aren’t available at runtime?

A

zip up code and dependencies

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

To implement Lambda with Step Functions what do you setup?

A

define step function tasks

state machine

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

How do you migrate a Beanstalk environment from one account to another?

A
Save configuration
Export configuration
Make environment updates
Upload to S3
Create new app from saved config
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

How do you define an OS, programming language and tools needed when using CodeBuild?

A

specify a docker image in the buildspec.yml file

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

What does DynamoDB rate limit do?

A

Limits the throughput so you don’t use it all

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

What is the only resource based policy that IAM supports?

A

trust policy

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

How would you design an app that uses Lambda to process HTTP requests?

A

create an API

Configure proxy integration with Lambda

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

To encrypt data at rest in S3 while managing the keys, what do you do?

A

Upload the key when uploading to the object to S3

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

What are API mapping templates?

A

They map data in API’s so you can have multiple versions

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

What is Kinesis data streams?

A

data streaming service
not auto scaling
can replay data
needs to be configured

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

What is API call used to obtain temp credentials when using Web Identity Federation?

A

AssumeRoelWithWebIdentity

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

PTR record vs A Record

A

IP to Domain

Domain to IP

60
Q

What is Kinesis Firehose?

A

Data transfer service
auto scales
cannot replay
fully managed

61
Q

What is DynamoDB encryption client?

A

client side encryption at rest & in transit

62
Q

HTTP 4XX vs 5XX errors

A

4XX is client side

5XX is server side

63
Q

What is !FindInMap?

A

Think case/switch statement

64
Q

What is the structure of !FindInMap?

A

[MapName, TopLevelKey, SecondLevelKey]

65
Q

4 tasks of CloudWatch Logs?

A

Set log retention policy
Monitor logs from EC2
Monitor CloudTrail logged events
Query log data

66
Q

EC2 auto scaling cannot…

A

add volumes to an EC2 instance when a volume is filling up

67
Q

How do you allow Lambda in Account A access to DynamoDB in account B?

A

Create role in account B with access to DynamoDB
Allow the role to be called by Lambda
Have Lambda in Account A call the role with AssumeRole API

68
Q

What is SSE-C?

A

Server Side Encryption - Customer managed keys

69
Q

Where can HTTPS be enforced with CloudFront?

A

Before CloudFront

After CloudFront

70
Q

What section of a CloudFormation template does not allow conditions?

A

Parameters

71
Q

What access do member accounts have to Organization trails?

A

Read only, not modify/delete

72
Q

At what level does CloudTrail track S3 by default?

A

Bucket level only

73
Q

What metric is not part of target tracking scaling policy?

A

ApproximateNumberOfMessagesVisible

74
Q

In CloudFormation how do you reference a parameter?

A

!Ref

75
Q

What is X-Forwarded-For header used for?

A

to get the client IP address from HTTP requests when using an ALB

76
Q

What is the max poll time out?

A

20 seconds

77
Q

What are 2 reasons to use the ‘Transforms’ section of a CloudFormation template?

A

SAM

When you want to use code from S3

78
Q

How can 2 docker containers share memory?

A

Be defined in the same task definition

79
Q

In CloudFormation how do you use an exported value from another stack?

A

!ImportValue

80
Q

What Load Balancer do you use to capture source IP w/o using X-Forwarded-For?

A

NLB

81
Q

If your app uses JWT’s what service do you use?

A

Cognito User Pools

82
Q

What will happen to ECS if you terminate an instance that is stopped?

A

It will still show in the cluster

83
Q

What is reserved concurrency in Lambda?

A

It guarantees concurrency for Lambda functions to use but it also acts as a limiter when you have multiple Lambda functions running

84
Q

When using Cognito with ALB & CloudFront where does the authentication occur?

A

ALB

85
Q

What can cause an ALB to send traffic to one instance or AZ over another?

A

Unevenly split EC2 instance types between AZ’s

Sticky sessions

86
Q

Dedicated Instance vs Dedicated hosts

A

Dedicated instances are cheaper

Dedicated hosts are good for ‘bring your own license’

87
Q

How can you have an IAM policy that allows each user access to only buckets with their user name in it?

A

Use policy variables

88
Q

Which elasticache service supports replication?

A

Redis

89
Q

During rollback, which instances does CodeDeploy deploy to?

A

failed instances

90
Q

How can Lambda connect to an RDS instance in a private subnet?

A

Connect Lambda to the VPC and then allow access with security groups

91
Q

What is the ratio of Kinesis shards to workers?

A

1:1

92
Q

What service do you use to rotate secrets?

A

Secrets Manager

93
Q

What service requires the appspec.yaml file?

A

CodeDeploy

94
Q

What should go into a Lambda deployment package?

A

Compiled code and dependencies

95
Q

What deployment types can Lambda & ECS use?

A

Blue/Green

96
Q

Which ECS task placement strategy minimizes the # of instances?

A

binpack

97
Q

How do you provide an on-prem app server with permissions to AWS?

A

Create user with access keys

Store access keys in a credentials file

98
Q

What service coordinates multiple AWS services using workflows?

A

AWS Step Functions

99
Q

What 2 languages can the appspec file be in?

A

JSON

YAML

100
Q

Does AWS Shield protect from SQL Injection attacks?

A

No

101
Q

Are KMS keys regional or global?

A

Regional

102
Q

What service does X-Ray not integrate with?

A

S3

103
Q

S3 buckets offer read after write consistency for PUTS

A

Yes

104
Q

What service let’s you troubleshoot a performance problem in a microservices app?

A

X-Ray

105
Q

In CloudFormation, exported output values are unique per…

A

Region

106
Q

What is the maximum ratio of provisioned IOPS to requested volume size?

A

50:1

107
Q

At what size will gp2 volumes hit max IOPS?

A

5.3TB

108
Q

What is CodeBuild?

A

A fully managed build service to compile, test, and document builds

109
Q

What CloudTrail event isn’t available for EBS when created during EC2 launch?

A

CreateVolume

110
Q

How do you reduce API calls and improve latency in an API?

A

enable API gateway caching

111
Q

CLI command for setting detailed monitoring on EC2?

A

aws ec2 monitor-instances –instance-ids i-adf8965876

112
Q

How can you have an EC2 instance access S3 files?

A

use an IAM role

113
Q

What is the total set size/number of environment variables you can create for AWS Lambda?

A

Total size of all environment variables cannot exceed 4KB and there is no limit on number of variables

114
Q

Max retention period for SQS?

A

14 days

115
Q

Why would you use an Elastic Beanstalk dedicated worker environment?

A

If your application performs tasks that take a long time to complete.

116
Q

You have a site hosted on Bucket A and JavaScript on Bucket B, how do you enable CORS?

A

On Bucket B to allow Bucket A origin to make requests

117
Q

X-Ray costs are high, how do you reduce costs while still obtaining tracing?

A

use X-Ray sampling

118
Q

Does Cognito User Pools allow for use of MFA?

A

Yes

119
Q

When does Lambda add a message to a DLQ?

A

When Lambda function is async

When the event fails all processing attempts

120
Q

Does S3 support object locking for concurrent udpates?

A

No

121
Q

How do you increase the message size for SQS?

A

Use the SQS Extended library (up to 2GB)

122
Q

Is EBS encryption region or AZ specific by default?

A

Region

123
Q

How can you invalidate the API cache?

A

Cache-Control: max-age=0

124
Q

Which encryption mechanism will get rejected if the connection is not using HTTPS?

A

SSE-C

125
Q

When using the AWS CLI to execute commands it fails with the following exception: You are not authorized to perform this operation. Encoded authorization failure message: 6h34GtpmGjJJUm946eDVBfzWQJk6z5GePbbGDs9Z2T8xZj9EZtEduSnTbmrR7pMqpJrVYJCew2m8YBZQf4HRWEtrpncANrZMsnzk

A

AWS STS decode-authorization-message

126
Q

Which header must the developers add to their request for all new objects uploaded to S3 to be encrypted using SSE-S3 at the time of upload?

A

‘x-amz-server-side-encryption’: ‘AES256’

127
Q

What is the maximum number of messages that can be retrieved at one time for SQS?

A

10

128
Q

How do you encrypt an existing CloudWatch Log group using an AWS KMS customer master key (CMK)?

A

Use the AWS CLI associate-kms-key command and specify the KMS key ARN

129
Q

How can you speed up a CodeBuild that has a lot of dependencies?

A

cache dependencies in S3

130
Q

How do you increase performance of Kinesis Data Streams with multiple consumers?

A

Use enhanced fanout feature of Kinesis Data Streams

131
Q

How can the organization ensure source code is encrypted in transit and at rest?

A

CodeCommit repositories are automatically encrypted at rest

132
Q

How do you declare an Lambda function in CloudFormation?

A

Upload all code as a zip to S3

Write Lambda code inline as long as there are no 3rd party dependencies

133
Q

How can you remove older versions that are not used by Elastic Beanstalk so that new versions can be created for your applications?

A

Use a lifecycle policy

134
Q

How do you search and filter through multiple X-Ray traces?

A

Use annotations

135
Q

Which environment variable can be used by AWS X-Ray SDK to ensure that the daemon is correctly discovered on ECS?

A

AWS_XRAY_DAEMON_ADDRESS

136
Q

What is AWS CodeStar?

A

service that enables you to quickly develop, build, and deploy apps on AWS. Has one UI w/ dashboards, etc

137
Q

Which message parameter should you set for deduplicating messages?

A

MessageDeduplicationId

138
Q

Which message parameter should you set the value of user_id to guarantee the ordering?

A

MessageGroupId

139
Q

How do you ensure your build artifacts are automatically encrypted?

A

Specify a KMS key to use

140
Q

What do you setup in X-Ray daemon when tracing across multiple accounts?

A

Create a role in main account and allow other accounts to assume role
Configure the X-Ray daemon to use the IAM role

141
Q

When using Elastic Beanstalk, how do you perform repetitive/scheduled tasks?

A

Setup a worker environment and a cron.yaml file

142
Q

When using a Classic Load Balancer how can you keep users from having to re-authenticate often?

A

Use ElastiCache

143
Q

How do you allow a CodeBuild build environment to scale and run builds in parallel?

A

You don’t! It automatically scales

144
Q

What actions do you take to have an app with sign-up/sign-in functionality make API calls to a custom solution to log the sign-in events?

A

Use Cognito to provide sign-up/sign-in functionality

Execute a Lambda function to make the API call triggered by the post-authentication event

145
Q

How do you allow only IAM users from another account access to your API’s?

A

Create IAM policy and attach to each user. Use Sig v4

Create a resource policy for the API’s that allow access for each IAM user