SlideShare a Scribd company logo
1 of 47
A talk on
AWS
AppSync
Reducing backend
complexity
Serverless Guru
Founder & CEO at Serverless Guru
Senior Cloud Developer at Mode2
Application Engineer at Nike
Innovation Engineering
Department
History:
What is AWS?
“Amazon Web Services is a subsidiary of Amazon that provides
on-demand cloud computing platforms to individuals, companies,
and governments, on a metered pay-as-you-go basis.”
- Wikipedia
Serverless Guru
What is AWS API Gateway?
AWS API Gateway is a fully managed REST API service that
allows you to easily create API endpoints that connect directly to
AWS Lambda functions.
Serverless Guru
Serverless Guru
REST APIs with AWS API Gateway
● Easy to set up & start
● Less automation required
● Solved thousands of times
● Lots of tutorials
● No built-in documentation
● Porting Swagger and connecting
to AWS Lambda functions is a
nightmare
Pros Cons
Serverless Guru
What is AWS AppSync?
“A fully managed serverless GraphQL service for real-time data
queries, synchronization, communications, and offline
programming features.”
- Tara Walker, Technical Evangelist
Serverless Guru
What is GraphQL?
“GraphQL is a responsive data query language and server-side
runtime for querying data sources that allow for real-time data
retrieval and dynamic query execution.”
- Tara Walker, Technical Evangelist
Serverless Guru
What is a GraphQL Schema?
“GraphQL works at the application layer and provides a type
system for defining schemas. These schemas serve as
specifications to define how operations should be performed on
the data and how the data should be structured when retrieved.”
- Tara Walker, Technical Evangelist
Serverless Guru
GraphQL APIs with AWS AppSync
● Built-in Documentation
● Connect to other AWS resources
easily
● Create VTL files to write directly to
AWS DynamoDB without a
Lambda function in between
● AppSync suggests best practices
● Support for subscribers for real-
time communication
● Hard to do more advanced things
● More difficult to quickly create a
POC
● VTL files are a nightmare
● *Automation is much more
involved
Pros Cons
Serverless Guru
Serverless Guru
AWS AppSync Key Concepts
● GraphQL schema is attached to AWS AppSync
● Resolvers are linked to Data Sources and GraphQL data types
● Data Sources like databases, AWS Lambda, HTTP endpoints are
connected to resolvers
● VTL (Velocity Templating Language) files can remove the need for
AppSync to be connected directly an AWS Lambda function
Serverless Guru
ChatQL Example
Source: AppSync, product pageServerless Guru
Deploy AppSync
Serverless Guru
Serverless Guru Source: Serverless Framework
AWS Lambda (serverless.yml)
Serverless Guru Source: Serverless Framework
GraphQL Schema (schema.graphql)
Serverless Guru Source: Serverless Framework
AppSync API (serverless.yml)
Serverless Guru Source: Serverless Framework
AppSync Data Sources (serverless.yml)
Serverless Guru Source: Serverless Framework
AppSync Mapping Templates (serverless.yml)
A basic example of
how you would
make a request to
your AWS AppSync
API
Source:
Serverless Framework
CRUD APIs Without Code
Serverless Guru
VTL Mapping Templates (the magic)
● Leveraging VTL files we can remove A LOT of API code
● *All CRUD functionality can be replaced with VTL files
● AWS has their own VTL specific packages to allow the developer to
do for loops, set variables, stringify objects, etc. all inside a static file
Serverless Guru
Serverless Guru
VTL Mapping Template
NO LAMBDA
FUNCTION
REQUIRED
“C” in CRUD
Serverless Guru
Serverless Guru Source: AppSync Docs
{
"version" : "2017-02-28",
"operation" : "PutItem",
"key" : {
"id" : { "S" : "${context.arguments.id}" }
},
"attributeValues" : {
"author": { "S" : "${context.arguments.author}" }
}
}
Create Request
“R” in CRUD
Serverless Guru
Serverless Guru Source: AppSync Docs
{
"version" : "2017-02-28",
"operation" : "GetItem",
"key" : {
"id" : { "S" : "${context.arguments.id}" }
}
}
GET by ID Request
Serverless Guru Source: AppSync Docs
{
"version" : "2017-02-28",
"operation" : "Scan"
}
GET ALL Basic Request
Serverless Guru Source: AppSync Docs
{
"version" : "2017-02-28",
"operation" : "Scan"
#if( ${context.arguments.count} )
,"limit": ${context.arguments.count}
#end
#if( ${context.arguments.nextToken} )
,"nextToken":
"${context.arguments.nextToken}"
#end
}
GET ALL Advanced
“U” in CRUD
Serverless Guru
Serverless Guru Source: AppSync Docs
{
"version" : "2017-02-28",
"operation" : "UpdateItem",
"key" : {
"id" : { "S" : "${context.arguments.id}" }
},
"update" : {
"expression" : "ADD tags :tags",
"expressionValues" : {
":tags" : { "SS": ["${context.arguments.tag}"]
}
}
}
Update Request
“D” in CRUD
Serverless Guru
Serverless Guru Source: AppSync Docs
{
"version" : "2017-02-28",
"operation" : "DeleteItem",
"key": {
"id": { "S" : "${context.arguments.id}"}
}
}
DELETE Request
API Response
Serverless Guru
Serverless Guru Source: AppSync Docs
$utils.toJson($context.result)
Generic Response
Interested in learning more?
Serverless Guru
YouTube
Serverless Guru
Training Site
Serverless Guru
training.serverlessguru.com
Medium Publication
Serverless Guru
medium.com/serverlessguru
Podcast
Serverless Guru
talkingserverless.io
Thank you!
Serverless Guru
Q & A
ryanjonesirl
ryanjonesirl

More Related Content

What's hot

AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase ProductivityAWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase ProductivityAWS User Group - Thailand
 
I/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したか
I/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したかI/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したか
I/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したかLINE Corporation
 
Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016 Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016 Yochay Kiriaty
 
Architecting for Scale using Microservices - AWS Summit Tel Aviv 2017
Architecting for Scale using Microservices - AWS Summit Tel Aviv 2017Architecting for Scale using Microservices - AWS Summit Tel Aviv 2017
Architecting for Scale using Microservices - AWS Summit Tel Aviv 2017Amazon Web Services
 
Getting Started with Amazon EventBridge
Getting Started with Amazon EventBridgeGetting Started with Amazon EventBridge
Getting Started with Amazon EventBridgeSrushith Repakula
 
Customer Case Study Containerised Bioinformatics on AWS How we Achieved 20x l...
Customer Case Study Containerised Bioinformatics on AWS How we Achieved 20x l...Customer Case Study Containerised Bioinformatics on AWS How we Achieved 20x l...
Customer Case Study Containerised Bioinformatics on AWS How we Achieved 20x l...Amazon Web Services
 
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...Tom Kerkhove
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Apigee | Google Cloud
 
Aws serverless application repository
Aws serverless application repositoryAws serverless application repository
Aws serverless application repositorySotiris (Soto) Hatzis
 
ActiveCampaign API Developer Talks - Motivating Sales with Code
ActiveCampaign API Developer Talks - Motivating Sales with CodeActiveCampaign API Developer Talks - Motivating Sales with Code
ActiveCampaign API Developer Talks - Motivating Sales with CodeJordan Skole
 
Serverless <3 GraphQL | 2019 - Serverless Architecture Conference
Serverless <3 GraphQL | 2019 - Serverless Architecture ConferenceServerless <3 GraphQL | 2019 - Serverless Architecture Conference
Serverless <3 GraphQL | 2019 - Serverless Architecture ConferenceMarcia Villalba
 
IoT and Serverless - AWS - Serverless Summit - Madhusudan Shekar
IoT and Serverless - AWS - Serverless Summit - Madhusudan ShekarIoT and Serverless - AWS - Serverless Summit - Madhusudan Shekar
IoT and Serverless - AWS - Serverless Summit - Madhusudan ShekarCodeOps Technologies LLP
 
使用 Serverless 技術打造支援 Alexa 的物聯網服務
使用 Serverless 技術打造支援 Alexa 的物聯網服務使用 Serverless 技術打造支援 Alexa 的物聯網服務
使用 Serverless 技術打造支援 Alexa 的物聯網服務Amazon Web Services
 
AWS: Serverless Architecture - Beyond functions and into the future
AWS: Serverless Architecture - Beyond functions and into the future AWS: Serverless Architecture - Beyond functions and into the future
AWS: Serverless Architecture - Beyond functions and into the future Dynatrace
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsAmazon Web Services
 
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCodeOps Technologies LLP
 

What's hot (20)

AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase ProductivityAWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
I/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したか
I/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したかI/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したか
I/O intensiveなKafka ConsumerアプリケーションのスループットをLINE Ads Platformではどのように改善したか
 
Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016 Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016
 
Architecting for Scale using Microservices - AWS Summit Tel Aviv 2017
Architecting for Scale using Microservices - AWS Summit Tel Aviv 2017Architecting for Scale using Microservices - AWS Summit Tel Aviv 2017
Architecting for Scale using Microservices - AWS Summit Tel Aviv 2017
 
Getting Started with Amazon EventBridge
Getting Started with Amazon EventBridgeGetting Started with Amazon EventBridge
Getting Started with Amazon EventBridge
 
Customer Case Study Containerised Bioinformatics on AWS How we Achieved 20x l...
Customer Case Study Containerised Bioinformatics on AWS How we Achieved 20x l...Customer Case Study Containerised Bioinformatics on AWS How we Achieved 20x l...
Customer Case Study Containerised Bioinformatics on AWS How we Achieved 20x l...
 
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda
 
Aws serverless application repository
Aws serverless application repositoryAws serverless application repository
Aws serverless application repository
 
ActiveCampaign API Developer Talks - Motivating Sales with Code
ActiveCampaign API Developer Talks - Motivating Sales with CodeActiveCampaign API Developer Talks - Motivating Sales with Code
ActiveCampaign API Developer Talks - Motivating Sales with Code
 
Serverless <3 GraphQL | 2019 - Serverless Architecture Conference
Serverless <3 GraphQL | 2019 - Serverless Architecture ConferenceServerless <3 GraphQL | 2019 - Serverless Architecture Conference
Serverless <3 GraphQL | 2019 - Serverless Architecture Conference
 
IoT and Serverless - AWS - Serverless Summit - Madhusudan Shekar
IoT and Serverless - AWS - Serverless Summit - Madhusudan ShekarIoT and Serverless - AWS - Serverless Summit - Madhusudan Shekar
IoT and Serverless - AWS - Serverless Summit - Madhusudan Shekar
 
使用 Serverless 技術打造支援 Alexa 的物聯網服務
使用 Serverless 技術打造支援 Alexa 的物聯網服務使用 Serverless 技術打造支援 Alexa 的物聯網服務
使用 Serverless 技術打造支援 Alexa 的物聯網服務
 
AWS: Serverless Architecture - Beyond functions and into the future
AWS: Serverless Architecture - Beyond functions and into the future AWS: Serverless Architecture - Beyond functions and into the future
AWS: Serverless Architecture - Beyond functions and into the future
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
AWS Amplify
AWS AmplifyAWS Amplify
AWS Amplify
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 

Similar to A talk on AWS AppSync

Build and run applications without thinking about servers
Build and run applications without thinking about serversBuild and run applications without thinking about servers
Build and run applications without thinking about serversAmazon Web Services
 
How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018Amazon Web Services
 
Migrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformMigrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformAmazon Web Services
 
Serverless: Beyond Lambda Functions (V2)
Serverless: Beyond Lambda Functions (V2)Serverless: Beyond Lambda Functions (V2)
Serverless: Beyond Lambda Functions (V2)Srushith Repakula
 
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Amazon Web Services
 
以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端Amazon Web Services
 
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...Amazon Web Services
 
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Amazon Web Services
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)Julien SIMON
 
