SlideShare a Scribd company logo
•
•
•
•
•
•
•
•
•
•
see@	http://www.restapitutorial.com/lessons/whatisrest.html
REST	API
Client
Mobile client
REST	API
GET /users HTTP/1.1
{"users": […]}
REST	API
Amazon
DynamoDB
Amazon	S3
Amazon	
CloudWatch
Auto Scaling group
Security group
Elastic Load
Balancing
Instance
REST API
Amazon
DynamoDB
Amazon	
CloudWatch
Amazon	S3
Amazon
DynamoDB
Amazon	
CloudWatch
Amazon API Gateway
AWS Lambda
Amazon	S3
Lambda.GetFunction(params: {'body': '', 'url': u'https://lambda.us-west-2.amazonaws.com/2015-03-31
IAM.GetRole(params: {'body': {'Action': u'GetRole', 'RoleName': u'helloworld7', 'Version': u'2010-
IAM.CreateRole(params: {'body': {'Action': u'CreateRole', 'RoleName': u'helloworld7', 'Version': u
IAM.PutRolePolicy(params: {'body': {'Action': u'PutRolePolicy', 'RoleName': u'helloworld7', 'Polic
Lambda.CreateFunction(params: (... omitted from logs due to size ...)
APIGateway.GetRestApis(params: {'body': '', 'url': u'https://apigateway.us-west-2.amazonaws.com/re
APIGateway.CreateRestApi(params: {'body': '{"name": "helloworld7"}', 'url': u'https://apigateway.u
APIGateway.GetResources(params: {'body': '', 'url': u'https://apigateway.us-west-2.amazonaws.com/r
APIGateway.PutMethod(params: {'body': '{"authorizationType": "NONE"}', 'url': u'https://apigateway
APIGateway.PutIntegration(params: {'body': '{"httpMethod": "POST", "requestTemplates": {"applicati
APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}',
APIGateway.PutIntegrationResponse(params: {'body': '{"responseTemplates": {"application/json": ""}
APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}',
APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "ChaliceViewError.*", "re
APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}',
APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "BadRequestError.*", "res
APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}',
APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "NotFoundError.*", "respo
APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}',
APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "UnauthorizedError.*", "r
APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}',
APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "ForbiddenError.*", "resp
APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}',
APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "ConflictError.*", "respo
APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}',
APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "TooManyRequestsError.*",
Lambda.GetPolicy(params: {'body': '', 'url': u'https://lambda.us-west-2.amazonaws.com/2015-03-31/f
Lambda.AddPermission(params: {'body': '{"Action": "lambda:InvokeFunction", "StatementId": "1e96468
APIGatewayCreateDeployment(params: {'body': '{"stageName": "dev"}', 'url': u'https://apigateway.us
API
# AWS SAM
https://github.com/aws/chalice
•
•
•
•
•
•
•
$ pip install chalice
$ chalice new-project helloworld && cd helloworld
$ cat app.py
from chalice import Chalice
app = Chalice(app_name="helloworld")
@app.route("/")
def index():
return {"hello": "world"}
$ chalice deploy
...
https://endpoint/api
$ curl https://endpoint/api
{"hello": "world"}
$ git diff
from chalice import Chalice
+import boto3
app = Chalice(app_name='chalice-sample')
+S3 = boto3.client('s3', region_name='us-east-1')
@app.route('/')
def index():
+ S3.get_object(Bucket = BUCKET, Key = key)
return {'hello': 'world'}
$ chalice deploy
Creating role: chalice-sample-dev
The following execution policy will be used:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": ["*"],
"Sid": "40e10c45a..."
},
...
}
Would you like to continue? [Y/n]:
$ chalice local
Serving on localhost:8000
$ npm install -g nodemon
$ nodemon --exec "chalice local" --watch *.py
[nodemon] 1.12.5
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: app.py
[nodemon] starting `chalice local`
Serving on localhost:8000
see@	https://qiita.com/TakenoriHirao/items/69f2af5aaf64db77124b
•
•
•
# Basic Definition
@app.route('/')
def index():
return {"GET": "/"}
# Specify Methods
@app.route('/', methods=['PUT'])
def index_put():
return {"PUT": "/"}
@app.route('/res', methods=['GET', 'POST'])
def my_resource():
request = app.current_request
if request.method == 'GET':
return {"GET": "/res"}
elif request.method == 'POST':
return {"POST": "/res"}
# Path Params
@app.route('/myresources/{object_name}')
def my_resource_key(object_name):
try:
response = S3.get_object(
Bucket = BUCKET, Key = object_name)
return response['Body'].read()
except ClientError as e:
raise e
@app.route('/s3/{bucket_name}/objects')
def objects_of(bucket_name):
try:
response =
S3.list_objects_v2(Bucket=bucket_name,
Prefix = S3_PREFIX)
objects = list(map(lambda x: x["Key"],
response["Contents"]))
return {"objects": objects}
except ClientError as e:
raise ...
@app.route('/')
def index():
return Response(
body = 'hello world!',
status_code = 200,
headers = {'Content-Type': 'text/plain'}
)
@app.route('/',
cors=True,
api_key_required=True,
authorizer=IAMAuthorizer())
def index():
return "yey"
@app.schedule(Rate(1,	unit=Rate.HOURS))
def every_hour(event):
print(event.to_dict())
•
•
•
•
•
class Chalice(object):
def route(self, path, **kwargs): #
def _register_view(view_func):
self._add_route(path, view_func, **kwargs)
return view_func
return _register_view
def _add_route(self, path, view_func, **kwargs):
methods = kwargs.pop('methods', ['GET'])
...
for method in methods:
...
entry = RouteEntry(view_func, name,
path, method, api_key_required, content_types, cors,
authorizer)
self.routes[path][method] = entry
class Chalice(object):
def __call__(self, event, context): #
resource_path = event.get('requestContext',
{}).get('resourcePath')
http_method = event['requestContext']['httpMethod']
route_entry = self.routes[resource_path][http_method]
view_function = route_entry.view_function
function_args = {name: event['pathParameters'][name]
for name in route_entry.view_args}
...
response = self._get_view_function_response(view_function,
function_args)
response_headers = CaseInsensitiveMapping(response.headers)
...
response = response.to_dict(self.api.binary_types)
return response
class Chalice(object):
def _get_view_function_response(self, view_function, function_args):
try:
response = view_function(**function_args)
if not isinstance(response, Response):
response = Response(body=response)
self._validate_response(response)
except ChaliceViewError as e:
response = Response(...)
except Exception as e:
headers = {}
if self.debug:
...
else:
response = Response(..., status_code=500)
return response
https://speakerdeck.com/akitsukada/sabaresudewang-dao-webhuremuwakuwoshi-ufang-fa
https://www.slideshare.net/shimy_net/aws-79149218
https://www.slideshare.net/shimy_net/cloud-roadshow-2017-osaka
•
•
•
https://github.com/kislyuk/domovoi
@app.sns_topic_subscriber("bartender")
def tend(event, context):
message = json.loads(event["Records"][0]["Sns"]["Message"])
context.log(dict(beer="Quadrupel", quantity=message["beer"]))
@app.cloudwatch_event_handler(source=["aws.ecs"])
def monitor_ecs_events(event, context):
message = json.loads(event["Records"][0]["Sns"]["Message"])
context.log("Got an event from ECS: {}".format(message))
@app.s3_event_handler(bucket="myS3bucket",
events=["s3:ObjectCreated:*"], prefix="foo", suffix=".bar")
def monitor_s3(event, context):
message = json.loads(event["Records"][0]["Sns"]["Message"])
context.log("Got an event from S3: {}".format(message))
•
•
•
•
•
•
•
RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜
RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜

More Related Content

What's hot

A Crash Course on Serverless Applications in Python
A Crash Course on Serverless Applications in PythonA Crash Course on Serverless Applications in Python
A Crash Course on Serverless Applications in Python
James Saryerwinnie
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
Amazon Web Services
 
Serverless Developer Experience
Serverless Developer ExperienceServerless Developer Experience
Serverless Developer Experience
Amazon Web Services
 
Building Global Serverless Backends
Building Global Serverless BackendsBuilding Global Serverless Backends
Building Global Serverless BackendsAmazon Web Services
 
Why your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSyncWhy your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSync
Yan Cui
 
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
Amazon Web Services
 
Serverless - State Of the Union
Serverless - State Of the UnionServerless - State Of the Union
Serverless - State Of the Union
Amazon Web Services
 
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
Amazon Web Services
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
Amazon Web Services
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
Amazon Web Services
 
Serverless in production, an experience report (London DevOps)
Serverless in production, an experience report (London DevOps)Serverless in production, an experience report (London DevOps)
Serverless in production, an experience report (London DevOps)
Yan Cui
 
DevOps for the Enterprise: Automating Deployments
DevOps for the Enterprise: Automating DeploymentsDevOps for the Enterprise: Automating Deployments
DevOps for the Enterprise: Automating Deployments
Amazon Web Services
 
CON307_Building Effective Container Images
CON307_Building Effective Container ImagesCON307_Building Effective Container Images
CON307_Building Effective Container Images
Amazon Web Services
 
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
Amazon Web Services
 
Development Workflows on AWS
Development Workflows on AWSDevelopment Workflows on AWS
Development Workflows on AWS
Amazon Web Services
 
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Amazon Web Services
 
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Atlassian
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Amazon Web Services
 

What's hot (19)

A Crash Course on Serverless Applications in Python
A Crash Course on Serverless Applications in PythonA Crash Course on Serverless Applications in Python
A Crash Course on Serverless Applications in Python
 
Deep Dive into AWS Fargate
Deep Dive into AWS FargateDeep Dive into AWS Fargate
Deep Dive into AWS Fargate
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Serverless Developer Experience
Serverless Developer ExperienceServerless Developer Experience
Serverless Developer Experience
 
Building Global Serverless Backends
Building Global Serverless BackendsBuilding Global Serverless Backends
Building Global Serverless Backends
 
Why your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSyncWhy your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSync
 
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
 
Serverless - State Of the Union
Serverless - State Of the UnionServerless - State Of the Union
Serverless - State Of the Union
 
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
Stop Worrying about Prodweb001 and Start Loving i-98fb9856 (ARC201) | AWS re:...
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
Serverless in production, an experience report (London DevOps)
Serverless in production, an experience report (London DevOps)Serverless in production, an experience report (London DevOps)
Serverless in production, an experience report (London DevOps)
 
DevOps for the Enterprise: Automating Deployments
DevOps for the Enterprise: Automating DeploymentsDevOps for the Enterprise: Automating Deployments
DevOps for the Enterprise: Automating Deployments
 
CON307_Building Effective Container Images
CON307_Building Effective Container ImagesCON307_Building Effective Container Images
CON307_Building Effective Container Images
 
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
NEW LAUNCH! Introducing AWS Fargate - CON214 - re:Invent 2017
 
Development Workflows on AWS
Development Workflows on AWSDevelopment Workflows on AWS
Development Workflows on AWS
 
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
Interstella 8888: CICD for Containers on AWS - CON319 - re:Invent 2017
 
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
Satellite Apps around the Cloud: Integrating your infrastructure with JIRA St...
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
 

Similar to RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜

【AWS Developers Meetup】RESTful APIをChaliceで紐解く
【AWS Developers Meetup】RESTful APIをChaliceで紐解く【AWS Developers Meetup】RESTful APIをChaliceで紐解く
【AWS Developers Meetup】RESTful APIをChaliceで紐解く
Amazon Web Services Japan
 
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
LaunchAny
 
AWS re:Invent 2016: Chalice: A Serverless Microframework for Python (DEV308)
AWS re:Invent 2016: Chalice: A Serverless Microframework for Python (DEV308)AWS re:Invent 2016: Chalice: A Serverless Microframework for Python (DEV308)
AWS re:Invent 2016: Chalice: A Serverless Microframework for Python (DEV308)
Amazon Web Services
 
Building Serverless Applications with AWS Chalice
Building Serverless Applications with AWS ChaliceBuilding Serverless Applications with AWS Chalice
Building Serverless Applications with AWS Chalice
Amazon Web Services
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
Darren Craig
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby ConfEffectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Conf
neal_kemp
 
Socket applications
Socket applicationsSocket applications
Socket applicationsJoão Moura
 
REST API for your WP7 App
REST API for your WP7 AppREST API for your WP7 App
REST API for your WP7 App
Agnius Paradnikas
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
Jeremy Lindblom
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
AWS Chicago
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
Lindsay Holmwood
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js frameworkBen Lin
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
Dylan Jay
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
Hisateru Tanaka
 
Easy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp NomadEasy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp Nomad
Bram Vogelaar
 
QConSP 2015 - Dicas de Performance para Aplicações Web
QConSP 2015 - Dicas de Performance para Aplicações WebQConSP 2015 - Dicas de Performance para Aplicações Web
QConSP 2015 - Dicas de Performance para Aplicações Web
Fabio Akita
 
Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605
Robin Fernandes
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
Jonathan Wage
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
Alex Rupérez
 

Similar to RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜 (20)

【AWS Developers Meetup】RESTful APIをChaliceで紐解く
【AWS Developers Meetup】RESTful APIをChaliceで紐解く【AWS Developers Meetup】RESTful APIをChaliceで紐解く
【AWS Developers Meetup】RESTful APIをChaliceで紐解く
 
Using Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in RubyUsing Sinatra to Build REST APIs in Ruby
Using Sinatra to Build REST APIs in Ruby
 
AWS re:Invent 2016: Chalice: A Serverless Microframework for Python (DEV308)
AWS re:Invent 2016: Chalice: A Serverless Microframework for Python (DEV308)AWS re:Invent 2016: Chalice: A Serverless Microframework for Python (DEV308)
AWS re:Invent 2016: Chalice: A Serverless Microframework for Python (DEV308)
 
Building Serverless Applications with AWS Chalice
Building Serverless Applications with AWS ChaliceBuilding Serverless Applications with AWS Chalice
Building Serverless Applications with AWS Chalice
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Effectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby ConfEffectively Testing Services - Burlington Ruby Conf
Effectively Testing Services - Burlington Ruby Conf
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
REST API for your WP7 App
REST API for your WP7 AppREST API for your WP7 App
REST API for your WP7 App
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Easy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp NomadEasy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp Nomad
 
QConSP 2015 - Dicas de Performance para Aplicações Web
QConSP 2015 - Dicas de Performance para Aplicações WebQConSP 2015 - Dicas de Performance para Aplicações Web
QConSP 2015 - Dicas de Performance para Aplicações Web
 
Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
Gigigo Rails Workshop
Gigigo Rails WorkshopGigigo Rails Workshop
Gigigo Rails Workshop
 

More from 崇之 清水

知らなきゃ損なアップデートを振り返り(2020年分)- いにしえのサービスから勝手にチョイス
知らなきゃ損なアップデートを振り返り(2020年分)- いにしえのサービスから勝手にチョイス知らなきゃ損なアップデートを振り返り(2020年分)- いにしえのサービスから勝手にチョイス
知らなきゃ損なアップデートを振り返り(2020年分)- いにしえのサービスから勝手にチョイス
崇之 清水
 
マイクロサービスを AWS サーバレス&コンテナで実装する方法
マイクロサービスを AWS サーバレス&コンテナで実装する方法マイクロサービスを AWS サーバレス&コンテナで実装する方法
マイクロサービスを AWS サーバレス&コンテナで実装する方法
崇之 清水
 
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
崇之 清水
 
AWS 主要なサービスアップデート 6/3-11/28
AWS 主要なサービスアップデート 6/3-11/28AWS 主要なサービスアップデート 6/3-11/28
AWS 主要なサービスアップデート 6/3-11/28
崇之 清水
 
5分でサーバーレスの環境構築から本番デプロイまでやったろやないか! - Serverless Meetup Osaka #4 LT
5分でサーバーレスの環境構築から本番デプロイまでやったろやないか! - Serverless Meetup Osaka #4 LT5分でサーバーレスの環境構築から本番デプロイまでやったろやないか! - Serverless Meetup Osaka #4 LT
5分でサーバーレスの環境構築から本番デプロイまでやったろやないか! - Serverless Meetup Osaka #4 LT
崇之 清水
 
サーバレスアプリケーションの入門と実践 - AWS Cloud Roadshow 2017 Osaka
サーバレスアプリケーションの入門と実践 - AWS Cloud Roadshow 2017 Osakaサーバレスアプリケーションの入門と実践 - AWS Cloud Roadshow 2017 Osaka
サーバレスアプリケーションの入門と実践 - AWS Cloud Roadshow 2017 Osaka
崇之 清水
 
データ分析 on AWS
データ分析 on AWSデータ分析 on AWS
データ分析 on AWS
崇之 清水
 
日本語でおk AI スピーカーを作ってみた
日本語でおk AI スピーカーを作ってみた日本語でおk AI スピーカーを作ってみた
日本語でおk AI スピーカーを作ってみた
崇之 清水
 
Amazon Web Services (AWS) のご紹介
Amazon Web Services (AWS) のご紹介Amazon Web Services (AWS) のご紹介
Amazon Web Services (AWS) のご紹介
崇之 清水
 
Amazon AI のスゴいデモ(仮) - Serverless Meetup Osaka
Amazon AI のスゴいデモ(仮) - Serverless Meetup OsakaAmazon AI のスゴいデモ(仮) - Serverless Meetup Osaka
Amazon AI のスゴいデモ(仮) - Serverless Meetup Osaka
崇之 清水
 
Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207
Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207
Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207
崇之 清水
 
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜 AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
崇之 清水
 
WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016
WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016
WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016
崇之 清水
 
Amazon API Gateway を活用したゲームサーバー構築
Amazon API Gateway を活用したゲームサーバー構築Amazon API Gateway を活用したゲームサーバー構築
Amazon API Gateway を活用したゲームサーバー構築
崇之 清水
 
関西スタートアップAWS勉強会 スタートアップ最新事例
関西スタートアップAWS勉強会 スタートアップ最新事例関西スタートアップAWS勉強会 スタートアップ最新事例
関西スタートアップAWS勉強会 スタートアップ最新事例
崇之 清水
 
スタートアップ向け構成例とAWS活用事例(福岡市スタートアップカフェ)
スタートアップ向け構成例とAWS活用事例(福岡市スタートアップカフェ)スタートアップ向け構成例とAWS活用事例(福岡市スタートアップカフェ)
スタートアップ向け構成例とAWS活用事例(福岡市スタートアップカフェ)
崇之 清水
 
Amazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKAAmazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKA
崇之 清水
 
SA プライムなう! - AWS IoT とロボットアームでお絵かき
SA プライムなう! - AWS IoT とロボットアームでお絵かきSA プライムなう! - AWS IoT とロボットアームでお絵かき
SA プライムなう! - AWS IoT とロボットアームでお絵かき
崇之 清水
 
Amazon Aurora の活用
Amazon Aurora の活用Amazon Aurora の活用
Amazon Aurora の活用
崇之 清水
 
CTO Night & Days 2015 Winter - AWS Mobile Testing
CTO Night & Days 2015 Winter - AWS Mobile TestingCTO Night & Days 2015 Winter - AWS Mobile Testing
CTO Night & Days 2015 Winter - AWS Mobile Testing
崇之 清水
 

More from 崇之 清水 (20)

知らなきゃ損なアップデートを振り返り(2020年分)- いにしえのサービスから勝手にチョイス
知らなきゃ損なアップデートを振り返り(2020年分)- いにしえのサービスから勝手にチョイス知らなきゃ損なアップデートを振り返り(2020年分)- いにしえのサービスから勝手にチョイス
知らなきゃ損なアップデートを振り返り(2020年分)- いにしえのサービスから勝手にチョイス
 
マイクロサービスを AWS サーバレス&コンテナで実装する方法
マイクロサービスを AWS サーバレス&コンテナで実装する方法マイクロサービスを AWS サーバレス&コンテナで実装する方法
マイクロサービスを AWS サーバレス&コンテナで実装する方法
 
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現クラウドを活用したセンシング/モニタリングなどデータ分析の実現
クラウドを活用したセンシング/モニタリングなどデータ分析の実現
 
AWS 主要なサービスアップデート 6/3-11/28
AWS 主要なサービスアップデート 6/3-11/28AWS 主要なサービスアップデート 6/3-11/28
AWS 主要なサービスアップデート 6/3-11/28
 
5分でサーバーレスの環境構築から本番デプロイまでやったろやないか! - Serverless Meetup Osaka #4 LT
5分でサーバーレスの環境構築から本番デプロイまでやったろやないか! - Serverless Meetup Osaka #4 LT5分でサーバーレスの環境構築から本番デプロイまでやったろやないか! - Serverless Meetup Osaka #4 LT
5分でサーバーレスの環境構築から本番デプロイまでやったろやないか! - Serverless Meetup Osaka #4 LT
 
サーバレスアプリケーションの入門と実践 - AWS Cloud Roadshow 2017 Osaka
サーバレスアプリケーションの入門と実践 - AWS Cloud Roadshow 2017 Osakaサーバレスアプリケーションの入門と実践 - AWS Cloud Roadshow 2017 Osaka
サーバレスアプリケーションの入門と実践 - AWS Cloud Roadshow 2017 Osaka
 
データ分析 on AWS
データ分析 on AWSデータ分析 on AWS
データ分析 on AWS
 
日本語でおk AI スピーカーを作ってみた
日本語でおk AI スピーカーを作ってみた日本語でおk AI スピーカーを作ってみた
日本語でおk AI スピーカーを作ってみた
 
Amazon Web Services (AWS) のご紹介
Amazon Web Services (AWS) のご紹介Amazon Web Services (AWS) のご紹介
Amazon Web Services (AWS) のご紹介
 
Amazon AI のスゴいデモ(仮) - Serverless Meetup Osaka
Amazon AI のスゴいデモ(仮) - Serverless Meetup OsakaAmazon AI のスゴいデモ(仮) - Serverless Meetup Osaka
Amazon AI のスゴいデモ(仮) - Serverless Meetup Osaka
 
Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207
Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207
Amazon Pinpoint - re:Invent Serverless Follow Up - 20161207
 
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜 AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
AWS SDK for PHP のインストールから 始めるクラウドマスターへの道 〜 Promise による非同期オペレーション 〜
 
WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016
WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016
WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016
 
Amazon API Gateway を活用したゲームサーバー構築
Amazon API Gateway を活用したゲームサーバー構築Amazon API Gateway を活用したゲームサーバー構築
Amazon API Gateway を活用したゲームサーバー構築
 
関西スタートアップAWS勉強会 スタートアップ最新事例
関西スタートアップAWS勉強会 スタートアップ最新事例関西スタートアップAWS勉強会 スタートアップ最新事例
関西スタートアップAWS勉強会 スタートアップ最新事例
 
スタートアップ向け構成例とAWS活用事例(福岡市スタートアップカフェ)
スタートアップ向け構成例とAWS活用事例(福岡市スタートアップカフェ)スタートアップ向け構成例とAWS活用事例(福岡市スタートアップカフェ)
スタートアップ向け構成例とAWS活用事例(福岡市スタートアップカフェ)
 
Amazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKAAmazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKA
 
SA プライムなう! - AWS IoT とロボットアームでお絵かき
SA プライムなう! - AWS IoT とロボットアームでお絵かきSA プライムなう! - AWS IoT とロボットアームでお絵かき
SA プライムなう! - AWS IoT とロボットアームでお絵かき
 
Amazon Aurora の活用
Amazon Aurora の活用Amazon Aurora の活用
Amazon Aurora の活用
 
CTO Night & Days 2015 Winter - AWS Mobile Testing
CTO Night & Days 2015 Winter - AWS Mobile TestingCTO Night & Days 2015 Winter - AWS Mobile Testing
CTO Night & Days 2015 Winter - AWS Mobile Testing
 

Recently uploaded

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 

Recently uploaded (20)

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 

RESTful API を Chalice で紐解く 〜 Python Serverless Microframework for AWS 〜

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 8.
  • 9.
  • 10.
  • 13.
  • 15. Auto Scaling group Security group Elastic Load Balancing Instance REST API Amazon DynamoDB Amazon CloudWatch Amazon S3
  • 17.
  • 18. Lambda.GetFunction(params: {'body': '', 'url': u'https://lambda.us-west-2.amazonaws.com/2015-03-31 IAM.GetRole(params: {'body': {'Action': u'GetRole', 'RoleName': u'helloworld7', 'Version': u'2010- IAM.CreateRole(params: {'body': {'Action': u'CreateRole', 'RoleName': u'helloworld7', 'Version': u IAM.PutRolePolicy(params: {'body': {'Action': u'PutRolePolicy', 'RoleName': u'helloworld7', 'Polic Lambda.CreateFunction(params: (... omitted from logs due to size ...) APIGateway.GetRestApis(params: {'body': '', 'url': u'https://apigateway.us-west-2.amazonaws.com/re APIGateway.CreateRestApi(params: {'body': '{"name": "helloworld7"}', 'url': u'https://apigateway.u APIGateway.GetResources(params: {'body': '', 'url': u'https://apigateway.us-west-2.amazonaws.com/r APIGateway.PutMethod(params: {'body': '{"authorizationType": "NONE"}', 'url': u'https://apigateway APIGateway.PutIntegration(params: {'body': '{"httpMethod": "POST", "requestTemplates": {"applicati APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}', APIGateway.PutIntegrationResponse(params: {'body': '{"responseTemplates": {"application/json": ""} APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}', APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "ChaliceViewError.*", "re APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}', APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "BadRequestError.*", "res APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}', APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "NotFoundError.*", "respo APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}', APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "UnauthorizedError.*", "r APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}', APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "ForbiddenError.*", "resp APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}', APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "ConflictError.*", "respo APIGateway.PutMethodResponse(params: {'body': '{"responseModels": {"application/json": "Empty"}}', APIGateway.PutIntegrationResponse(params: {'body': '{"selectionPattern": "TooManyRequestsError.*", Lambda.GetPolicy(params: {'body': '', 'url': u'https://lambda.us-west-2.amazonaws.com/2015-03-31/f Lambda.AddPermission(params: {'body': '{"Action": "lambda:InvokeFunction", "StatementId": "1e96468 APIGatewayCreateDeployment(params: {'body': '{"stageName": "dev"}', 'url': u'https://apigateway.us API # AWS SAM
  • 19.
  • 22. $ pip install chalice $ chalice new-project helloworld && cd helloworld $ cat app.py from chalice import Chalice app = Chalice(app_name="helloworld") @app.route("/") def index(): return {"hello": "world"}
  • 23. $ chalice deploy ... https://endpoint/api $ curl https://endpoint/api {"hello": "world"}
  • 24. $ git diff from chalice import Chalice +import boto3 app = Chalice(app_name='chalice-sample') +S3 = boto3.client('s3', region_name='us-east-1') @app.route('/') def index(): + S3.get_object(Bucket = BUCKET, Key = key) return {'hello': 'world'}
  • 25. $ chalice deploy Creating role: chalice-sample-dev The following execution policy will be used: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject" ], "Resource": ["*"], "Sid": "40e10c45a..." }, ... } Would you like to continue? [Y/n]:
  • 26. $ chalice local Serving on localhost:8000 $ npm install -g nodemon $ nodemon --exec "chalice local" --watch *.py [nodemon] 1.12.5 [nodemon] to restart at any time, enter `rs` [nodemon] watching: app.py [nodemon] starting `chalice local` Serving on localhost:8000 see@ https://qiita.com/TakenoriHirao/items/69f2af5aaf64db77124b
  • 28.
  • 29. # Basic Definition @app.route('/') def index(): return {"GET": "/"}
  • 30. # Specify Methods @app.route('/', methods=['PUT']) def index_put(): return {"PUT": "/"}
  • 31. @app.route('/res', methods=['GET', 'POST']) def my_resource(): request = app.current_request if request.method == 'GET': return {"GET": "/res"} elif request.method == 'POST': return {"POST": "/res"}
  • 32. # Path Params @app.route('/myresources/{object_name}') def my_resource_key(object_name): try: response = S3.get_object( Bucket = BUCKET, Key = object_name) return response['Body'].read() except ClientError as e: raise e
  • 33. @app.route('/s3/{bucket_name}/objects') def objects_of(bucket_name): try: response = S3.list_objects_v2(Bucket=bucket_name, Prefix = S3_PREFIX) objects = list(map(lambda x: x["Key"], response["Contents"])) return {"objects": objects} except ClientError as e: raise ...
  • 34. @app.route('/') def index(): return Response( body = 'hello world!', status_code = 200, headers = {'Content-Type': 'text/plain'} )
  • 35.
  • 37.
  • 39. class Chalice(object): def route(self, path, **kwargs): # def _register_view(view_func): self._add_route(path, view_func, **kwargs) return view_func return _register_view def _add_route(self, path, view_func, **kwargs): methods = kwargs.pop('methods', ['GET']) ... for method in methods: ... entry = RouteEntry(view_func, name, path, method, api_key_required, content_types, cors, authorizer) self.routes[path][method] = entry
  • 40. class Chalice(object): def __call__(self, event, context): # resource_path = event.get('requestContext', {}).get('resourcePath') http_method = event['requestContext']['httpMethod'] route_entry = self.routes[resource_path][http_method] view_function = route_entry.view_function function_args = {name: event['pathParameters'][name] for name in route_entry.view_args} ... response = self._get_view_function_response(view_function, function_args) response_headers = CaseInsensitiveMapping(response.headers) ... response = response.to_dict(self.api.binary_types) return response
  • 41. class Chalice(object): def _get_view_function_response(self, view_function, function_args): try: response = view_function(**function_args) if not isinstance(response, Response): response = Response(body=response) self._validate_response(response) except ChaliceViewError as e: response = Response(...) except Exception as e: headers = {} if self.debug: ... else: response = Response(..., status_code=500) return response
  • 42.
  • 47. @app.sns_topic_subscriber("bartender") def tend(event, context): message = json.loads(event["Records"][0]["Sns"]["Message"]) context.log(dict(beer="Quadrupel", quantity=message["beer"])) @app.cloudwatch_event_handler(source=["aws.ecs"]) def monitor_ecs_events(event, context): message = json.loads(event["Records"][0]["Sns"]["Message"]) context.log("Got an event from ECS: {}".format(message)) @app.s3_event_handler(bucket="myS3bucket", events=["s3:ObjectCreated:*"], prefix="foo", suffix=".bar") def monitor_s3(event, context): message = json.loads(event["Records"][0]["Sns"]["Message"]) context.log("Got an event from S3: {}".format(message))
  • 48.