AWS AppSync Introduction

Stephane Maarek
21 Oct 201907:59

Summary

TLDRAWS AppSync is a powerful service that facilitates the development of real-time, flexible, and secure APIs for client applications. It acts as a connector between client apps and AWS services like DynamoDB and Aurora, simplifying data access and management. The script explains how AppSync uses GraphQL schemas and resolvers to structure and retrieve data efficiently. Benefits include fast setup, scalability, real-time subscriptions, offline access, and unified secure access to multiple data sources, making it ideal for creating dynamic applications like a real-time blog.

Takeaways

  • 🌐 AppSync is a service that facilitates the development of flexible, extensible, and secure real-time APIs for applications.
  • 🔗 It acts as a connector between client applications and AWS services such as DynamoDB, Aurora, and others, providing a unified interface for data access.
  • 🛠️ AppSync uses GraphQL schema to define the structure of the data and resolvers to map the schema types to the actual data sources.
  • 🔑 The service supports authentication and secure access to the data, ensuring that the data flow is protected.
  • 📈 AppSync enables real-time subscriptions, allowing applications to receive updates instantly when data changes.
  • 🔄 It also supports offline access, syncing changes when the device reconnects to the internet, enhancing user experience.
  • 🚀 AppSync offers fast setup and scaling capabilities, accommodating applications with varying numbers of users.
  • 🔍 The service can handle multiple data sources, including NoSQL and relational databases, as well as other APIs.
  • 🛡️ AppSync ensures unified and secure access to data sources, reducing the need for developers to manage security protocols manually.
  • 🏗️ Using AppSync can significantly reduce the development time and complexity of creating real-time, subscription-based applications.
  • 📚 The script provides an analogy of building a real-time blog application to illustrate the benefits and ease of use that AppSync offers to developers.

Q & A

  • What is AWS AppSync?

    -AWS AppSync is a service that enables developers to create flexible, extensible, real-time, and secure APIs. It acts as a facilitator or connector between client applications and AWS services like DynamoDB, Amazon Aurora, and others.

  • How does AppSync benefit developers in building real-time applications?

    -AppSync simplifies the process of creating real-time applications by providing a managed service that handles data synchronization, real-time updates, and security, allowing developers to focus on building the application logic rather than the underlying infrastructure.

  • What role does GraphQL play in AWS AppSync?

    -GraphQL is used in AWS AppSync to define the schema of the data, laying out the structure and types of the data that the API will manage. It allows for flexible and efficient data retrieval, reducing the need for multiple round trips to the server.

  • What are resolvers in the context of AWS AppSync?

    -Resolvers in AWS AppSync are functions that connect the types defined in the GraphQL schema to the data sources. They are responsible for fetching the data from the specified sources and returning it in the format defined by the schema.

  • How does AWS AppSync support real-time updates in applications?

    -AWS AppSync supports real-time updates through subscriptions, which allow clients to receive updates immediately when data changes, ensuring that all users of the application see the most current information.

  • What is the significance of AWS AppSync's ability to handle multiple data sources?

    -The ability to handle multiple data sources allows developers to build applications that can integrate and interact with various backend systems and databases, providing a unified and extensible data layer for the application.

  • How does AWS AppSync ensure secure access to data?

    -AWS AppSync provides secure access to data through features like authentication with Amazon Cognito, which ensures that only authorized users can access and manipulate the data within the application.

  • What is the advantage of using AWS AppSync for offline access in applications?

    -AWS AppSync supports offline access by allowing users to perform CRUD operations even when they are not connected to the internet. Changes made offline are automatically synchronized with the backend once the connection is re-established.

  • How does AWS AppSync facilitate the development of a real-time blog application?

    -AWS AppSync can be used to build a real-time blog application by providing the necessary features such as user authentication, real-time updates through subscriptions, and the ability to handle CRUD operations, all while ensuring secure and unified access to the data.

  • What are some of the main benefits of using AWS AppSync for application development?

    -The main benefits of using AWS AppSync include fast setup and scalability, real-time subscriptions, offline access, unified and secure data access, and the ability to connect to multiple data sources, simplifying the development process and reducing the need for custom backend infrastructure.

  • Can AWS AppSync be used with other AWS services for enhanced functionality?

    -Yes, AWS AppSync can be integrated with other AWS services such as Amazon DynamoDB for NoSQL database storage, Amazon Aurora for relational database storage, Elasticsearch Service for search capabilities, and AWS Lambda for serverless computing, among others.

Outlines

00:00

🚀 Introduction to AWS AppSync