What's better than Microservices? Serverless Microservices
What's better than Microservices? Serverless MicroservicesWhat's better than Microservices? Serverless Microservices
What's better than Microservices? Serverless MicroservicesAlan Williams
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingAmazon Web Services
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayBuilding Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayAmazon Web Services
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Amazon Web Services
 
Building CICD Pipelines for Serverless Applications - DevDay Austin 2017
Building CICD Pipelines for Serverless Applications - DevDay Austin 2017Building CICD Pipelines for Serverless Applications - DevDay Austin 2017
Building CICD Pipelines for Serverless Applications - DevDay Austin 2017Amazon Web Services
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingAmazon Web Services
 
re:Invent recap session 1: What's New with AWS Lambda
re:Invent recap session 1: What's New with AWS Lambda re:Invent recap session 1: What's New with AWS Lambda
re:Invent recap session 1: What's New with AWS Lambda Amazon Web Services
 
What's Better than Microservices? Serverless Microservices.
What's Better than Microservices? Serverless Microservices.What's Better than Microservices? Serverless Microservices.
What's Better than Microservices? Serverless Microservices.Apigee | Google Cloud
 

Similar to A talk on AWS AppSync (20)

Build and run applications without thinking about servers
Build and run applications without thinking about serversBuild and run applications without thinking about servers
Build and run applications without thinking about servers
 
