Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS Step Functionsの新機能「Call third-party API」を試してみた
Search
KMiura
December 18, 2023
Technology
0
210
AWS Step Functionsの新機能「Call third-party API」を試してみた
2023.12.18 「JAWS-UG 名古屋 2023年 AWS re:Inventの復習」
https://jawsug-nagoya.doorkeeper.jp/events/165969
KMiura
December 18, 2023
Tweet
Share
More Decks by KMiura
See All by KMiura
Cloudflare WorkersがPythonに対応したので試してみた
miura55
0
190
個人のAWSアカウントをマルチ運用してみた
miura55
2
290
さらばあのボタンとは言わせない SORACOM LTE-M Button powerd by AWSをまだ使えるようにした(前編?)
miura55
0
120
App Runnerでパラメーターストアの値を使ってみた
miura55
0
310
ultraArmをモニター提供してもらった話
miura55
0
120
JAWS UG名古屋2023年活動報告
miura55
0
140
AWS Step Functionsの新機能「Call third-party API」を試してみた
miura55
1
110
AWS CDKの新機能「cdk migrate」を試してみた
miura55
1
330
LINE DC×SORACOM UGのこれまでとこれから
miura55
0
46
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
12
7.9k
iThome2024 Wailing Wall of Enterprise Security
notsurprised
0
300
データ分析力を高めるSQL研修サービス『SQL Everyone』
hikarut
1
390
PhpStorm超絶技巧40分集中講義 #phpconkagawa
yusuke
4
780
PHP 9 に備えよ - 動的プロパティ、どうすればいぃ?
taisukearase
0
340
TDD - Test Driven Drupal
opdavies
0
3k
「できる!」を増やすGitHub Copilot活用法 / How to use GitHub Copilot to expand your possibilities
sansan_randd
1
240
試作とデモンストレーション / Prototyping and Demonstrations
ks91
PRO
0
170
TypeScript の抽象構文木を用いた、数百を超える API の大規模リファクタリング戦略
yanaemon
6
1.3k
日本が誇るイタリアのダンスミュージック!? ユーロビートって何??
minorun365
PRO
2
220
[PyconUS 2024] Having fun with Pydantic and pattern matching
enforcerpl
0
180
エンジニアゼロの組織から内製開発の DX をどう実現したのか / How did we achieve DX in in-house development in an organization with zero engineers?
genkiogasawara
7
3k
Featured
See All Featured
How GitHub (no longer) Works
holman
305
140k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
Side Projects
sachag
451
41k
What the flash - Photography Introduction
edds
64
11k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
242
1.2M
What's new in Ruby 2.0
geeforr
338
31k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
Web development in the modern age
philhawksworth
203
10k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
245
20k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.7k
Transcript
AWS Step Functionsの新機能「Call third-party API」を試してみた KMiura(@k_miura_io)
自己紹介 • 三浦 耕生(こうき) • JAWS UG名古屋運営 • 三次元地図技術のスタートアップの エンジニア
@k_miura_io koki.miura05
re:Invent 2023のアップデート • Amazon QはXのトレンド入りしたり、ニュースになって結構話題になった • BedrockがリリースしたことでAI系のサービスが充実した印象 • AIアプリケーションの開発をサポートするアップデートが多かった
Step Functionsの新機能 • Call third-party API • Bedrock API
Call third-party API それまでLambdaを使わないとできなかった外部API連携が Step Functionsだけで実現できる
【余談】実はいち早くキャッチアップしてた • AWS Community Builderの向けに re:Invent前 に紹介してもらった • AWSで何かしらアップデートあると不定期でオンラ インミーティングが開催される(もちろん英語で開催
時間は日本時間の深夜)
試してみた
今回のシナリオ News APIで取得した国内のヘッドラインニュースを Slackに投稿&レスポンスをS3に保管するワークフロー
DEMO
SLACKの投稿
S3バケットの中身
ワークフロー Lambda一切使わず実装!
POINT • APIのリクエストにはEventBridgeを使って APIの認証情報を登録する必要がある • よくあるヘッダーにAPIトークンをいれるタ イプのAPIであれば認証タイプをAPIキー に設定してヘッダーに登録する情報を入 れればOK
外部API呼び 出すときに使 われている IAMポリシー • Call third-party APIのステップを追加したステートマ シンのIAMロールを生成するとそのワークフローに 必要なAPIのエンドポイント、メソッドのアクセスを許
可するためのIAMポリシーが追加される • 何も知らずにあとから別のAPIを追加して実行する とアクセスエラーが出るので要注意! • ステートマシンの設定画面からIAMロールを作り直せ ばOK
ステートマシンのテンプレ もある • StripeのAPIを使った請求書 作成ワークフローをStep Functionsで完結するテンプ レートがある • 割と複雑なビジネスロジック がローコードで構築されて
いるのでStep Functionsの ポテンシャルを感じる
まとめ • Step Functionsを使って外部APIと連携することができた • Lambdaを使わないサーバーレスなシステム開発の幅が広がる予感 • Step Functions側で作られているIAMロールでアクセス制限をかけているのでセ キュアな分、カスタムする際は要注意
超簡単なサンプル記事 https://bit.ly/3Rsoxxr
宣伝 https://bit.ly/3v9uibK
宣伝② https://bit.ly/3v3u2Lu
END