This paragraph introduces AWS AppSync as a service that facilitates real-time, flexible, and secure API development. It acts as a 'facilitator' or 'connector' between client applications and AWS backend services such as DynamoDB, Aurora, and others. The speaker explains the concept of AppSync with an official diagram, illustrating how it enables secure access and data combination from various databases and backend systems. The paragraph also touches on the use of GraphQL schema for data structuring and resolvers for mapping data types between the schema and the data sources. The paragraph concludes with an analogy of building a real-time blog application, emphasizing the need for user authentication, CRUD operations, real-time event-driven subscriptions, extensibility, unified secure access, and offline capabilities.

05:00

🔧 Benefits and Application of AWS AppSync

The second paragraph delves into the benefits of using AWS AppSync, highlighting its ease of setup and scalability to accommodate varying user loads. It underscores the provision of real-time subscriptions and offline access, along with unified and secure data access, facilitated by AWS. The speaker uses the ongoing analogy of the real-time blog application, explaining how AppSync simplifies the development process by leveraging services like Amazon Cognito for user authorization. The paragraph explains how AppSync handles queries and real-time subscriptions, connecting to data sources and performing operations without the need for extensive manual setup. The summary concludes by emphasizing the efficiency and capabilities of AppSync in creating secure, real-time, and extensible applications.

Mindmap

Keywords

💡AppSync

AppSync is a managed service from AWS that allows developers to build scalable and secure real-time data synchronization and application backends. It enables real-time and offline data interactions with client applications by connecting to data sources like Amazon DynamoDB, Amazon Aurora, and more. In the video, AppSync is described as a 'facilitator' or 'connector' between client apps and AWS services, highlighting its role in simplifying the development of real-time applications.

💡Real-time API

A real-time API is an application programming interface (API) that allows for immediate data exchange between the client and server, without any noticeable delay. In the context of the video, real-time APIs are crucial for creating responsive and interactive applications, such as a real-time blog application where users can post comments and see updates instantly.

💡Resolvers

Resolvers in AppSync are functions that map the data types defined in the GraphQL schema to the data types in the data source. They play a critical role in fetching, processing, and delivering data to the client applications. The video explains that resolvers are used to resolve the data types created in the schema to the actual data received from the data sources.

💡GraphQL schema

A GraphQL schema defines the structure of the data and the operations that can be performed on that data. It is used in AppSync to layout the format of the data that the application is trying to create. The video emphasizes the importance of the schema in structuring the data for the application, ensuring that the data types are well-defined and consistent.

💡Data sources

Data sources in AppSync refer to the backend databases and services that store and manage the data accessed by the client applications. Examples include Amazon DynamoDB, Amazon Aurora, and Elasticsearch Service. The video script mentions that AppSync can connect to various data sources, allowing for a flexible and extensible backend architecture.

💡Amazon Cognito

Amazon Cognito is an AWS service that provides user identity and data synchronization across mobile and web applications. In the video, Amazon Cognito is used for authorization, ensuring that users are authenticated before they can perform operations like creating posts or comments in the real-time blog application.

💡CRUD operations

CRUD stands for Create, Read, Update, and Delete, which are the basic functions of persistent storage. The video script mentions that users should be able to perform CRUD operations on the application, indicating the need for a robust backend that supports these fundamental data manipulation tasks.

💡Real-time subscriptions

Real-time subscriptions in AppSync allow applications to receive updates instantly when data changes. This feature is essential for event-driven applications, as discussed in the video, where users need to be notified immediately when new content is posted or changes are made, ensuring a dynamic and interactive user experience.

💡Offline access

Offline access refers to the ability of an application to continue functioning and performing data operations even when the user is not connected to the internet. The video script highlights the importance of offline access in AppSync, allowing users to interact with the application seamlessly and have their changes synchronized once they regain connectivity.

💡Extensibility

Extensibility in the context of the video refers to the capability of an application backend to accommodate growth and incorporate additional data sources or services without significant rework. The video emphasizes the need for a backend that allows for extensibility, which AppSync facilitates by supporting connections to multiple and varied data sources.

💡Unified secured access

Unified secured access implies a single, secure point of access to various data sources within an application. The video script mentions the importance of having a secure and unified backend for data access, which AppSync provides by managing connections and ensuring data security across different services and databases.

Highlights

AppSync is a process for developing applications with the ability to create flexible, extensible, real-time APIs.

AppSync acts as a facilitator or connector between client applications and AWS services such as DynamoDB and Aurora.

AppSync allows secure access and combination of data from various databases and backend systems.

GraphQL schema is used in AppSync to define the structure of the data being created.

