AWS Serverless 101
Agenda
- Vad är AWS
- Vad är serverless
- Ett gäng tjänster
- Planner
- Playtime!
Vad är AWS

Kategorier
Vilka använder ni?
CLI
Klicka
CloudFormation
Vad är Serverless?
Serverless computing is a cloud-computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources.
Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity.
| On premise | IaaS | PaaS | FaaS |
|---|---|---|---|
| Functions | Functions | Functions | Functions |
| Data | Data | Data | |
| Runtime | Runtime | ||
| OS | OS | ||
| Virtualization | |||
| Hardware |




serverless create --template aws-nodejs --path myservice
serverless deploy
serverless deploy -f hello
serverless logs -f hello -t



AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running.

AWS Lambda
module.exports.handler = async event => {
return {
statusCode: 200,
body: JSON.stringify(event, null, 2)
};
};
module.exports.handler = async event => {
const people = ["gurra", "tobbe", "johan", "emma"];
return {
statusCode: 200,
body: JSON.stringify(people, null, 2)
};
};
Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.
Amazon API Gateway

Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It's a fully managed, multiregion, multimaster, durable database with built-in security, backup and restore, and in-memory caching for internet-scale applications. DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second.
Amazon DynamoDB

Amazon CloudWatch is a monitoring and observability service. CloudWatch collects monitoring and operational data in the form of logs, metrics, and events, providing you with a unified view of AWS resources, applications, and services

Amazon CloudWatch
{
"errorType": "AccessDeniedException",
"errorMessage": "User: arn:aws:sts::510721335853:assumed-role/step2-dev-eu-west-1-lambdaRole/step2-dev-list-people is not authorized to perform: dynamodb:Scan on resource: arn:aws:dynamodb:eu-west-1:510721335853:table/step2-dev-PeopleTable-10265EMOF1XH7",
"code": "AccessDeniedException",
"stack": [
"AccessDeniedException: User: arn:aws:sts::510721335853:assumed-role/step2-dev-eu-west-1-lambdaRole/step2-dev-list-people is not authorized to perform: dynamodb:Scan on resource: arn:aws:dynamodb:eu-west-1:510721335853:table/step2-dev-PeopleTable-10265EMOF1XH7",
" at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:51:27)",
" at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
" at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)",
" at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)",
" at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)",
" at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)",
" at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10",
" at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)",
" at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)",
" at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:116:18)"
],
"message": "User: arn:aws:sts::510721335853:assumed-role/step2-dev-eu-west-1-lambdaRole/step2-dev-list-people is not authorized to perform: dynamodb:Scan on resource: arn:aws:dynamodb:eu-west-1:510721335853:table/step2-dev-PeopleTable-10265EMOF1XH7",
"time": "2019-10-15T21:13:16.534Z",
"requestId": "3NITF57QOGEBCF5LI34E1PU8BRVV4KQNSO5AEMVJF66Q9ASUAAJG",
"statusCode": 400,
"retryable": false,
"retryDelay": 15.977516112458668
}
AWS Identity and Access Management (IAM) enables you to manage access to AWS services and resources securely. Using IAM, you can create and manage AWS users and groups, and use permissions to allow and deny their access to AWS resources.
AWS IAM
With Amazon Kinesis, you can ingest real-time data such as video, audio, application logs, website clickstreams, and IoT telemetry data for machine learning, analytics, and other applications.

Amazon Kinesis
Planner Demo

adnegA
- Playtime!
- Planner
- Ett gäng tjänster
- Vad är serverless
- Vad är AWS
Playtime!



AWS Serverless 101
By Gustav Jorlöv
AWS Serverless 101
- 248