Serverless and App Services Flashcards

1
Q

Event Driven Architecture

A

Producers generate event when something happens

Events are delivered to consumers

Actions are taken & the system returns to waiting

they only consume resources while handling events

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

AWS Lambda

A

Function-as-a-service(Faas) - short running & focussed

Lambda functions are loaded and run in a runtime environment

you are billed for the duration that a function runs

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

How long can AWS Lambda function run ?

A

900s(15min) function time out

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

Lambda user cases

A

serveles Application (s3, API gateway, lambda)

File processing (s3, s3 events, lambda)

Database Triggers(DynamoDb, streams, Lambda)

serverless CRON(EventBridge/CW Events + Lambda)

Realtime stream Data processing(Kinesis + lambda)

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

Public Lambda

A

by default lambda functions are given public networking. They can access public AWS services and the public internet.

But Lambda functions have no access to VPC based services public IPS unless public IPs are provided & security controls allow external access

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

Private Lambda

A

a single connection between the Lambda service VPC and your VPC is created for every unique combination of security group and subnets used by you Lambda function

an ENI gets created in the VPC

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

Lambda Logging CloudWatch logs

A

Logs from Lambda execution

CloudWatch Logs requires permissions via execution role

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

What metrics can Cloud Watch logging capture with Lambda ?

A

metrics :

invocation success/failure

Retries

Latency

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

How does security work with Lambda ?

A

Lambda resources policy controls WHAT services and accounts can INVOKE lambda functions

Lambda execution roles are IAM roles attached to lambda Functions which control the PERMISSIONS the lambda function RECEIVES

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

How many ways can Lambda functions be Invoked ?

A

Synchronous invocation

Asynchronous invocation

Event source Mapping

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

Lambda Synchronous Invocation

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

Lambda Asynchronous Invocation

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

Lambda Event sources Mapping

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

When running Asynchronous operations what key features does an Lambda function have to have ?

A

The Lambda function needs to be idempotent reprocessing a result should have the same end state

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

X-Ray and Lambda

A

Lambda can be integrated with X-Ray for distributed tracing

X-Ray helps developers analyze and debug production, distributed applications, such as those built using a microservices architecture.

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

Lambda Function Versions

A

A version is the code + the configuration of the Lambda Function

it’s immutable - It never changes once published & has it’s own amazon Resources Name

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

Lambda version Pointer

A

$Latest points at the latest version

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

AWS Lambda Aliases

A

Aliases (DEV, STAGE, PROD) point at a version - can be changed

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

Explain the Invocation of a Lambda Function ? Is there always an immediate start for Lambda Functions?

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

Event Bridge

A

if x happens , or at y times(s) … do z

Event Bridge is CloudWatch Event V2(*)

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

Limitation of CloudWatch Events ?

A

only one bus for the account (implicit )

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

Explain how Event Bridge works ?

A

Event Bridge can have additional event buses

rules match incoming events (or schedules )

Routes the events to 1+ Targets .. e.g. Lambda

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

Explain Serverless Architecture

A

you manage few if any servers -low overhead

Application are a collection of small & specialized functions

stateless and Ephemeral environments - duration billing

event-driven consumption only when being used

Faas is used where possible for computer functionality

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

Simple Notification Services(SNS)

A

Public Aws a pub/sub messaging service networking connectivity with Public endpoints

coordinates the sending and delivery of messages

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

How does SNS Work ?

A

SNS Topics are the bases entity of SNS permissions and configuration

a publisher sends messages to a Topic

Topics have subscribers which receive messages

26
Q

SNS resiliency ?

A

HA and scalable region resilient

27
Q

SNS security

A

Server sided Encryption (SSE)

28
Q

SNS Delivery options

A

delivery status including HTTP, lambda and SQS

Delivery Retried - reliable delivery

29
Q

How you you enable cross account access to SNS?

A

Topic policy

30
Q

Step functions

A

allows you to create state machines

serverless workflow start → states → end

states are things which occurred

Maximum Duration 1 year

31
Q

What are the two options for workflow in AWS step functions

A

standard workflow - default 1 year limit

express Workflow - high Volume Workflow 5 min Limit

32
Q

How are state machines started ?

A

started via API Gateway, IOT Rules Event Bridge Lambda

33
Q

How are State machines written ?

A

Written in Amazon states Languages(ASL) - Json Template

34
Q

How do State machines gets their permissions ?

A

IAM Role is used for permissions

35
Q

API Gateway

A

create and manage APIs

