Exams 1 & 2 Flashcards
collect key value data every 1 minute. Process and store with hig availability.
Lambda plus dynamo db, elasticashe was wrong, maybe kinesis too?
Need more info, but the data is not streaming at 2mb per sec, which is.a hint for not Kinesis.
Lambda, DynamoDB
millions or req per sec. Network load balancer with many EC2 instances in a public subnet. NLB configured with targets that are instance id. What IP does NLB use?
NLB uses the private ip of the instance, not public
What kind of policy to give users access to buckets on different accounts
S3 Bucket policies work x account, not IAM policies.
memorise, a bucket filled with sciptures or policy documents, old books.
Permissions for Lambda to access S3, how to steps.
Create an
* IAM role for Lamdba function,
* grant access to bucket,
* set the role as the Lambda execution role.
* Make sure the bucket policy also grants access to the Lambda function
memorise, bucket with policy, role documents, lambda, and an executioner.
agency stores re-creatable assets in S3, large number of users for first few days, and access falls down a lot after one week. must be immediately accessible. Suggest cost optimised solution.
lifecyle policy to transation to S3 one zone IA after 30 days which is the minimum
How to automatically reboot EC2 if it has problems
Cloudwatch alarms can automatically reboot EC2 directly, nothing else needed. Cloudwatch alarms can also send messages to SNS, and lambda
Best database that is multi region and transactional
Aurora global database, compat with mysql and postgres
Reads causing high IO in aurora multi AZ setup. what do you do?
Set up read replicas in multi az. They share the data volume with the primary writable db.
To access SQS over the internet, what is the best way?
VPC (interface) endpoint, not internet gateway, not vpc gateway enphoint which only work for S3 and Dynamo
Secure access to RDS database (any) what do you do?
database will be in a subnet, use SSL access, not IAM security not security groups not NACL.
Parallel and high performance processing of massive volumes of: hot data, cold data. hot data process and store quickly, cold kept for reference and quick access. What solution?
FSx Lustre high perf computing file system connected to aws S3, which presents objects as files in fsx. hot data can be processed in parallel and fast.
High frequency trading system want to read objects just after writing them, in near real time. How will that work with S3?
S3 will always return the latest version of the object, hard to belive, but memorise.
Data streaming at high volumes, what is the max throughput option?
Kinesis data streams enhanced fan out with 2 mb per shard, per consumer. Standard is 2 mb per shard
standard; ingest 1 MB per shard, output 2 MB per shard.
enhanced fan out will output 2 MB per shard per consumer with multiple consumers possible. before this engineers would create multiple streams to get throughput.
SQS need to move from standard to fifo, how?
Create new fifo queue, name with .fifo (mandatory), Delete the old queue.
Queues can handle 3000 per second with batching, 300 per second on demand, no batching.
Memorise,. 300 people in a queue for ice cream. 10 x in groups. per second…clock ticking tick tick.
Users need to login with API gateway and Application load balancer ALB, how?
Cognito User Pools, user logins work with API Gateway and ALB. Not Identity pools. (bad name)
Difference between NAT instance and NAT gateway
GW is managed by AWS, instance by you
bandwidth of gw up to 100 GBPS, instance depends on type
memorise NAT (ure) is 100 percent good
Cost of GW depends on use, instance depends on EC2
Things in common:
Elastic IP address attached
Private ip address from subnet
use NACL to control trafic in out of subnet
Cloudwatch
What services are supported by VPC Gateway Endpoints?
S3 and DynamoDB, all other services suppoct VPC interface endpoints
memorise: Gateway with giant Bucket filled with blue Dye (namo) in water in bucket.
Blue green (active / inactive) test deployment what services best for this?
Global Accelerator can send a portion of traffic to one deployment. Elastic LB can’t do this.
memorise: blue green superman suit or rocket, superman is the global accelerator flying around the world. global accelerator is multi region and AZ, rocket splits in 2 directions.
Global accelerator can handle UDP traffic?
True. Cloudfront cannot, only http rtmp.
memorise - Global accelerator is the blue green rocket ship flying around the world. Can split traffic, or route based on rules. UDP? (user datagram proto) Gamers inside rocket.
Company with one VPC and direct connect to HQ. VPN to branches. What solution to allow branches to talk to themselves, HQ and aws?
VPN Cloud Hub.
VPC endponint will not allow branches to talk to on another
VPC peering does allow VPC to talk to eachother but not branches.
different to transit gateway which is good for many, hundreds of VPCS connected together.
memorise: shopping mall in the clouds. with private connections to earth.
What is user data in EC2?
Runs scripts and init tasks on launch by default and at boot time if configured
Executed as root
16 kb max size before base 64 encoded.
Cloud formation is more powerful but user data can be simpler.
What is IAM permissions boundary?
Add it to IAM permissions policy and the intersection is the effective permissions. (not the union, meaning that permissions that intersect or match are used)
Policy can’t be greater than the boundary.
memorise with ven diagram intersection of 2 circles. (….(.xxx) ….)
When EC2 is terminated, what happens to EBS root volumes?
EBS root volumes are also terminated.
How to use Server bound software licences in AWS?
EC2 dedicated hosts, not reserved instances
‘Amazon Kinesis’ questions placeholder..
when worded like this, it can mean any form of Kinesis, including data streams, firehose, analytics.
differences between each type….
Firehose can invoke lambda to transform.
data streams can capture many sources with manual work, firehose can use the same sources as data streams. see other slides
What is AWS Macie?
Macie looks for S3 issues with PII, unencrypted buckets, access controls, iam gaps…; in s3 macie looks for this activity using ML
Guard duty monitors
Vpc flow logs
DnS logs
Cloud trail logs
Kuberneties EKS audit logs
how to make an app (App LB, auto scale group, aurora) more resilient to periodic spikes?
Cloudfront = ONE correct answer.
Aurora read replica option two.
(maybe data cache? but not in question)
memorise Cloudfront cold front shaped like a sharp wedge.
About Lambda brain dump
Incorrect - bigger deployment package, slower lambda to start - not true. Backed up by independent blog. Weird. Java and .net 100 times slower than py or js.
Lambda operates from a aws owned vpc and can access pub internet or pub aws apis, like dynamo
**When lambda is vpc enabled it no longer has pub access ** and will need a route through a nat gateway in a public subnet to access pub resources.
Use Lambda layer for reusable code between functions
Yes You can package a lambda function in ECS container images, new. (i got this wrong)
Best practice - Set up CW alarm for concurrent executions or invocations over a threshold.
Max run time 15 min.
What config is available in the VPC console wizard?
PUB, PRIV, NAT, VPN, CIDR
Vpc with single pub subnet
Vpc with pub and private and site to site vpn
Vpc with pub and private subnets and NAT
cidr rules for the above.
NOT SUPPORTED vpc with pub and private subnets and vpn site to site. ?? weird.
delays in processing video uploads to S3 what to do?
USE multipart upload and s3 transfer accelerator S3TA. Speed increase of 50 to 500%. For long distance and larger objects. Shortens the upload point for remote locations. Routes transfers through cloudfront edge locations.
memorise, transfer accelerator, a different rocket ship that transfers cargo in buckets with baggage handlers to other rockets in clouds. not a global accelerator rocket.
I want to transfer one PB of data in S3 from us west to us east, what is the best way?
Can’t use snowball.
Use s3 batch replication – plus s3 sync copy.
- Sync all the new or changed objects, only current versions if bucket versioned.
- Batch replication copies existing objects, not changes or new ones. This is why both are needed.
memorise: batches of buckets, on pallets on a ship. copy sync, the ship has a giant kitchen sink.
Sync can be used from on prem device directory. - true but not relevant.
Most efficient way to connect up to thousands of VPC and on prem vpn / direct connect networks, without vpc peering
Transit Gateway, more efficient than vpc peering
memorise: Transit lounge virgin lounge. thousands of private clouds in the lounge. different to cloud hub which is a shopping mall in the clouds.
interaction between NACL and security groups in vpc for requests
NACL is stateless, SEcurity group is statefull therefore it knows to allow the response of a request out (due to session) regardless of rules. NACL needs a rule.
subnet masks, what does /8 /16 /24 mean?
/32 = 1 ip address = 2 ^ 0 (2 ^ (32 - 32))
/31 = 2 ip address = 2 ^ 1
/30 = 4 ip address = 2 ^ 2 (2 ^ (32 - 30))
/24 = 256 ip address = 2 ^ 8
/8 means last 3 octets are available 10.x x x
/16 means last 2 octets avail 10.0.x.x
/24 means last 1 octet avail 10.0.0.x