SlideShare a Scribd company logo
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
v
v
v
v
v
v
v
v
v
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
•
•
•
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo: Remote Pair Programming
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Live Remote Pair Programming
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
•
•
•
•
•
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
•
•
•
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
demo – AWS CodeStar
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS
CodeCommit
AWS
CodeBuild
Source Repository Build Deploy
Or
AWS Cloud9
AWS CodeStar
AWS Lambda
Author
AWS
CodePipeline
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda
AWS CodeBuild BuildSpec
Lambda (Python)
AWS CodeStar sample readme
SAM
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
import json
import datetime
def handler(event, context):
print(event)
data = {
'output': 'Hello World!!!',
'timestamp': datetime.datetime.utcnow().isoformat()
}
return {'statusCode': 200,
'body': json.dumps(data),
'headers': {'Content-Type': 'application/json'}}
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
import unittest
import index
class TestHandlerCase(unittest.TestCase):
def test_response(self):
print("testing response.")
result = index.handler(None, None)
print(result)
self.assertEqual(result['statusCode'], 200)
self.assertEqual(result['headers']['Content-Type'], 'application/json')
self.assertIn('Hello World', result['body'])
if __name__ == '__main__':
unittest.main() # run unit test
$ python -m unittest discover tests
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
version: 0.2
phases:
install:
commands:
# Upgrade AWS CLI to the latest version
- pip install --upgrade awscli
pre_build:
commands:
# Discover and run unit tests in the 'tests' directory. For more information, see <https://docs.python.org/3/library/unittest.html#test-discovery>
- python -m unittest discover tests
build:
commands:
# Use AWS SAM to package the application by using AWS CloudFormation
- aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template template-export.yml
artifacts:
type: zip
files:
- template-export.yml
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWSTemplateFormatVersion: 2010-09-09
Transform:
- AWS::Serverless-2016-10-31
- AWS::CodeStar
Parameters:
ProjectId:
Type: String
Description: CodeStar projectId used to associate new resources to team members
# Enable blue/green deployments using this Globals section. For instructions, see the AWS CodeStar User Guide:
# https://docs.aws.amazon.com/codestar/latest/userguide/how-to-modify-serverless-project.html?icmpid=docs_acs_rm_tr
#
# Globals:
# Function:
# AutoPublishAlias: live
# DeploymentPreference:
# Enabled: true
# Type: Canary10Percent5Minutes
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Resources:
HelloWorld:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: python3.6
Role:
Fn::ImportValue:
!Join ['-', [!Ref 'ProjectId', !Ref 'AWS::Region', 'LambdaTrustRole']]
Events:
GetEvent:
Type: Api
Properties:
Path: /
Method: get
PostEvent:
Type: Api
Properties:
Path: /
Method: post
Lambda
Lambda
Lambda
Role ARN
: API Gateway (GET)
: API Gateway (POST)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Code Services
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
AWS CodeBuild
+ Third Party
AWS CodeCommit AWS CodeBuild AWS CodeDeploy
AWS CodePipeline
AWS
CodeStar
Source Build Test Deploy Monitor
AWS X-Ray
Amazon
CloudWatch
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Storing your code
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
version: 0.1
environment_variables:
plaintext:
JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64"
phases:
install:
commands:
- apt-get update -y
- apt-get install -y maven
pre_build:
commands:
- echo Nothing to do in the pre_build phase...
build:
commands:
- echo Build started on `date`
- mvn install
post_build:
commands:
- echo Build completed on `date`
artifacts:
type: zip
files:
- target/messageUtil-1.0.jar
discard-paths: yes
•
•
•
•
•
•
•
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
•
•
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Happy Python Coding!

More Related Content