Endpoint /entry- point for applications

sits between applications & intergradations (services)

36
Q

What are some of the things API Gateway can do ?

A

authorization

throttling

caching

cors transformation

opAPI spec direct integration and much more.

37
Q

API GateWay cache

A

can be used to reduce the number of calls made to the backend integration and improve client performance

38
Q

API Gateway Endpoints

A

Edge-optimized : any incoming requests are routed Routed to the nearest CloudFront point of presence

Regional : clients in the same region

private: Endpoint accessible only within a VPC via interface endpoint

39
Q

API Gateway Stages

A

APIs are deployed to stages, each stage has one deployment

40
Q

API Gateway states + Canary deployments

A

stages can be enabled for canary deployments. if Done deployments are made to the canary not the stage.

Stages enabled for canary deployments can be configured so a certain percentage of traffic is sent to the canary.This can be adjusted over time - or canary can be promoted to make it the new base ‘stage’

41
Q

API Gateway 4xx Errors

A

invalid request on client side

42
Q

API Gateway 5xx Errors

A

valid request backend issue

43
Q

Simple Queue Service (SQS)

A

public , fully managed , highly-available Queues

standard = at-least-once or FIFO = exactly-once

messages up to 256 KB ins size - link to large data

44
Q

How are messages handled in SQS

A

Received messages are hidden (visibility timeout)

…. then either reappear(retry) or are explicitly deleted

Dead-Letter queues can be used for problem messages

45
Q

Visibility Timeout

A

amount of time an message is hidden when it’s received if not explicitly deleted then that message will reappear in the queue

46
Q

SQS FIFO(performance)

A

3,000 messages per second with batching , or up to 300 messages per second without

47
Q

How is SQS billed

A

Billed based on ‘requests’

1 request = 1-10 messages up to 256kb total

48
Q

SQS Polling

A

short point = immediate if not messages on queue it will still check the queue and consume a request

Long polling = wait time seconds if no message on queue how you should use SQS because it uses few requests

49
Q

SNS and SQS Fanout

A

the messages is added onto a SNS topic

the SNS topic would have a number of subscribers for a project requirement

so each subscribers has it’s own queue and it’s own auto-scaling group which scales based of the length of the individual queue

50
Q

Kinesis

A

a scalable streaming service

producers send data into kinesis stream

stream store 24-hr moving window of data

multiple consumer access data from that moving window

51
Q

States In a State Machine

A

succeed & Fail

wait

choice

parallel

Map

Task

52
Q

Kinesis Data Firehouse

A

Fully managed service to load data for data lakes , data stores and analytics services

Automatic scaling fully server less resilient

Near real Time delivery (-60 seconds)

supports transformation of data on the fly(lambda)

billing Volume through firehouse

53
Q

Where can Kinesis Data Firehouse deliver data ?

A

HTTP endpoints

splunk

redshift

ElastiSearch

Destination Bucket

54
Q

Kinesis Data Analytics

A

Real time processing of data

using structured Query Language (SQL)

fits between two streams of data an input stream and output stream and allows

you in real time to use SQL queries to adjust the data from the input to the output

55
Q

When would you get real time delivery Using Kinesis Data Analytics ?

A

When you use AWS Lambda or Kinesis Data streams as a destination

56
Q

Some valid destinations for Kinesis Analytics ?

A

Firehose (S3, Redshift, ElasticSearch & Splunk )

Aws Lambda

Kinesis Data streams

57
Q

Where can Kinesis Data Analytics ingest Data from ?

A

Kinesis Data Streams or Firehouse

and can also ingest reference data from an s3 bucket

58
Q

What are some use cases for Kinesis Data Analytics

A

streaming data needing real-time SQL processing

Time-series analytics … elections/e-sports

Real-time dashboards- leaderboards for games

Real-time metrics -Security & response teams

59
Q

Amazon Cognito

A

Authentication = login verify credentials

Authorization = mange access to services

User-management = to allow the creation and management of a server as user database

Authentication, Authorization, and User-management for `Web/mobile apps

60
Q

How many ways can you uses Amazon Cognito ?

A

user pools - sign-in and get a Json Web Token(JWT)

user directory management and profiles, sign-up & sign-in (customizable webUI), MFA and other security features

identity Pools - Allow you to offer access to Temporary AWS credentials

61
Q

What are some forms of Identity Acces

A

unauthenticated identities -Guest users

Federated identities -SWAP google, Facebook, twitter SAML 2.0 & user Pool for short term AWS credentials to access AWS resources