Resolvers in AppSync map the data types in the schema to the actual data source.

AppSync supports a variety of data sources including Amazon DynamoDB, Amazon Aurora, Elasticsearch, and Lambda functions.

Developers can leverage AppSync to create secure, real-time applications without managing the underlying infrastructure.

AppSync simplifies the development of real-time, event-driven applications with subscription capabilities.

The backend of AppSync ensures unified and secured access to data, even with multiple data sources.

AppSync provides offline access, allowing users to perform transactions without an internet connection, which syncs once back online.

AppSync reduces the complexity and cost of developing real-time applications by handling the heavy lifting.

Fast setup and scalability are key benefits of using AppSync, accommodating any number of users.

AppSync offers real-time subscriptions and offline access, enhancing user experience in applications.

Unified and secured data access is simplified with AppSync, reducing the need for manual security implementations.

AppSync's flexibility allows for the integration of various databases and APIs, supporting diverse backend requirements.

Amazon Cognito can be used in conjunction with AppSync for user authorization in applications.

AppSync enables the creation of real-time blogging applications with authentication, CRUD operations, and real-time updates.

AppSync's facilitation of data connections and real-time subscriptions streamlines the development process.

The ability to connect to multiple data sources with AppSync enhances the extensibility of applications.

Transcripts

play00:04

so what is appsync well appsync is the

play00:09

process of developing applications by

play00:11

giving us the leverage of creating

play00:14

flexible extensible real times as well

play00:17

as secure of course real time API what

play00:19

this means is appsync gets us to what we

play00:22

want to get in terms of creating real

play00:24

time save here that have a lot of

play00:26

benefits which we're going to see soon

play00:27

so appsync stays in the middle of for

play00:31

instance our client apps and the amazon

play00:34

realm the AWS web services so let's say

play00:37

dynamodb amazon aurora all of the

play00:40

backend per se of amazon are connected

play00:43

to our client apps through AB sync I

play00:46

like to call AB sync the facilitator

play00:49

because it is the glue the connector

play00:51

between the left our client and

play00:53

applications and of course the Amazon

play00:55

our web services that we can use in our

play00:57

client application through absinthe now

play00:59

here's the official diagram that shows

play01:01

essentially how app saying works within

play01:04

the realm of clients applications and of

play01:07

course the backend their sources and so

play01:10

forth you can see to the left we have

play01:12

all kinds of client applications so we

play01:15

could have enterprise apps web apps

play01:17

real-time dashboards so anything that

play01:19

you want to connect to our AWS services

play01:23

you will have to the left

play01:25

okay so client applications in the

play01:28

middle as I said or facilitator which is

play01:30

our AWS up sync allows this connection

play01:33

between what some left our clients and

play01:36

what's to the right okay so it securely

play01:39

access and combines data from databases

play01:42

notice again it says databases because

play01:44

we can have all sort of databases that

play01:46

we have in the backend that we want to

play01:47

connect to okay API is and other

play01:50

back-end systems within Apps Sync

play01:53

there's a lot of things that we can do

play01:55

obviously so the idea of course is to

play01:57

lay out our data in such a way that we

play01:59

know when we put data into our database

play02:02

or data sources there is some sort of

play02:05

structure hence we use graph QL schema

play02:08

to actual layout the format of the data

play02:11

that we are trying to create and within

play02:13

that we have resolvers that will resolve

play02:15

the data types that we're creating in

play02:17

our

play02:17

schema to the types that we have

play02:19

actually put and receive in our data

play02:21

source okay and the far right of course

play02:24

we have the data sources as you see

play02:27

there's all sort of the resources that

play02:28

we can use in conjunction with AWS app

play02:31

sync so you can have as your back-end

play02:34

data source Amazon DynamoDB

play02:36

you can use Amazon Aurora elasticsearch

play02:39

service lambdas and so many other things

play02:42

you can see here the importance of AB

play02:45

sync for as developers who want to

play02:47

create extensible secure real-time

play02:49

applications now before we go into

play02:51

benefits I like to use some sort of

play02:54

analogy so that that way we can drive

play02:57

this concept home

play02:58

now imagine we're asked to build a

play03:01

real-time blog application I'm smiling

play03:04

because you could know that that's what

play03:06

we actually gonna be building imagine we

play03:08

giving that task of building that

play03:10

real-time blog application and of course

play03:12

we're given these specifications so the

play03:15

first one is the user has to be

play03:17

authenticated so in order for the user

play03:19

to use this app it has to be

play03:20

authenticated and then users also will

play03:24

be able to post comments on those posts