PDF
Django REST Framework における API 実装プラクティス | PyCon JP 2018
PDF
Dip Your Toes in the Sea of Security (ConFoo YVR 2017)
PDF
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
PDF
Crafting Quality PHP Applications (ConFoo YVR 2017)
PDF
Crafting Quality PHP Applications (PHP Benelux 2018)
PPTX
Designing and developing mobile web applications with Mockup, Sencha Touch an...
PDF
Elasticsearch intro output
PDF
Ams adapters
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Dip Your Toes in the Sea of Security (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (PHP Benelux 2018)
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Elasticsearch intro output
Ams adapters

What's hot (10)

PDF
The journey of an (un)orthodox optimization
PDF
Best practices for crafting high quality PHP apps (PHP South Africa 2018)
PDF
Enter the app era with ruby on rails
PPTX
Web API Filtering - Challenges, Approaches, and a New Tool
PPTX
MapReduce with Scalding @ 24th Hadoop London Meetup
PPTX
Comparing 30 Elastic Search operations with Oracle SQL statements
PDF
Crafting Quality PHP Applications (Bucharest Tech Week 2017)
DOC
PHP code examples
PPTX
Preparing a WordPress Plugin for Translation
PDF
Lesson In Swift Through Haskell
The journey of an (un)orthodox optimization
Best practices for crafting high quality PHP apps (PHP South Africa 2018)
Enter the app era with ruby on rails
Web API Filtering - Challenges, Approaches, and a New Tool
MapReduce with Scalding @ 24th Hadoop London Meetup
Comparing 30 Elastic Search operations with Oracle SQL statements
Crafting Quality PHP Applications (Bucharest Tech Week 2017)
PHP code examples
Preparing a WordPress Plugin for Translation
Lesson In Swift Through Haskell
Ad

Similar to 「リモートペアプロでマントルを突き抜けろ!」AWS Cloud9でリモートペアプロ&楽々サーバーレス開発 (20)

PDF
GitHub to Lambda: Developing, testing and deploying serverless apps::Faten He...
PDF
DevOps Spain 2019. Pedro Mendoza-AWS
PDF
AWS CodeStar 및 Cloud9을 통한 서버리스(Serverless) 앱 개발 길잡이 - 윤석찬 (AWS 테크에반젤리스트)
PDF
20201012 - Serverless Architecture Conference - Deploying serverless applicat...
PDF
The serverless LAMP stack
PDF
Amazon SageMaker 推論エンドポイントを利用したアプリケーション開発
PPTX
AWS Serverless with Chalice
PDF
AWS Lambda 자세히 살펴보기 (조성열, AWS 시스템 엔지니어) :: AWS DevDay2018
PDF
Community day _aws_ci_cd_v0.2
PPTX
Building self service framework
PDF
Amazon Polly와 Cloud9을 활용한 서버리스 웹 애플리케이션 및 CI/CD 배포 프로세스 구축 (김현수, AWS 솔루션즈 아키텍...
PDF
What’s new in serverless - re:Invent 2020
PDF
Serverless applications with AWS
PDF
How to Use AWS Lambda Layers and Lambda Runtime
PDF
AWS における サーバーレスの基礎からチューニングまで
PDF
Legacy java ee meet lambda
PPTX
Devops on AWS
PDF
GraphQL backend with AWS AppSync & AWS Lambda
PDF
Continuous Integration and Continuous Delivery for your serverless apps - Seb...
PDF
マイクロサービスを AWS サーバレス&コンテナで実装する方法
GitHub to Lambda: Developing, testing and deploying serverless apps::Faten He...
DevOps Spain 2019. Pedro Mendoza-AWS
AWS CodeStar 및 Cloud9을 통한 서버리스(Serverless) 앱 개발 길잡이 - 윤석찬 (AWS 테크에반젤리스트)
20201012 - Serverless Architecture Conference - Deploying serverless applicat...
The serverless LAMP stack
Amazon SageMaker 推論エンドポイントを利用したアプリケーション開発
AWS Serverless with Chalice
AWS Lambda 자세히 살펴보기 (조성열, AWS 시스템 엔지니어) :: AWS DevDay2018
Community day _aws_ci_cd_v0.2
Building self service framework
Amazon Polly와 Cloud9을 활용한 서버리스 웹 애플리케이션 및 CI/CD 배포 프로세스 구축 (김현수, AWS 솔루션즈 아키텍...
What’s new in serverless - re:Invent 2020
Serverless applications with AWS
How to Use AWS Lambda Layers and Lambda Runtime
AWS における サーバーレスの基礎からチューニングまで
Legacy java ee meet lambda
Devops on AWS
GraphQL backend with AWS AppSync & AWS Lambda
Continuous Integration and Continuous Delivery for your serverless apps - Seb...
マイクロサービスを AWS サーバレス&コンテナで実装する方法
Ad

More from Atsushi Fukui (11)

PDF
[AWS Developers Meetup 2017] Developerのための ライブAWSウォークスルー 〜 AWS SDKの使い方 〜
PDF
20170809 AWS code series
PPTX
Introducing C# in AWS Lambda
PDF
VSUGアーキテクトパネル アーキテクトはテクノロジーの進化にどのように対応してきたか
PDF
Introduction to application architecture on asp.net mvc
PDF
Architecture driven development のすすめ
PPTX
Entity Framework 5.0 deep dive
PDF
VSUG Day 2010 Summer - Using ADO.NET Entity Framework
PDF
鉄人28号と私
PDF
13_B_5 Who is a architect?
PDF
Vsug Leaders Summit 2008:A.Fukui
[AWS Developers Meetup 2017] Developerのための ライブAWSウォークスルー 〜 AWS SDKの使い方 〜
20170809 AWS code series
Introducing C# in AWS Lambda
VSUGアーキテクトパネル アーキテクトはテクノロジーの進化にどのように対応してきたか
Introduction to application architecture on asp.net mvc
Architecture driven development のすすめ
Entity Framework 5.0 deep dive
VSUG Day 2010 Summer - Using ADO.NET Entity Framework
鉄人28号と私
13_B_5 Who is a architect?
Vsug Leaders Summit 2008:A.Fukui

Recently uploaded (20)

PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Salesforce Agentforce AI Implementation.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
Design an Analysis of Algorithms II-SECS-1021-03
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Reimagine Home Health with the Power of Agentic AI​
Navsoft: AI-Powered Business Solutions & Custom Software Development
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
17 Powerful Integrations Your Next-Gen MLM Software Needs
Advanced SystemCare Ultimate Crack + Portable (2025)
Adobe Illustrator 28.6 Crack My Vision of Vector Design
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Complete Guide to Website Development in Malaysia for SMEs
Design an Analysis of Algorithms I-SECS-1021-03
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Operating system designcfffgfgggggggvggggggggg
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
wealthsignaloriginal-com-DS-text-... (1).pdf
Salesforce Agentforce AI Implementation.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Oracle Fusion HCM Cloud Demo for Beginners

「リモートペアプロでマントルを突き抜けろ!」AWS Cloud9でリモートペアプロ&楽々サーバーレス開発

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. v v v v v v v v v
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • • • • •
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. •
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo: Remote Pair Programming
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. •
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Live Remote Pair Programming
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. • • • • •
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • • • • •
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark demo – AWS CodeStar
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CodeCommit AWS CodeBuild Source Repository Build Deploy Or AWS Cloud9 AWS CodeStar AWS Lambda Author AWS CodePipeline
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda AWS CodeBuild BuildSpec Lambda (Python) AWS CodeStar sample readme SAM
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • •
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. import json import datetime def handler(event, context): print(event) data = { 'output': 'Hello World!!!', 'timestamp': datetime.datetime.utcnow().isoformat() } return {'statusCode': 200, 'body': json.dumps(data), 'headers': {'Content-Type': 'application/json'}}
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. import unittest import index class TestHandlerCase(unittest.TestCase): def test_response(self): print("testing response.") result = index.handler(None, None) print(result) self.assertEqual(result['statusCode'], 200) self.assertEqual(result['headers']['Content-Type'], 'application/json') self.assertIn('Hello World', result['body']) if __name__ == '__main__': unittest.main() # run unit test $ python -m unittest discover tests
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. version: 0.2 phases: install: commands: # Upgrade AWS CLI to the latest version - pip install --upgrade awscli pre_build: commands: # Discover and run unit tests in the 'tests' directory. For more information, see <https://docs.python.org/3/library/unittest.html#test-discovery> - python -m unittest discover tests build: commands: # Use AWS SAM to package the application by using AWS CloudFormation - aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template template-export.yml artifacts: type: zip files: - template-export.yml
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWSTemplateFormatVersion: 2010-09-09 Transform: - AWS::Serverless-2016-10-31 - AWS::CodeStar Parameters: ProjectId: Type: String Description: CodeStar projectId used to associate new resources to team members # Enable blue/green deployments using this Globals section. For instructions, see the AWS CodeStar User Guide: # https://docs.aws.amazon.com/codestar/latest/userguide/how-to-modify-serverless-project.html?icmpid=docs_acs_rm_tr # # Globals: # Function: # AutoPublishAlias: live # DeploymentPreference: # Enabled: true # Type: Canary10Percent5Minutes
  • 27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Resources: HelloWorld: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: python3.6 Role: Fn::ImportValue: !Join ['-', [!Ref 'ProjectId', !Ref 'AWS::Region', 'LambdaTrustRole']] Events: GetEvent: Type: Api Properties: Path: / Method: get PostEvent: Type: Api Properties: Path: / Method: post Lambda Lambda Lambda Role ARN : API Gateway (GET) : API Gateway (POST)
  • 28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Code Services
  • 29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS CodeBuild + Third Party AWS CodeCommit AWS CodeBuild AWS CodeDeploy AWS CodePipeline AWS CodeStar Source Build Test Deploy Monitor AWS X-Ray Amazon CloudWatch
  • 30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Storing your code
  • 31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 33. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 34. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 35. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. version: 0.1 environment_variables: plaintext: JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-amd64" phases: install: commands: - apt-get update -y - apt-get install -y maven pre_build: commands: - echo Nothing to do in the pre_build phase... build: commands: - echo Build started on `date` - mvn install post_build: commands: - echo Build completed on `date` artifacts: type: zip files: - target/messageUtil-1.0.jar discard-paths: yes • • • • • • •
  • 36. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 37. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 38. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 39. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • • • •
  • 40. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Happy Python Coding!