AWS — Serverless API, Edge to Table
A serverless request path with no servers in it: CDN, API gateway, functions, a document store and an object store, with a queue for the asynchronous half. Reports clean — and shows the async edge style, which is drawn differently from request traffic because a queue between two services is a different claim from a call.
Make it your own.
title "Serverless order API"
provider aws
internet {
user shoppers "Shoppers"
}
cloud prod "Production" {
region us-east-1 {
cloudfront cdn "Content delivery"
api-gateway api "Order API"
lambda create "Create order"
lambda fulfil "Fulfil order"
sqs queue "Order queue"
dynamodb orders "Orders table"
s3 receipts "Receipts"
cognito auth "User pool"
secrets-manager creds "Payment credentials"
}
}
shoppers -> cdn : https 443
cdn -> api : https 443
api -> auth : oidc
api -> create : invoke
create -> orders : putitem
create ~> queue : order placed
queue ~> fulfil : order placed
fulfil -> orders : updateitem
fulfil => receipts : put object
fulfil -> creds : getsecret