play03:27

I like posting and also do all of the

play03:30

crud operations so create read update

play03:32

and delete on top of that we also want

play03:35

the real-time event-driven applications

play03:38

of subscription meaning if one instance

play03:41

of the application let's say person a is

play03:43

using this app and there are other

play03:44

million people also using this app at

play03:47

this time if I make any change I post

play03:49

something everybody else will be

play03:51

notified and they will see that

play03:52

something was posted by me vice versa if

play03:55

somebody posts something I'll be able to

play03:58

see and so will million of people who

play04:00

may be using this application also the

play04:03

backend must allow for extensibility

play04:05

meaning multiple data sources even

play04:07

needed we also want to make sure that we

play04:09

have a unified secured access to all the

play04:13

strudy data so the back-end of their

play04:15

source has to be secured and unified on

play04:19

top of that we want offline access

play04:21

meaning if I am using this application

play04:23

I'm posting something however my

play04:26

internet connection is not so great I

play04:28

will still be able to do all

play04:31

of those transactions post things and

play04:32

everything without being interrupted

play04:35

even though because I don't have any no

play04:36

net access I'm not posting directly

play04:39

however once I'm back online it will

play04:42

automatically send off all that data

play04:44

without me having to do anything now you

play04:46

can see right away that this is a lot of

play04:49

work that needs to be done if we were to

play04:51

do this ourselves

play04:53

that would be very very cumbersome

play04:55

expensive and will take a lot of time

play04:58

obviously we don't have to do any of

play05:00

that because we can actually use app

play05:02

sync that will take care of all of that

play05:05

for saps in connecting to AWS services

play05:08

there are a lot of benefits to using app

play05:11

sync one is fast setup and scale as

play05:15

needed what this mean is that in order

play05:17

for us to start using app sync it's

play05:19

really really easy we can go through the

play05:21

dashboard which I will show you later

play05:22

and start creating all this api's and so

play05:25

forth or we can also use the app sync

play05:28

CLI using amplify and on our machine we

play05:31

can use our command-line interface and

play05:33

start putting together our API and

play05:35

connections and so forth that we need to

play05:37

start creating our front-end application

play05:40

or scale as needed meaning that doesn't

play05:43

matter if you are talking about a

play05:44

smaller scale of users it will scale

play05:47

according to the people that are using

play05:49

your application which is huge number

play05:52

two we get real-time subscriptions and

play05:55

offline access Unified secured access

play05:58

that's another big one here so we have a

play06:01

secured data source that we don't have

play06:04

to worry about because AWS will take

play06:07

care of all of that for us and also we

play06:09

can have as many data sources that we

play06:11

want so we can have no sequel databases

play06:14

we can have a relational we can have

play06:16

other api's that are using in the

play06:18

backend oh and so forth those are the

play06:21

main benefits when we use app sync

play06:23

taking back the application that we were

play06:25

asked to do now we can structure their

play06:28

application because we no longer have to

play06:29

create everything ourselves we can

play06:31

leverage app sync so in this case here

play06:33

with app sync we can use Amazon Cognito

play06:35

for authorization for instance so users

play06:37

have to get authorized in order to then

play06:40

start creating things like posts and so

play06:43

forth right

play06:44

and of course the user as he creates

play06:46

comments does all of those things what

play06:48

happens really that a user can send off

play06:50

queries saying hey I want all the posts

play06:53

that were created today or I want to see

play06:55

all the comment but also there is

play06:57

real-time subscriptions which has said

play06:59

it's very important because it allows us

play07:01

to this real-time grievin application

play07:04

okay

play07:05

and the connection against continues

play07:07

being the same we're connecting to what

play07:08

we're connecting to a tableau as app

play07:11

synced which is our facilitator as I

play07:13

like to call it so this is where all of

play07:15

the heavy lifting happens really without

play07:18

us having to do much work so connecting

play07:21

to data sources sending the comments and

play07:23

do all the real-time subscription and

play07:25

right in the back of course we could

play07:27

have multiple data sources as we

play07:29

discussed any connection continues as

play07:31

such so in a nutshell this is what we

play07:34

had given when we use Apps ink to create

play07:36

extensible secure and real-time

play07:39

subscription driven applications all

play07:42

right so I hope this is making sense and

play07:43

get you more excited about learning more

play07:46

about appsync and creating amazing api's

play07:56

you

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
AWS AppSyncReal-TimeAPI DevelopmentSecureApplicationsGraphQLData SourcesAmazon DynamoDBAmazon AuroraOffline AccessSubscriptions
¿Necesitas un resumen en inglés?