AppSync Flashcards

1
Q

What is AppSync?

A

AWS AppSync is a fully managed GraphQL service that simplifies application data delivery by handling real-time updates, offline access, and data synchronization. Consider an e-commerce platform with multiple clients (web, mobile) requiring consistent product inventory and user information in a real-world scenario.

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

What is a resolver in AppSync?

A

Types of Resolvers:

Query Resolver: Handles GraphQL queries and retrieves data from the data source.
Mutation Resolver: Manages updates or changes to the data source based on GraphQL mutations.
Subscription Resolver: Controls how data changes are pushed to clients in real-time when they subscribe to specific events.

Resolver Mapping Template:
Resolvers use a mapping template, written in Apache Velocity Template Language (VTL), to define how the GraphQL request and response should be mapped to and from the data source.
The mapping template specifies how to interact with the data source, perform queries or mutations, and shape the data for the GraphQL response.

Data Source Integration:
Resolvers are associated with a specific data source, such as Amazon DynamoDB, AWS Lambda, or an HTTP endpoint.
Depending on the data source type, the resolver’s mapping template will include instructions on how to interact with that data source.

Pipeline Resolvers:
AppSync supports pipeline resolvers, which allow you to chain multiple resolvers together to perform complex operations.
Each function in the pipeline can manipulate the data or execute specific logic before passing it to the next function.

Authorization and Security:
Resolvers play a role in enforcing security and authorization rules defined in the GraphQL schema.
You can specify who can access certain operations based on authentication and authorization settings in your resolver configuration.

Caching:
AppSync provides caching mechanisms to improve performance. Resolvers can be configured to use caching strategies, and you can control how the cache is invalidated or updated.

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

What is the offline access in AppSync?

A

AWS AppSync also provides features for offline support. Clients can continue interacting with the app and receive real-time updates even when temporarily disconnected from the network. Once the connection is reestablished, changes are synchronized.

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

What is the real-time subscription in Appsync?

A

GraphQL Subscriptions: GraphQL supports real-time data updates through a feature called subscriptions. With subscriptions, clients can subscribe to specific events or changes in the data, and the server will push updates to the subscribed clients when those events occur.

AppSync Real-time Capabilities: AWS AppSync uses WebSocket connections to provide real-time capabilities. When a client subscribes to a particular event or data, the AppSync service establishes a WebSocket connection with the client. When there are updates to the subscribed data, the server can push those updates over the WebSocket connection to the client, enabling real-time communication.

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

Security and Authorization in Appsync

A

AppSync ensures that real-time updates are secure and adhere to the defined authorization rules. It uses AWS Identity and Access Management (IAM) and Amazon Cognito for authentication and authorization.

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

How many data sources can Appsync connect to as compared to RestAPI?

A

AppSync supports multiple data sources like AWS Lambda, DynamoDB, or any HTTP data source, whereas API Gateway primarily integrates with Lambda and other AWS services.

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

What is the difference between AppSync and RestAPI in terms of real-time updates?

A

AppSync provides real-time updates through subscriptions, enabling clients to receive data changes instantly. API Gateway lacks this feature.

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

What is the difference between AppSync and RestAPI in terms of off-offline updates?

A

AppSync offers built-in offline support for mobile and web applications, allowing users to interact with apps even without connectivity. API Gateway doesn’t provide offline capabilities.

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

What is the difference between AppSync and RestAPI in terms of Schema definition?

A

AppSync uses GraphQL schema to define the structure of API requests and responses, offering flexibility in querying data. API Gateway relies on predefined REST endpoints.

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

Fine-grained access control in AppSync?

A

AppSync allows granular control over data access using AWS Identity and Access Management (IAM), Amazon Cognito, or OpenID Connect. API Gateway mainly uses IAM and custom authorizers

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