How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018How to build and deploy serverless apps - AWS Summit Cape Town 2018
How to build and deploy serverless apps - AWS Summit Cape Town 2018
 
Migrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless PlatformMigrating your .NET Applications to the AWS Serverless Platform
Migrating your .NET Applications to the AWS Serverless Platform
 
Serverless: Beyond Lambda Functions (V2)
Serverless: Beyond Lambda Functions (V2)Serverless: Beyond Lambda Functions (V2)
Serverless: Beyond Lambda Functions (V2)
 
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
 
Reinvent recap
Reinvent recapReinvent recap
Reinvent recap
 
以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端
 
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
 
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
Application Lifecycle Management in a Serverless World | AWS Public Sector Su...
 
An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)An introduction to serverless architectures (February 2017)
An introduction to serverless architectures (February 2017)
 
What's better than Microservices? Serverless Microservices
What's better than Microservices? Serverless MicroservicesWhat's better than Microservices? Serverless Microservices
What's better than Microservices? Serverless Microservices
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
 
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless CloudSRV203 Getting Started with AWS Lambda and the Serverless Cloud
SRV203 Getting Started with AWS Lambda and the Serverless Cloud
 
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayBuilding Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API Gateway
 
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
Getting Started with Serverless Architectures - August 2016 Monthly Webinar S...
 
