Practice Test 4 Flashcards

1
Q

SAAS company has a requirement to allow-list 2 ip addresses when bank is accessing external services accross intenernet. must have HA, support scaling 10 instances. How?

A

incorrect: ALB plus ASG because they expose a DNS record / domain name rather than an ip address, the ip address (elastic net interface) is private

correct: Network LB plus ASG. NLB is best for low latency and high throughput work, with millions or req per sec. operates at layer 4. which includes EC2 microservices containers.
They expose a fixed ip to the public.
NLB does not support security groups.

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

What is the only resource-based policy that IAM supports? plus more about policies.

A

correct: Trust Policy
* defines what principle; roles users, accounts, fed. users, services, can assume a role.
* you attach a trust policy and identity based policy with an IAM role.
* A role trust policy is a required resource-based policy that is attached to a role in IAM.

incorrect: Org - Service Control Policies SCP of an org unit. specify maximum permissions or intersection when applied to iam accounts.

ACL - service policies to control principles in another account can access a resource. cannot be used in the same account.

Perms boundary

More about roles vs resource based policy
When you are assigned a role you give up all your prior permissions and adopt the perms of the role

with resource based permissions (policy) like bucket policy, you keep your prior perms.

resource policies used by S3 , SNS, SQS, lambda, CW, API gateway, and more.

IAM role (not resource policy) is used by Kinesis data streams, systems manager run command, ECS task …

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

website for evaluating coding skill. uses Redis ElastiCache cluster. how to improve security, leveraging username and password

A

correct: RedisAuth (i got this right)
Redis auth tokens enabble redis to require a token password before clients can run commands.
ElastiCache also supports IAM auth.
redis auth supports rotating the auth token.

distractors: Lamdba resource policy, security group.

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

click stream data with real time analytics required, without loss when there are traffic spikes. what architecture solution would you recommend?

A

Correct, and answered correctly:
* Kinesis data streams to capture
* Feed into Kinesis data analytics for real time processing
* Out put to Kinesis data firehose (yes it can accept analytics as a source) and store in S3

distractor. Data streams > Firehose > S3 > Athena to analyse. which is not real time.

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

ALB plus ASG and fleet of EC2.
ALB is in subnet 10.0.1.0/24 and
ASG in subnet 10.0.4.0/22
How would you configure the security group of the EC2 instances to allow incoming traffic from ALB. ?

A

