SlideShare a Scribd company logo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1
アマゾンウェブサービスジャパン株式会社
ソリューションアーキテクト 福井 厚
2017.12.12
【AWS Black Belt Online Seminar】
AWSサービスを利用した
アプリケーション開発を始めよう
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2
自己紹介
名前
 福井 厚(ふくい あつし)fatsushi@
所属
 アマゾン ウェブ サービス ジャパン株式会社
 技術統括本部レディネス ソリューション部
 DevOps スペシャリスト ソリューション アーキテクト
前職
 エンタープライズ アプリケーション開発コンサルタント
好きなAWSサービス
 AWS Code シリーズ、AWS Cloud9、AWS Fargate、AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3
内容についての注意点
本資料では2017年12月12日時点のサービス内容および価格についてご説明しています。最
新の情報はAWS公式ウェブサイト(http://aws.amazon.com)にてご確認ください。
• 資料作成には十分注意しておりますが、資料内の価格とAWS公式ウェブサイト記載の価
格に相違があった場合、AWS公式ウェブサイトの価格を優先とさせていただきます。
• 価格は税抜表記となっています。日本居住者のお客様が東京リージョンを使用する場合、
別途消費税をご請求させていただきます。
AWS does not offer binding price quotes. AWS pricing is publicly available and is
subject to change in accordance with the AWS Customer Agreement available at
http://aws.amazon.com/agreement/. Any pricing information included in this
document is provided only as an estimate of usage charges for AWS services based
on certain information that you have provided. Monthly charges will be based on
your actual use of AWS services, and may vary from the estimates provided.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4
Agenda
• AWS上でのアプリケーション開発
• 開発を始める前の準備
• やってみよう
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
5
AWSのサービス操作といえば
マネジメントコンソール
AWS CLI
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
6
AWSの各サービスはAPIを提供
• 各サービスの操作にAPIが定義されている
• マネジメントコンソールまたはAWS CLIから、これら
のAPIをコール
• プログラミングからAPIをコールすることも可能
• 各種開発言語用にSDKを提供
• SIG V4ヘッダの組み立てを行なってくれるので楽
• 高レベルなプログラミング インターフェイスを提供
• HTTP REST APIを直接リクエストすることも可能
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
7
アプリケーションからAWSのサービスを利用
Amazon
S3
Lambda
function
Amazon
DynamoDB
client
user
オブジェクトをS3に
アップロード
S3イベントで
Lambdaを実行
DynamoDBにメタ
データを保存
S3へオブジェクトを
Putするコードを実装
DynamoDBへItemをPut
するコードを実装
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
8
AWS SDK
Ruby AWS CLI
Python (boto)Mobile SDK Node.js
AWS Toolkit
for Visual
Studio
.NET
AWS Toolkit
for Eclipse
PHP
AWS Tools
for Windows
PowerShell
C++
JavaScriptJava
Go
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
9
AWS Mobile SDK
• 高品質なモバイルアプリケーションを
素早く簡単に構築可能に
• AWS Lambda、Amazon S3、Amazon DynamoDB、Amazon
Mobile Analytics、Amazon Machine Learning、Elastic Load
balancing、Auto ScalingなどのAWSサービスへの容易なアクセス
• iOS、Android/Fire OS、Xamarin、Unityのライブラリ、コードサ
ンプル、ドキュメントを提供
• ドキュメント
https://aws.amazon.com/documentation/mobile-sdk/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
10
AWS Mobile SDK
• オープンソースのソフトウェア開発キット
• AWS Mobile SDK for iOS
• 開発環境:Xcode 7 以降、iOS 8 以降
• AWS Mobile SDK for Android
• 開発環境:Android 2.3.3(API Level 10) 以降、Android Studio または Android
Development Tools for Eclipse
• AWS Mobile SDK for .NET and Xamarin
• 対象アプリ:Xamarin iOS、Xamarin Android、Window Phone Silverlight、Windows RT
8.1、Windows Phone 8.1
• 開発環境
• Windows環境:Visual Studio 2013 Update 2、Visual Studio 2015 及び 2017
• Mac環境:MacOS Sierra 10.12 以降、Xcode 8.3
• AWS Mobile SDK for Unity
• 開発環境
• Unity version 4.x または 5.x
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
11
AWS SDK for Python(Boto3)
• Boto3は2つの異なるレベルのAPIを提供
• Client API(低レベル):HTTP APIと1対1でマッピング
• Resource API (高レベル):リソース属性とオブジェクトのコレクショ
ンを提供
• Python 2 及び Python 3 をサポート
• Python version 2.6.5+、2.7、3.3+
• AWSリソースが事前定義された状態に遷移するまでポーリングして
待機するWaitersを提供
• ドキュメント
https://boto3.readthedocs.io/en/latest/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
12
AWS SDK for Java
• AWS SDK for Java 2.0開発者プレビュー
• Amazon S3、Amazon EC2、DynamoDBなどへの容易なアク
セスを提供
• 2.0.0-preview-6 (2017/11/6)
• メジャーバージョンアップとして1.xをリライト
• Java 8をベースに要求の多かった機能を追加
• ノンブロッキングI/O、ブラグイン可能なHTTレイヤー、Clientビ
ルダー、Immutable POJOなど
• https://github.com/aws/aws-sdk-java-v2/
• プレビューなので本番環境への適用は推奨しません
• 1.xは今後もサポート
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
13
AWS SDK for .NET
• サーバーレス アプリケーション開発を含む.NET Core サポート
• Amazon S3 TransferUtility:マルチスレッド化されたAmazon S3マルチパートアップ
ロードを利用することでスループット、パフォーマンス、及び信頼性を向上
• Amazon S3 クライアントサイド暗号化
• Amazon DynamoDBオブジェクト永続化フレームワークを提供
• Amazon Glacier ArchiveTransferManager:高レベルAPIによって、大きなファイルを自
動的にパーツ分割
• Portal Class LibraryとXamarin Projectのサポート:.NET 3.5、.NET 4.5 Framework
に加え、Portable Class Libraryも用意
• Amazon DynamoDB Session State Provider:ASP.NETのセッション状態を
DynamoDBに簡単に格納可能
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
14
AWS SDK for Ruby
• Version 3
• gem install aws-sdk
• サービス特化なgem(aws-sdk-s3など)により、各サービ
スのセマンティックなバージョニングを使用
• aws-sdk-rails:AWS SDK for RubyのRuby on Railsとの統
合を提供
https://github.com/aws/aws-sdk-rails
• aws-record:AWS SDK for Ruby上に構築されたAmazon
DynamoDBの抽象データマッピングを提供
https://github.com/aws/aws-sdk-ruby-record
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
15
その他のSDK
• PHP
• PHP 5.5.0以上
• OpenSSL PHP extension(オプション)
• cURL 7.16.2(推奨)
• Xdebug(パフォーマンスに問題がある場合は、アンインストールを推奨)
• Composer classmap autoloaderの利用
• C++
• Amazon S3のクライアントサイド データ暗号化
• Amazon S3 Transfer Manager
• 幅広いプラットフォームに対応
• CMakeのサポート
• カスタマイズ可能なメモリ管理
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
16
その他のSDK
• Go
• go get –u github.com/aws/aws-sdk-go
• Amazon S3 Transfer Manager:大きなファイルを複数のパートに分
割してS3転送
• Response Paginator:ページ分割された大量のAPI結果を容易に反復
処理可能
• 拡張性:ハンドラーにより、すべてのAPIライフライクルをカスタマイ
ズ可能、モックテスト、エラーシミュレーションを実現
• Node.js
• Npm install aws-sdk
• Var AWS = require(‘aws-sdk’);
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
17
AWS Amplify
• クラウド対応アプリケーションを構築するフロントエンドとモバイ
ル開発者用のJavaScriptライブラリ
• 宣言的インターフェイスでAWS以外のクラウドサービスもブラグ
可能なオープンな設計
• Aws-amplifyライブラリに追加で、Reactアプリケーション用、
React Nativeアプリケーション用ライブラリを提供
• 認証、分析、APIインタラクション、ストレージ、キャッシュ、
i18n及びロギングのカテゴリをサポート
• https://github.com/aws/aws-amplify
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
18
AWS Mobile CLI
• JavaScriptフロントエンド開発者のためにアプリ内でAWSサービスと
設定を有効化するためのコマンドラインインターフェイスを提供
• ターミナルから最小の設定で、AWS Mobile Hubが提供するすべての
機能を利用可能
• AWS Mobile CLIは他の業界標準のコマンドラインインターフェイスに
準拠するように設計
• $ awsmobile のパラメータでMobile Hubの設定取得、更新、S3と
CloudFrontへのパブリッシュなどを実行
http://docs.aws.amazon.com/aws-
mobile/latest/developerguide/web-getting-started.html
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
19
Agenda
• AWS上でのアプリケーション開発
• 開発を始める前の準備
• やってみよう
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
20
開発を始める前の準備
• AWSへのサインアップ
• ユーザーとグループの作成
• AWS CLIのインストールとプロファイルの設定
• AWS SDKのインストール
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
21
開発を始める前の準備
• AWSへのサインアップ
• AWSアカウント作成の流れ
https://aws.amazon.com/jp/register-flow/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
22
開発を始める前の準備
• ユーザーとグループの作成
• IAMユーザーの作成
• IAMグループの作成
• グループへのポリシーの適用
• ユーザーのグループへの追加
• アクセスキーIDとシークレットアクセスキーの生成
• AWS Command Line Interface(AWS CLI)、Tools for
Windows PowerShell、AWS SDK、または直接HTTP呼び出しな
どAWSをプログラムで呼び出すには、ユーザー独自のアクセス
キーが必要
• IAMはアクセスキーIDとシークレットアクセスキーを返す
• これらを安全な場所に保存
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
23
IAMユーザーとグループ作成
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
24
IAMユーザーとグループ作成
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
25
IAMユーザーとグループ作成
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
26
IAMユーザーとグループ作成
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
27
IAMユーザーとグループ作成
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
28
AWS CLIのインストールとプロファイルの作成
• AWS CLIのインストール要件
• Python 2 バージョン 2.6.5+または
Python 3 バージョン 3.3+
• Windows、Linux、MacOS またはUnix
aws configure でクレデンシャル情報、リージョンを保存
$ pip install awcscli --upgrade –user
$ aws configure
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
29
AWS SDKのインストール
• お好みの開発環境を利用可能
• 個々のAWS SDKのインストールについては以下のサイトか
ら各ドキュメントを参照ください
https://aws.amazon.com/jp/tools/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
30
AWS Toolkit
• IDEと統合して、より便利な開発を支援
• AWS Toolkit for Visual Studio
https://aws.amazon.com/jp/visualstudio/
• AWS Toolkit for Eclipse
https://aws.amazon.com/jp/eclipse/?nc1=h_ls
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
31
開発環境(Java)
• AWS Toolkit for Eclipse のインストール
http://docs.aws.amazon.com/toolkit-for-eclipse/v1/user-
guide/setup-install.html
[Help] – [Install New Software]
を選択し下記のURLを指定
https://aws.amazon.com/eclips
e
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
32
AWS Toolkit for Eclipse
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
33
開発環境(.NET)
• AWS Toolkit for Visual Studioのインストール
https://aws.amazon.com/jp/visualstudio/
Visual Studioのバージョンに
よってダウンロードするイン
ストーラーを選択
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
34
AWS Toolkit for Visual Studio
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
35
でも、なんか準備が大変そう。。。
• そんなあなたにオススメなのが、
AWS Cloud9!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
36
クラウドベースの統合開発環境
AWS Cloud9を発表
• AWSクラウド上で開発・テスト・デバッグを完
結できる統合開発環境のサービスを発表。環境
構築に時間を掛けず、即座に開発を始められる
• 初の”クラウドネイティブ”なIDE。Lambdaと
統合され、ファンクションのテストをシームレ
スに実行できる。CodeStarとの統合も
• 自分の開発環境にアクセスできるユーザをIAM
ユーザの単位で設定し、共同作業が可能に
• オレゴン、オハイオ、バージニア、アイルラン
ド、シンガポールのリージョンで利用可能に
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
37
AWS Cloud9 は
• JavaScript、Python、Goなど人気のある開発言語とツール
を同梱
• AWS CLIもインストール済み
• Amazon EC2 インスタンスまたはSSH経由で独自のLinux
サーバー環境に開発環境を構築可能
• AWS Cloud9 ダッシュボードを利用して、多数のAWS
Cloud9 環境を切り替え可能
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
38
AWS Cloud9環境のセットアップ
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
39
リージョンの選択
”Select a Region”をクリック
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
40
リージョンの選択 環境を作成したいリージョンを選
択
現在は、
・オレゴン、
・オハイオ
・北バージニア
・アイルランド
・シンガポール
で、利用可能
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
41
環境の作成
”Create Environment”をクリック
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
42
名前と説明の入力
環境名と説明を入力したら
“Next Step”をクリック
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
43
設定画面
“Next Step”をクリック
“Create a new instance for envrionment
(EC2)” か“Connect and run in remote
Server (SSH)” を選択
インスタンスタイプを選択し、コスト
セービング オプションを選択
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
44
環境名と設定を確認し、作成
設定を確認して、“Create
environment”をクリック
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
45
数分で、AWS Cloud9環境が!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
46
Agenda
• AWS上でのアプリケーション開発
• 開発を始める前の準備
• 開発環境
• やってみよう
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
47
Demo!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
48
指定した名前で始まるS3のバケット名の取得(例)
import boto3
def listBuckets(bucketName):
s3client = boto3.client('s3')
resource = s3client.list_buckets()
for bucket in resource['Buckets']:
if bucket['Name'].startswith(bucketName):
print("Bucket: %s" % bucket['Name'])
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
49
S3のバケットの作成(例)
import boto3
def createBucket(bucketName) :
s3client = boto3.client('s3')
s3client.create_bucket(Bucket=bucketName)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
50
S3のバケットの削除(例)
import boto3
def deleteBucket(bucketName) :
s3client = boto3.client('s3')
s3client.delete_bucket(Bucket=bucketName)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
51
SQSのキューの作成(例)
import boto3
def createQueue(name):
sqs = boto3.resource('sqs')
queue = sqs.create_queue(
QueueName=name, Attributes={'DelaySeconds':'5'})
return queue.url
url = createQueue("myqueue")
print("url : %s" % url)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
52
SQSのキューの取得(例)
import boto3
def getQueue(name):
sqs = boto3.resource("sqs")
queue = sqs.get_queue_by_name(QueueName=name)
return queue
queue = getQueue("myqueue")
print("queue url: %s" % queue.url)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
53
SQSのキューへメッセージを送信(例)
import boto3
def sendMessage(name, message):
sqs = boto3.resource("sqs")
queue = getQueue(name)
response = queue.send_message(MessageBody=message)
return response
response = sendMessage("myqueue", "Hello, World!")
print("message id: %s" % response.get("MessageId"))
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
54
まとめ
• AWS SDKを利用することでAWSの各サービスをアプリ
ケーションのサービスブロックとして活用することがで
きる
• 様々な開発言語を利用可能、用途に応じた使い分けを
• AWS Cloud9は最初から様々な開発言語やツールが同梱
されており、始めるのが超簡単でオススメ
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
55
オンラインセミナー資料の配置場所
AWS クラウドサービス活用資料集
• http://aws.amazon.com/jp/aws-jp-introduction/
AWS Solutions Architect ブログ
• 最新の情報、セミナー中のQ&A等が掲載されています
• http://aws.typepad.com/sajp/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
56
公式Twitter/Facebook
AWSの最新情報をお届けします
@awscloud_jp
検索
最新技術情報、イベント情報、お役立ち情報、
お得なキャンペーン情報などを日々更新しています!
もしくは
http://on.fb.me/1vR8yWm
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
57
AWSの導入、お問い合わせのご相談
AWSクラウド導入に関するご質問、お見積り、資料請求を
ご希望のお客様は以下のリンクよりお気軽にご相談ください
https://aws.amazon.com/jp/contact-us/aws-sales/
※「AWS 問い合わせ」で検索してください
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
58
AWS Well Architected 個別技術相談会のお知らせ
Well Architectedフレームワークに基づく数十個の質問項
目を元に、お客様がAWS上で構築するシステムに潜むリス
クやその回避方法をお伝えする個別相談会
https://pages.awscloud.com/well-architected-
consulting-2017Q4-jp.html
参加無料
毎週火曜・木曜開催
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
59
ご参加ありがとうございました
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
60

More Related Content

PDF
AWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターン
PDF
AWS Black Belt Online Seminar 2018 re:Invent recap IoT and DevOps
PDF
Reinvent2017 recap-overview-pdf
PDF
【IVS CTO Night & Day】IoT Solution
PDF
AWS Black Belt Online Seminar 2017 AWS Summit Tokyo 2017 まとめ
PDF
多要素認証による Amazon WorkSpaces の利用
PDF
AWS Black Belt - AWS Glue
PDF
AWS Black Belt Online Seminar AWS Key Management Service (KMS)
AWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターン
AWS Black Belt Online Seminar 2018 re:Invent recap IoT and DevOps
Reinvent2017 recap-overview-pdf
【IVS CTO Night & Day】IoT Solution
AWS Black Belt Online Seminar 2017 AWS Summit Tokyo 2017 まとめ
多要素認証による Amazon WorkSpaces の利用
AWS Black Belt - AWS Glue
AWS Black Belt Online Seminar AWS Key Management Service (KMS)

What's hot (20)

PDF
aws blackbelt amazon elasticsearch service
PDF
AWS BlackBelt AWS上でのDDoS対策
PDF
AWS Re:Invent Security Recap AWS SSO
PDF
AWS Black Belt Online Seminar 2018 ReInvent recap security other
PDF
The Twelve-Factor Appで考えるAWSのサービス開発
PDF
AWS Organizations
PDF
Security Night #1 AWSのセキュリティアプローチとTLS
PDF
いまさら聞けないAWSクラウド - Java Festa 2013
PDF
AWS Black Belt Online Seminar 2018 AWS上の位置情報
PDF
ユーザーからみたre:Inventのこれまでと今後
PDF
Introduction to New CloudWatch Agent
PDF
20180306 AWS Black Belt Online Seminar 働き方改革を実現するAWSのエンドユーザーコンピューティングサービス
PDF
Serverless backendformobilegame and_aws-appsync_gamingtechnight-2
PDF
AWS Black Belt Online Seminar 2016 AWS IoT
PDF
AWSが誕生するまでの秘話
PDF
AWS Black Belt Online Seminar 2017 AWS WAF
PPTX
失敗から学ぶAWSの監視
PDF
ATC301 AWS re:Invent 2017/11/27 - 1 Million Bids in 100ms - Using AWS to Powe...
PDF
AWS Black Belt Online Seminar lumberyard
PDF
20180703 AWS Black Belt Online Seminar Amazon Neptune
aws blackbelt amazon elasticsearch service
AWS BlackBelt AWS上でのDDoS対策
AWS Re:Invent Security Recap AWS SSO
AWS Black Belt Online Seminar 2018 ReInvent recap security other
The Twelve-Factor Appで考えるAWSのサービス開発
AWS Organizations
Security Night #1 AWSのセキュリティアプローチとTLS
いまさら聞けないAWSクラウド - Java Festa 2013
AWS Black Belt Online Seminar 2018 AWS上の位置情報
ユーザーからみたre:Inventのこれまでと今後
Introduction to New CloudWatch Agent
20180306 AWS Black Belt Online Seminar 働き方改革を実現するAWSのエンドユーザーコンピューティングサービス
Serverless backendformobilegame and_aws-appsync_gamingtechnight-2
AWS Black Belt Online Seminar 2016 AWS IoT
AWSが誕生するまでの秘話
AWS Black Belt Online Seminar 2017 AWS WAF
失敗から学ぶAWSの監視
ATC301 AWS re:Invent 2017/11/27 - 1 Million Bids in 100ms - Using AWS to Powe...
AWS Black Belt Online Seminar lumberyard
20180703 AWS Black Belt Online Seminar Amazon Neptune
Ad

Similar to AWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めよう (20)

PDF
[AWS Developers Meetup 2017] Developerのための ライブAWSウォークスルー 〜 AWS SDKの使い方 〜
PDF
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説
PDF
"Kong Summit, Japan 2022" パートナーセッション:Kong on AWS で実現するスケーラブルな API 基盤の構築
PPTX
Security Operations and Automation on AWS
PDF
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
PDF
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
PDF
20180710 AWS Black Belt Online Seminar AWS入門者向け: AWSで実現するウェブサイトホスティング
PDF
Gaming cicd-pipeline gaming-technight-2
PDF
01_2021年上半期 AWS IoT サービスアップデート
PDF
AWS Black Belt Online Seminar 2017 AWS re:Invent 2017速報
PDF
AWS Black Belt Online Seminar 2017 初心者向け クラウドコンピューティング はじめの一歩
PDF
20211209 Ops-JAWS Re invent2021re-cap-cloud operations
PPTX
Windows on aws最新情報
PDF
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
PDF
AWS Black Belt Online Seminar 2016 AWS CloudFormation
PDF
[最新版は別にございます! Descriptionをご確認ください] AWS Black Belt Online Seminar AWS re:Inven...
PDF
【12/5 最新版】AWS Black Belt Online Seminar AWS re:Invent 2018 アップデート情報
PDF
[最新版(12/5 最新版) が別にございます! Descriptionをご確認ください] AWS Black Belt Online Seminar A...
PPTX
サーバレス × AWS SAM × DRにおけるTIPS
PDF
AWSマイスターシリーズReloaded -AWS SDK for .NET-
[AWS Developers Meetup 2017] Developerのための ライブAWSウォークスルー 〜 AWS SDKの使い方 〜
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説
"Kong Summit, Japan 2022" パートナーセッション:Kong on AWS で実現するスケーラブルな API 基盤の構築
Security Operations and Automation on AWS
202202 AWS Black Belt Online Seminar AWS SaaS Boost で始めるSaaS開発⼊⾨
20201028 AWS Black Belt Online Seminar Amazon CloudFront deep dive
20180710 AWS Black Belt Online Seminar AWS入門者向け: AWSで実現するウェブサイトホスティング
Gaming cicd-pipeline gaming-technight-2
01_2021年上半期 AWS IoT サービスアップデート
AWS Black Belt Online Seminar 2017 AWS re:Invent 2017速報
AWS Black Belt Online Seminar 2017 初心者向け クラウドコンピューティング はじめの一歩
20211209 Ops-JAWS Re invent2021re-cap-cloud operations
Windows on aws最新情報
202205 AWS Black Belt Online Seminar Amazon FSx for OpenZFS
AWS Black Belt Online Seminar 2016 AWS CloudFormation
[最新版は別にございます! Descriptionをご確認ください] AWS Black Belt Online Seminar AWS re:Inven...
【12/5 最新版】AWS Black Belt Online Seminar AWS re:Invent 2018 アップデート情報
[最新版(12/5 最新版) が別にございます! Descriptionをご確認ください] AWS Black Belt Online Seminar A...
サーバレス × AWS SAM × DRにおけるTIPS
AWSマイスターシリーズReloaded -AWS SDK for .NET-
Ad

More from Amazon Web Services Japan (20)

PDF
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
PDF
202204 AWS Black Belt Online Seminar AWS IoT Device Defender
PDF
Infrastructure as Code (IaC) 談義 2022
PDF
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
PDF
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
PDF
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
PPTX
20220409 AWS BLEA 開発にあたって検討したこと
PDF
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
PDF
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
PDF
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
PDF
Amazon QuickSight の組み込み方法をちょっぴりDD
PDF
マルチテナント化で知っておきたいデータベースのこと
PDF
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
PDF
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
PDF
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
PDF
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
PPTX
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
PDF
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
PDF
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
PDF
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202204 AWS Black Belt Online Seminar AWS IoT Device Defender
Infrastructure as Code (IaC) 談義 2022
202204 AWS Black Belt Online Seminar Amazon Connect を活用したオンコール対応の実現
202204 AWS Black Belt Online Seminar Amazon Connect Salesforce連携(第1回 CTI Adap...
Amazon Game Tech Night #25 ゲーム業界向け機械学習最新状況アップデート
20220409 AWS BLEA 開発にあたって検討したこと
202202 AWS Black Belt Online Seminar AWS Managed Rules for AWS WAF の活用
202203 AWS Black Belt Online Seminar Amazon Connect Tasks.pdf
SaaS テナント毎のコストを把握するための「AWS Application Cost Profiler」のご紹介
Amazon QuickSight の組み込み方法をちょっぴりDD
マルチテナント化で知っておきたいデータベースのこと
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
パッケージソフトウェアを簡単にSaaS化!?既存の資産を使ったSaaS化手法のご紹介
202202 AWS Black Belt Online Seminar Amazon Connect Customer Profiles
Amazon Game Tech Night #24 KPIダッシュボードを最速で用意するために
[20220126] JAWS-UG 2022初頭までに葬ったAWSアンチパターン大紹介
202111 AWS Black Belt Online Seminar AWSで構築するSmart Mirrorのご紹介
202201 AWS Black Belt Online Seminar Apache Spark Performnace Tuning for AWS ...
202112 AWS Black Belt Online Seminar 店内の「今」をお届けする小売業向けリアルタイム配信基盤のレシピ

AWS Black Belt Online Seminar AWSサービスを利用したアプリケーション開発を始めよう

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 1 アマゾンウェブサービスジャパン株式会社 ソリューションアーキテクト 福井 厚 2017.12.12 【AWS Black Belt Online Seminar】 AWSサービスを利用した アプリケーション開発を始めよう
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2 自己紹介 名前  福井 厚(ふくい あつし)fatsushi@ 所属  アマゾン ウェブ サービス ジャパン株式会社  技術統括本部レディネス ソリューション部  DevOps スペシャリスト ソリューション アーキテクト 前職  エンタープライズ アプリケーション開発コンサルタント 好きなAWSサービス  AWS Code シリーズ、AWS Cloud9、AWS Fargate、AWS Lambda
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3 内容についての注意点 本資料では2017年12月12日時点のサービス内容および価格についてご説明しています。最 新の情報はAWS公式ウェブサイト(http://aws.amazon.com)にてご確認ください。 • 資料作成には十分注意しておりますが、資料内の価格とAWS公式ウェブサイト記載の価 格に相違があった場合、AWS公式ウェブサイトの価格を優先とさせていただきます。 • 価格は税抜表記となっています。日本居住者のお客様が東京リージョンを使用する場合、 別途消費税をご請求させていただきます。 AWS does not offer binding price quotes. AWS pricing is publicly available and is subject to change in accordance with the AWS Customer Agreement available at http://aws.amazon.com/agreement/. Any pricing information included in this document is provided only as an estimate of usage charges for AWS services based on certain information that you have provided. Monthly charges will be based on your actual use of AWS services, and may vary from the estimates provided.
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4 Agenda • AWS上でのアプリケーション開発 • 開発を始める前の準備 • やってみよう
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 5 AWSのサービス操作といえば マネジメントコンソール AWS CLI
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 6 AWSの各サービスはAPIを提供 • 各サービスの操作にAPIが定義されている • マネジメントコンソールまたはAWS CLIから、これら のAPIをコール • プログラミングからAPIをコールすることも可能 • 各種開発言語用にSDKを提供 • SIG V4ヘッダの組み立てを行なってくれるので楽 • 高レベルなプログラミング インターフェイスを提供 • HTTP REST APIを直接リクエストすることも可能
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 7 アプリケーションからAWSのサービスを利用 Amazon S3 Lambda function Amazon DynamoDB client user オブジェクトをS3に アップロード S3イベントで Lambdaを実行 DynamoDBにメタ データを保存 S3へオブジェクトを Putするコードを実装 DynamoDBへItemをPut するコードを実装
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 8 AWS SDK Ruby AWS CLI Python (boto)Mobile SDK Node.js AWS Toolkit for Visual Studio .NET AWS Toolkit for Eclipse PHP AWS Tools for Windows PowerShell C++ JavaScriptJava Go
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 9 AWS Mobile SDK • 高品質なモバイルアプリケーションを 素早く簡単に構築可能に • AWS Lambda、Amazon S3、Amazon DynamoDB、Amazon Mobile Analytics、Amazon Machine Learning、Elastic Load balancing、Auto ScalingなどのAWSサービスへの容易なアクセス • iOS、Android/Fire OS、Xamarin、Unityのライブラリ、コードサ ンプル、ドキュメントを提供 • ドキュメント https://aws.amazon.com/documentation/mobile-sdk/
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 10 AWS Mobile SDK • オープンソースのソフトウェア開発キット • AWS Mobile SDK for iOS • 開発環境:Xcode 7 以降、iOS 8 以降 • AWS Mobile SDK for Android • 開発環境:Android 2.3.3(API Level 10) 以降、Android Studio または Android Development Tools for Eclipse • AWS Mobile SDK for .NET and Xamarin • 対象アプリ:Xamarin iOS、Xamarin Android、Window Phone Silverlight、Windows RT 8.1、Windows Phone 8.1 • 開発環境 • Windows環境:Visual Studio 2013 Update 2、Visual Studio 2015 及び 2017 • Mac環境:MacOS Sierra 10.12 以降、Xcode 8.3 • AWS Mobile SDK for Unity • 開発環境 • Unity version 4.x または 5.x
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 11 AWS SDK for Python(Boto3) • Boto3は2つの異なるレベルのAPIを提供 • Client API(低レベル):HTTP APIと1対1でマッピング • Resource API (高レベル):リソース属性とオブジェクトのコレクショ ンを提供 • Python 2 及び Python 3 をサポート • Python version 2.6.5+、2.7、3.3+ • AWSリソースが事前定義された状態に遷移するまでポーリングして 待機するWaitersを提供 • ドキュメント https://boto3.readthedocs.io/en/latest/
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 12 AWS SDK for Java • AWS SDK for Java 2.0開発者プレビュー • Amazon S3、Amazon EC2、DynamoDBなどへの容易なアク セスを提供 • 2.0.0-preview-6 (2017/11/6) • メジャーバージョンアップとして1.xをリライト • Java 8をベースに要求の多かった機能を追加 • ノンブロッキングI/O、ブラグイン可能なHTTレイヤー、Clientビ ルダー、Immutable POJOなど • https://github.com/aws/aws-sdk-java-v2/ • プレビューなので本番環境への適用は推奨しません • 1.xは今後もサポート
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 13 AWS SDK for .NET • サーバーレス アプリケーション開発を含む.NET Core サポート • Amazon S3 TransferUtility:マルチスレッド化されたAmazon S3マルチパートアップ ロードを利用することでスループット、パフォーマンス、及び信頼性を向上 • Amazon S3 クライアントサイド暗号化 • Amazon DynamoDBオブジェクト永続化フレームワークを提供 • Amazon Glacier ArchiveTransferManager:高レベルAPIによって、大きなファイルを自 動的にパーツ分割 • Portal Class LibraryとXamarin Projectのサポート:.NET 3.5、.NET 4.5 Framework に加え、Portable Class Libraryも用意 • Amazon DynamoDB Session State Provider:ASP.NETのセッション状態を DynamoDBに簡単に格納可能
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 14 AWS SDK for Ruby • Version 3 • gem install aws-sdk • サービス特化なgem(aws-sdk-s3など)により、各サービ スのセマンティックなバージョニングを使用 • aws-sdk-rails:AWS SDK for RubyのRuby on Railsとの統 合を提供 https://github.com/aws/aws-sdk-rails • aws-record:AWS SDK for Ruby上に構築されたAmazon DynamoDBの抽象データマッピングを提供 https://github.com/aws/aws-sdk-ruby-record
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 15 その他のSDK • PHP • PHP 5.5.0以上 • OpenSSL PHP extension(オプション) • cURL 7.16.2(推奨) • Xdebug(パフォーマンスに問題がある場合は、アンインストールを推奨) • Composer classmap autoloaderの利用 • C++ • Amazon S3のクライアントサイド データ暗号化 • Amazon S3 Transfer Manager • 幅広いプラットフォームに対応 • CMakeのサポート • カスタマイズ可能なメモリ管理
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 16 その他のSDK • Go • go get –u github.com/aws/aws-sdk-go • Amazon S3 Transfer Manager:大きなファイルを複数のパートに分 割してS3転送 • Response Paginator:ページ分割された大量のAPI結果を容易に反復 処理可能 • 拡張性:ハンドラーにより、すべてのAPIライフライクルをカスタマイ ズ可能、モックテスト、エラーシミュレーションを実現 • Node.js • Npm install aws-sdk • Var AWS = require(‘aws-sdk’);
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 17 AWS Amplify • クラウド対応アプリケーションを構築するフロントエンドとモバイ ル開発者用のJavaScriptライブラリ • 宣言的インターフェイスでAWS以外のクラウドサービスもブラグ 可能なオープンな設計 • Aws-amplifyライブラリに追加で、Reactアプリケーション用、 React Nativeアプリケーション用ライブラリを提供 • 認証、分析、APIインタラクション、ストレージ、キャッシュ、 i18n及びロギングのカテゴリをサポート • https://github.com/aws/aws-amplify
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 18 AWS Mobile CLI • JavaScriptフロントエンド開発者のためにアプリ内でAWSサービスと 設定を有効化するためのコマンドラインインターフェイスを提供 • ターミナルから最小の設定で、AWS Mobile Hubが提供するすべての 機能を利用可能 • AWS Mobile CLIは他の業界標準のコマンドラインインターフェイスに 準拠するように設計 • $ awsmobile のパラメータでMobile Hubの設定取得、更新、S3と CloudFrontへのパブリッシュなどを実行 http://docs.aws.amazon.com/aws- mobile/latest/developerguide/web-getting-started.html
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 19 Agenda • AWS上でのアプリケーション開発 • 開発を始める前の準備 • やってみよう
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 20 開発を始める前の準備 • AWSへのサインアップ • ユーザーとグループの作成 • AWS CLIのインストールとプロファイルの設定 • AWS SDKのインストール
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 21 開発を始める前の準備 • AWSへのサインアップ • AWSアカウント作成の流れ https://aws.amazon.com/jp/register-flow/
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 22 開発を始める前の準備 • ユーザーとグループの作成 • IAMユーザーの作成 • IAMグループの作成 • グループへのポリシーの適用 • ユーザーのグループへの追加 • アクセスキーIDとシークレットアクセスキーの生成 • AWS Command Line Interface(AWS CLI)、Tools for Windows PowerShell、AWS SDK、または直接HTTP呼び出しな どAWSをプログラムで呼び出すには、ユーザー独自のアクセス キーが必要 • IAMはアクセスキーIDとシークレットアクセスキーを返す • これらを安全な場所に保存
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 23 IAMユーザーとグループ作成
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 24 IAMユーザーとグループ作成
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 25 IAMユーザーとグループ作成
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 26 IAMユーザーとグループ作成
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 27 IAMユーザーとグループ作成
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 28 AWS CLIのインストールとプロファイルの作成 • AWS CLIのインストール要件 • Python 2 バージョン 2.6.5+または Python 3 バージョン 3.3+ • Windows、Linux、MacOS またはUnix aws configure でクレデンシャル情報、リージョンを保存 $ pip install awcscli --upgrade –user $ aws configure
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 29 AWS SDKのインストール • お好みの開発環境を利用可能 • 個々のAWS SDKのインストールについては以下のサイトか ら各ドキュメントを参照ください https://aws.amazon.com/jp/tools/
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 30 AWS Toolkit • IDEと統合して、より便利な開発を支援 • AWS Toolkit for Visual Studio https://aws.amazon.com/jp/visualstudio/ • AWS Toolkit for Eclipse https://aws.amazon.com/jp/eclipse/?nc1=h_ls
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 31 開発環境(Java) • AWS Toolkit for Eclipse のインストール http://docs.aws.amazon.com/toolkit-for-eclipse/v1/user- guide/setup-install.html [Help] – [Install New Software] を選択し下記のURLを指定 https://aws.amazon.com/eclips e
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 32 AWS Toolkit for Eclipse
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 33 開発環境(.NET) • AWS Toolkit for Visual Studioのインストール https://aws.amazon.com/jp/visualstudio/ Visual Studioのバージョンに よってダウンロードするイン ストーラーを選択
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 34 AWS Toolkit for Visual Studio
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 35 でも、なんか準備が大変そう。。。 • そんなあなたにオススメなのが、 AWS Cloud9!
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 36 クラウドベースの統合開発環境 AWS Cloud9を発表 • AWSクラウド上で開発・テスト・デバッグを完 結できる統合開発環境のサービスを発表。環境 構築に時間を掛けず、即座に開発を始められる • 初の”クラウドネイティブ”なIDE。Lambdaと 統合され、ファンクションのテストをシームレ スに実行できる。CodeStarとの統合も • 自分の開発環境にアクセスできるユーザをIAM ユーザの単位で設定し、共同作業が可能に • オレゴン、オハイオ、バージニア、アイルラン ド、シンガポールのリージョンで利用可能に
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 37 AWS Cloud9 は • JavaScript、Python、Goなど人気のある開発言語とツール を同梱 • AWS CLIもインストール済み • Amazon EC2 インスタンスまたはSSH経由で独自のLinux サーバー環境に開発環境を構築可能 • AWS Cloud9 ダッシュボードを利用して、多数のAWS Cloud9 環境を切り替え可能
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 38 AWS Cloud9環境のセットアップ
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 39 リージョンの選択 ”Select a Region”をクリック
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 40 リージョンの選択 環境を作成したいリージョンを選 択 現在は、 ・オレゴン、 ・オハイオ ・北バージニア ・アイルランド ・シンガポール で、利用可能
  • 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 41 環境の作成 ”Create Environment”をクリック
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 42 名前と説明の入力 環境名と説明を入力したら “Next Step”をクリック
  • 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 43 設定画面 “Next Step”をクリック “Create a new instance for envrionment (EC2)” か“Connect and run in remote Server (SSH)” を選択 インスタンスタイプを選択し、コスト セービング オプションを選択
  • 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 44 環境名と設定を確認し、作成 設定を確認して、“Create environment”をクリック
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 45 数分で、AWS Cloud9環境が!
  • 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 46 Agenda • AWS上でのアプリケーション開発 • 開発を始める前の準備 • 開発環境 • やってみよう
  • 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 47 Demo!
  • 48. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 48 指定した名前で始まるS3のバケット名の取得(例) import boto3 def listBuckets(bucketName): s3client = boto3.client('s3') resource = s3client.list_buckets() for bucket in resource['Buckets']: if bucket['Name'].startswith(bucketName): print("Bucket: %s" % bucket['Name'])
  • 49. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 49 S3のバケットの作成(例) import boto3 def createBucket(bucketName) : s3client = boto3.client('s3') s3client.create_bucket(Bucket=bucketName)
  • 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 50 S3のバケットの削除(例) import boto3 def deleteBucket(bucketName) : s3client = boto3.client('s3') s3client.delete_bucket(Bucket=bucketName)
  • 51. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 51 SQSのキューの作成(例) import boto3 def createQueue(name): sqs = boto3.resource('sqs') queue = sqs.create_queue( QueueName=name, Attributes={'DelaySeconds':'5'}) return queue.url url = createQueue("myqueue") print("url : %s" % url)
  • 52. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 52 SQSのキューの取得(例) import boto3 def getQueue(name): sqs = boto3.resource("sqs") queue = sqs.get_queue_by_name(QueueName=name) return queue queue = getQueue("myqueue") print("queue url: %s" % queue.url)
  • 53. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 53 SQSのキューへメッセージを送信(例) import boto3 def sendMessage(name, message): sqs = boto3.resource("sqs") queue = getQueue(name) response = queue.send_message(MessageBody=message) return response response = sendMessage("myqueue", "Hello, World!") print("message id: %s" % response.get("MessageId"))
  • 54. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 54 まとめ • AWS SDKを利用することでAWSの各サービスをアプリ ケーションのサービスブロックとして活用することがで きる • 様々な開発言語を利用可能、用途に応じた使い分けを • AWS Cloud9は最初から様々な開発言語やツールが同梱 されており、始めるのが超簡単でオススメ
  • 55. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 55 オンラインセミナー資料の配置場所 AWS クラウドサービス活用資料集 • http://aws.amazon.com/jp/aws-jp-introduction/ AWS Solutions Architect ブログ • 最新の情報、セミナー中のQ&A等が掲載されています • http://aws.typepad.com/sajp/
  • 56. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 56 公式Twitter/Facebook AWSの最新情報をお届けします @awscloud_jp 検索 最新技術情報、イベント情報、お役立ち情報、 お得なキャンペーン情報などを日々更新しています! もしくは http://on.fb.me/1vR8yWm
  • 57. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 57 AWSの導入、お問い合わせのご相談 AWSクラウド導入に関するご質問、お見積り、資料請求を ご希望のお客様は以下のリンクよりお気軽にご相談ください https://aws.amazon.com/jp/contact-us/aws-sales/ ※「AWS 問い合わせ」で検索してください
  • 58. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 58 AWS Well Architected 個別技術相談会のお知らせ Well Architectedフレームワークに基づく数十個の質問項 目を元に、お客様がAWS上で構築するシステムに潜むリス クやその回避方法をお伝えする個別相談会 https://pages.awscloud.com/well-architected- consulting-2017Q4-jp.html 参加無料 毎週火曜・木曜開催
  • 59. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 59 ご参加ありがとうございました
  • 60. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 60