Step functions & APPSYNC Flashcards

1
Q

Step function overview
what is it used to orchestrate
features of conditions
max duration

A

Build server less workflow to orchestrate lambda functions

FLOW as JSON STATE MACHINE

Features:
Sequence
parallel
conditions
timeouts, error handling

Also integrate ec2, ecs, on premise, api gateway

MAX duration 1 year

possible to have human approval

use case example:
order fulfillment
data processing
web apps
any workflow
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Step function
Error handling

error types
default error trigger
resolution
best practice

A

Errors:

  1. state machine definition issue, condition doesn’t match possible outcomes to be handled
  2. task failure, lambda function messed up
  3. transient issues, network went down

DEFAULT: error causes step function execution to fail entirely

resolution:

1. retry failure 
RETRY:
INTERVALSECONDS: time between
MAXATTEMPTS: max times to retry
BACKOFFRATE: how to space retries
  1. Moving on
    Catch: ERROREQUALS, NEXT: if error then move to next step

*best practice, put data in error to see what happened to debug

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

Step function

Standard vs express

A

Standard: : LONGER, EXPENSIVE
Max duration 1 year
start rate: 2000 starts per second

Express : Cheaper, SHORTER
Max duration 5 minutes
start rate: 100,000 start per second

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

APPSYNC overview
two main functions
how to start

A

Starts with uploading GraphQL schema

  1. use as GraphQL managed service
    Appsync: Managed service that uses GRAPHQL
    GraphQL: Makes it easy for apps to get specific data that it needs
    -combine data from one or more source
    -NoSQL data stores, relational DB, HTTP API
    -Integrate with DynamoDB, aurora, elasticsearch
    -custom source via AWS Lambda
  2. Retrieve data : REALTIME WITH WEBSOCKET OR MQTT ON WEBSOCKET
    - for mobile apps local data access and data sync
    - cognito sync replacement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

APPSYNC process

schema
query
response in?

A
  1. Upload GraphQL Schema to APPSYNC
    format of data
  2. Client will send a GraphQL Query to Appsync
    data to be requested matching format
  3. Appsync will take the client request and run a resolver and find the data in dynamoDB
  4. APPSYNC returns query as
    GRAPHQL response in JSON
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

APPSYNC process
items to use it

requests from
appsync contains
data sources
integration for monitoring

A
1.Appsync can receive request from
web apps
mobile apps
real time dashboard
offline sync
  1. Appsync contains
    GraphQL schema (what requests will be formatted as)
    RESOLVERS: Where to get data from
3. data sources
dynamodb
aurora
elasticsearch
lambda can process extra
HTTP-- PUBLIC HTTP API

4.APPSYNC can integrate with
Cloudwatch Logs for logging
Cloudwatch metrics also

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

Appsync security

four methods to authorize apps to interact with AWS APPSYN GRAPHQL API

A

four methods to authorize apps to interact with AWS APPSYN GRAPHQL API

  1. API_KEY
    - generate just like api gateway, give to users
  2. AWS_IAM:
    - users, roles, cross account acess
  3. OPENID_CONNECT:
    - integration with third party provider and JSON web token
  4. AMAZON_COGNITO_USER_POOLS
    - integrate with users already in cognito, also can use social logins

For custom domain and HTTPS:
Use cloud front in front of APPSYNC

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