Building CICD Pipelines for Serverless Applications - DevDay Austin 2017
Building CICD Pipelines for Serverless Applications - DevDay Austin 2017Building CICD Pipelines for Serverless Applications - DevDay Austin 2017
Building CICD Pipelines for Serverless Applications - DevDay Austin 2017
 
Getting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless ComputingGetting Started with AWS Lambda and Serverless Computing
Getting Started with AWS Lambda and Serverless Computing
 
re:Invent recap session 1: What's New with AWS Lambda
re:Invent recap session 1: What's New with AWS Lambda re:Invent recap session 1: What's New with AWS Lambda
re:Invent recap session 1: What's New with AWS Lambda
 
What's Better than Microservices? Serverless Microservices.
What's Better than Microservices? Serverless Microservices.What's Better than Microservices? Serverless Microservices.
What's Better than Microservices? Serverless Microservices.
 

Recently uploaded

Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 

Recently uploaded (20)

Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 

A talk on AWS AppSync

  • 1. A talk on AWS AppSync Reducing backend complexity
  • 2. Serverless Guru Founder & CEO at Serverless Guru Senior Cloud Developer at Mode2 Application Engineer at Nike Innovation Engineering Department History:
  • 3. What is AWS? “Amazon Web Services is a subsidiary of Amazon that provides on-demand cloud computing platforms to individuals, companies, and governments, on a metered pay-as-you-go basis.” - Wikipedia Serverless Guru
  • 4. What is AWS API Gateway? AWS API Gateway is a fully managed REST API service that allows you to easily create API endpoints that connect directly to AWS Lambda functions. Serverless Guru
  • 6. REST APIs with AWS API Gateway ● Easy to set up & start ● Less automation required ● Solved thousands of times ● Lots of tutorials ● No built-in documentation ● Porting Swagger and connecting to AWS Lambda functions is a nightmare Pros Cons Serverless Guru
  • 7. What is AWS AppSync? “A fully managed serverless GraphQL service for real-time data queries, synchronization, communications, and offline programming features.” - Tara Walker, Technical Evangelist Serverless Guru
  • 8. What is GraphQL? “GraphQL is a responsive data query language and server-side runtime for querying data sources that allow for real-time data retrieval and dynamic query execution.” - Tara Walker, Technical Evangelist Serverless Guru
  • 9. What is a GraphQL Schema? “GraphQL works at the application layer and provides a type system for defining schemas. These schemas serve as specifications to define how operations should be performed on the data and how the data should be structured when retrieved.” - Tara Walker, Technical Evangelist Serverless Guru
  • 10. GraphQL APIs with AWS AppSync ● Built-in Documentation ● Connect to other AWS resources easily ● Create VTL files to write directly to AWS DynamoDB without a Lambda function in between ● AppSync suggests best practices ● Support for subscribers for real- time communication ● Hard to do more advanced things ● More difficult to quickly create a POC ● VTL files are a nightmare ● *Automation is much more involved Pros Cons Serverless Guru
  • 12. AWS AppSync Key Concepts ● GraphQL schema is attached to AWS AppSync ● Resolvers are linked to Data Sources and GraphQL data types ● Data Sources like databases, AWS Lambda, HTTP endpoints are connected to resolvers ● VTL (Velocity Templating Language) files can remove the need for AppSync to be connected directly an AWS Lambda function Serverless Guru
  • 13. ChatQL Example Source: AppSync, product pageServerless Guru
  • 15.
  • 16. Serverless Guru Source: Serverless Framework AWS Lambda (serverless.yml)
  • 17. Serverless Guru Source: Serverless Framework GraphQL Schema (schema.graphql)
  • 18. Serverless Guru Source: Serverless Framework AppSync API (serverless.yml)
  • 19. Serverless Guru Source: Serverless Framework AppSync Data Sources (serverless.yml)
  • 20. Serverless Guru Source: Serverless Framework AppSync Mapping Templates (serverless.yml)
  • 21. A basic example of how you would make a request to your AWS AppSync API Source: Serverless Framework
  • 22. CRUD APIs Without Code Serverless Guru
  • 23. VTL Mapping Templates (the magic) ● Leveraging VTL files we can remove A LOT of API code ● *All CRUD functionality can be replaced with VTL files ● AWS has their own VTL specific packages to allow the developer to do for loops, set variables, stringify objects, etc. all inside a static file Serverless Guru
  • 24. Serverless Guru VTL Mapping Template NO LAMBDA FUNCTION REQUIRED
  • 26. Serverless Guru Source: AppSync Docs { "version" : "2017-02-28", "operation" : "PutItem", "key" : { "id" : { "S" : "${context.arguments.id}" } }, "attributeValues" : { "author": { "S" : "${context.arguments.author}" } } } Create Request
  • 28. Serverless Guru Source: AppSync Docs { "version" : "2017-02-28", "operation" : "GetItem", "key" : { "id" : { "S" : "${context.arguments.id}" } } } GET by ID Request
  • 29. Serverless Guru Source: AppSync Docs { "version" : "2017-02-28", "operation" : "Scan" } GET ALL Basic Request
  • 30. Serverless Guru Source: AppSync Docs { "version" : "2017-02-28", "operation" : "Scan" #if( ${context.arguments.count} ) ,"limit": ${context.arguments.count} #end #if( ${context.arguments.nextToken} ) ,"nextToken": "${context.arguments.nextToken}" #end } GET ALL Advanced
  • 32. Serverless Guru Source: AppSync Docs { "version" : "2017-02-28", "operation" : "UpdateItem", "key" : { "id" : { "S" : "${context.arguments.id}" } }, "update" : { "expression" : "ADD tags :tags", "expressionValues" : { ":tags" : { "SS": ["${context.arguments.tag}"] } } } Update Request
  • 34. Serverless Guru Source: AppSync Docs { "version" : "2017-02-28", "operation" : "DeleteItem", "key": { "id": { "S" : "${context.arguments.id}"} } } DELETE Request
  • 36. Serverless Guru Source: AppSync Docs $utils.toJson($context.result) Generic Response
  • 37. Interested in learning more? Serverless Guru
  • 39.
  • 47. Serverless Guru Q & A ryanjonesirl ryanjonesirl