incorrect: add a rule to authorise cidr 10.0.1.0/24 (this would work but would not guarantee that only the ALB can access the instances.

correct: add a rule to the EC2 SG to authorise the security group of the ALB. Yes ALB can have a security group

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

customer focused web app on EC2 web servers with RDS Postgres which is in a private sub net, which allows inbound traffic from selected EC2. DB uses KMS at rest. How to facilitate secure access to the DB?

A

correct: configure RDS to use SSL for data in transit. every RDS has SSL cert and use the –ssl_ca param when connecting and ref the pub key. SSL can be forced on all connections. (answered correctly)

incorrect: IAM authentication to access DB instead of user creds. This does work with Mysql and postgres, no password needed, only auth token. “it would not significantly enhance the security as much as SSL.”
* this is the correct answer in a question specifically about db auth

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

big data analytics co. writes data and log files to S3 buckets. Now they want to stream the existing data “files” and ongoing file updates from S3 to Kinesis data streams. (what happens next is irellevant). What is the fastest possible way of building a solution?

A

Incorrect: S3 event notification to trigger Lambda for the file create event, Lamdba will then send the data to Data Streams. Why? would require significant development effort to write the data into Kinesis data streams. bad fit.

Correct: Database Migration Service as a bridge between S3 and Kinesis data streams.
* DMS can have S3 as a source
* No code needs to be written with DMS, no complex config.
* DMS can do real time updates (change data capture) from S3 into KDS after the initial migration
* DMS can also stream into Amazon Managed Streaming - Kafka.
* DMS can scale up and down with the workload

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

health company storage in s3 for regulatory guidelines. data cannot be deleted until the regulatory time period has expired. What solution?

A

incorrect: S3 Glacier Vault Lock. “since vault lock is only for glacier and not for S3 it cannot be used.!!! bad question unbelievable.

Correct: S3 Object Lock. memorise this. (this was my first choice, which i revised). Within object lock there is
* Legal Hold
* Retention period setting, which has the following 2 options:
* Governance mode - restrict certain users, allow others.
* Complience mode - no changes by any user including root until the retention period is passed.
* Write once read many model. WORM.

I got confused because there was no mention of complience mode. be careful. Also parts of object lock are incorrect, so this option is ambiguous.

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

company uses ElastiCache Redis, and wants a robust DR strategy for caching layer that guarantees minimal downtime and data loss, and good app performance. Which solution, assuming the question refers to Redis ElastiCache?

A

correct: Multi AZ config with auto failover functionality. correctly answered.
* Low data loss potential
* Low perf impact
* Low to high cost, considering the cost of failure (this is confusing. careful.)
* ElastiCache Cluster is a term used for this config.

Incorrect: add read replicas across multi AZ. ElastiCache allows you to add 5 read replicas across multi AZ. Take read traffic off primary db. not as a fault tolerant solution.

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

What is aws trusted advisor

A

an online tool with real time guidance to help provision resources following best practices. for workflows, apps, recommendations, optimisation. it does not provide reusable infra templates like cloud formation.

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

What services support VPC Endpoints

A

VPC Gateway endpoints support S3 and Dynamo
* specifies a target for a route in route table for traffic destined for S3 / dyn.

VPC Interface Endpoints
* an elastice network interface with a private ip from the range of your subnet that will be a nentry point for your supported service
* Most other services support interface endpoints.

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

company uses DynamoDB table, not used during night hours, during day r/w traffic is unpredictable. Spikes can happen quickly. options for capacity modes:

A

Setup DynamoDB with:
* global table in provisioned capacity mode
* provisioned capacity mode with auto scaling (this is real, auto scaling refers to provisioned r/w and table capacity)
* on-demand capacity mode (correct, selected by me, all others incorrect)
* global secondary index

on-demand is flexible billing option for serving thousands of req per sec, without capacity planning. pay per request for r/w. good for unknown workloads.

provisioned specify the number of r/w per sec.
can use autoscaling to adjust capacity
autoscaling is the default capacity settting for on demand or provisioned.
uses cloud watch to monitor and trigger.

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

company wants to connect VPCs and on prem through a central hub. Solution with least op overhead.

A

correct: Transit Gateway. connect vpcs and on prem with single gateway. manage a single connection from central gw to each vpc. on prem data centre, or remote site. acts as a hub. (i got this answer)

incorrect Transit VPC- which is a real thing, not in notes. connects vpcs and vpns, using EC2 routers and NAT. you need to manually manage the vpns, higher complexity

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

company to migrate on prem app to aws, with app servers and MS Sql Server. Need max possible availability of db, minimis-ing operational and management overhead.

A

incorrect: RDS SQL server in cross region multi AZ deployment. No such thing.

correct: RDS SQL server in Multi AZ deployment.
* db mirroring
* always on availibility groups
* RDS monitors and maintains health, auto repair, auto failover.
* general purpose SSD or iops ssd.
* auto backups and db snaps.

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

web app with multiple domains, move to microservices, use the same LB, linked to target groups by url:
checkout.mycorp.com
www.mycorp.com
yourcorp/profile
yourcorp/search
all of these need to be HTTPS endpoints.
options assigning the correct cert to each domain with minimal config effort

A

incorrect: SSL wildcard, change the ELB SSL policy

correct: Use SSL certificates with SNI (Server Name Indication)
Today we’re launching support for multiple TLS/SSL certificates on Application Load Balancers (ALB) using Server Name Indication (SNI). You can now host multiple TLS secured applications, each with its own TLS certificate, behind a single load balancer. In order to use SNI, all you need to do is bind multiple certificates to the same secure (SSL) listener on your load balancer. ALB will automatically choose the optimal TLS certificate for each client. These new features are provided at no additional charge.

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

company with web portal to match developers with clients. Needs to be serverless, with api gw and Lambda, with DynamoDB. you would like to automatically congratdualte developers on important milestones like their first paid contract. contacts stored in dynamo. Which dynamo feature can do this with the least delay. in automatic notificattions.

A
  • dynamo DAX and api gw
  • dynamoDB streams and Lambda (correct, and i got it)
  • SQS and lambda
  • event bridge and lambda

Dynamodb stream is an ordered flow of changes to items (crud) in a table. “change capture” Streams writes a stream record with PK attributes of every single item that changed. in correct sequence.
Lambda can be triggered to react to the changes.

streams stores the data in a log for max 24 hours.
they are split into shards.

17
Q

company using site to site vpn from on prem to cloud. surge in traffic, users experiencing slower VPN connections. What will maximise throughput?

A

correct: Transit gateway with “equal cost multipath routing” enabled, and add additional VPN tunnels.
* what is ECMP enabled ? - a single tunnel has throughput of 1.25 gbps, add multiple and you can increase that with ecmp enabled.
* Dynamic routing must be enabled

incorrect
virtual private gateway with ECMP and multi channel
Transfer acceleration
Global accelerator

18
Q

Q1. set up DR with minimum cost. the facility can only bear data loss for a few minutes without. Which dr method?

Q2. ensure that a scaled down version of a fully functional env is always running in AWS cloud, recovery time RTO is a minimum.

A

Correct for Q1 : pilot light
* “ a minimal version, not scaled down version, of an environment is always running in the cloud” the small flame can quickly ignite the furnace.
* a small part of the backup infra is always running simultaneously syncing mutable data like DB or docs, so there is no loss of critical data.
* You can rapidly provision a full scale prod env in tens of minutes RPO (recovery point objective how much data you lost) RTO - time. I think the author meant RTO.
* tens of minutes, manual intervention needed to scale out/up
* confusing because question said a few minutes.

warm standby (scaled down version of fully functioning environment is always running) RPO / RTO in minutes.
* can handle reduced traffic immediately, difference to pilot light. (correct for Q2)
* careful - very hard to tell the difference between the 2.

backup and restore ( takes a long time to restore, RPO/RTO is hours not minutes, maybe up to 24 hours)

Multi site (active active) no downtime in theory.

cost increases with reducing time to RTO.

19
Q

ELB with ASG across 3 AZs. servers can be idle, but need to scale quickly.
* Should be HA,
* must have capacity to scale and optimise cost.
options for instance capacity

A

correct
Use reserved instances for the minimum capacity
* Set min capacity to 2
* Hard to comprehend, notes say: “ASG is in 3 AZ, .. the min capacity to be HA is 2. The 2 would be in separate AZs. Demand goes up, 3rd instance in 3rd AZ.” But why are there 3 AZ then, if we only need 2?

Notes: 3 instances is not cost effective, as 2 AZ is enough to make architecture disaster proof. (2 is incorrect)

incorrect
set min capacity to 1
Use dedicated hosts

20
Q

which options are true or false about lambda

A
  • if you are reusing code, create a lambda layer (zip archive of libs, custom runtime, other deps. max 5 layers per function, total unzipped size of fn and layers < 250MB)
  • Use cloudwatch alarm for ConcurrentExecutions or Invocations
  • By default lamdba are in aws owned vpc, access to pub internet or pub aws apis. if a lambda is vpc enabled, it needs a route through nat gateway in pub subnet to access pub resources

incorrect
bigger deployment slower function will cold start
can’t deploy lambda in containers (you can)
allocates computer power in proportion to mem

21
Q

one time copy 1 PB of data from one region to another in S3 to S3. options?

A

S3 sync command, one short command
copy objects in source but not target
only copy the current version
copy last modifide date different in source nad target
copies all metadata
ACL set to full control in target
idempotent, run again same effect, no dup

S3 batch replication, once, then delete replication config
replicate objects that existed before the replication was in place.
through batch operations job
by default suppors copying new objects after it is enabled.
automatic async copying of objects between buckets.

22
Q

dynamically alter the size of the geographic area from which traffic is routed to a specific server resource. which Route 53 feature (question 49)

A

correct: geoproximity routing.
routes based on the geo location of your users and resources (assume resoure is web servers/dbs stack)
route more or less traffic to a given resource by specifying a bias. bias expands or shrinks the size of a geo region from which the traffic is routed.
Select bias 1, expand to 99
route 53 shrinks the size of adjacent regions
to manually shrink use -1 -99

incorrect

weighted routing
associate resources with a domain name, and weight the traffic that goes to each

geolocation routing
select the resources that serve trafic based on the location of users, or where the dns originates from.
can be used to localise content, or restrict distribution.

latency based routing
send requests to the region with lowest latency.

23
Q

What protocols and apis does Amazon MQ support?

A

JMS, NMS, AMQP, STOMP, MQTT, websocket

managed message broker for Apache Active MQ

24
Q

Tools for cost optimisation Q55

A

Cost Explorer resource optimisation. identify under utilised EC2 instances that can be downsized in the same family. take into account reserved instances and savings plans.

Compute optimiser, recommends compute resources to reduce costs by using ML to analyse historical data. select instance types

S3 storage class analysis is to analyse patterns to help decide when to transition from std, to IA, but not recommendations for glacier or one zone ia.

trusted advisor, checks reserved instances scheduled to expire in 30 days, do not renew. if you do nothing it will become on demand.

25
Q

SaaS app feeding updates to other in house and 3rd party apps, that will be migrated to cloud. “inter-application comms”. Which solution to asynchronously decouple the architecture

A

Incorrect: SNS. could be used for event based services but not best fit. key is the integration with Saas. does not support third party service integration.

SQS, no third party app integration.

Correct: Event Bridge. is best, or “the only” event based service that integrates directly to a SaaS application and or AWS services.
Can ingest events from 90 plus aws services without requiring developers to create any resources in their account.
Uses json
Create rules that can be applied across the whole event body to send to a target
Supports 15 aws service targets Lam, SQS, SNS, Kinesis streams, Firehose plus more.
Limited throughput that can be increased.

26
Q

DR strategy, recovery time objective of 5 min. in all regions. app stack takes 45 mins currently. options

A

Correct- create an AMI after installing software and copy the AMI across all regions. use the region specific ami to run the recovery.
* amis are bound to the region they were created in, need to copy to create a distinct target ami with unique id in each region.
* does not copy launch perms, user tags, bucket perms, you need to do that.

Incorrect: create an AMI and use this AMI accross regions.

27
Q

social media comany, evaluating CloudFront what is true or false about CF?

A

Correct:
* Use an origin group with primary and secondary origins to config CF for HA and failover (if prim na, go to secondary)
* Use field level encryption in CF to protect sensitive data for specific content (missed by me, up to 10 fields must be specified in post request)
* CF can route to multiple origins based on the content type (eg static from S3, dynamic from LB)

Incorrect:
Can use geo restriction to configure CF for HA and failover (ticked by me). Geo restriction / blocking is available but has nothing to do with HA and failover.

can route to muli origin based on price class
use KMS encryption to protect sensitive data

28
Q

dating website, must be serverless, using API gateway and Lam. with RDS postgres. uses user name and password for Lambda to connect to RDS. improve security by leveraging short lived credentials.

A

Correct:
* Attach IAM role to Lambda
* Use IAM auth from Lam to RDS. This works with postgres and mysql. no password required, only a token with lifetime 15 min. standard auth is still available.

Incorrect:
Embed a credential rotation logic in Lam, retrieving them from SSM. would work but lots of work when the above is better.

29
Q

Rest API with API Gateway, Lam and Aurora db. workload is read heavy. data rarely changes and it is acceptable to serve users outdated data for 24 hours. Recently website has high load and costs on Aurora have been high. goal to reduce cost and improve perf, with minimal change.

A

Incorrect
Add aurora read replicas. would greatly increase cost - main reason incorrect

Correct: API gateway caching.
* endpoint responses can be cached, thus reducing calls to the API, improving latency.
* set a TTL in sec, default 300 sec, max 3600. TTL of zero means caching disabled.
* does have a cost per hour per GB in cache. examiners must have done the comparison with read reps.