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
amplify-cliで追加したfunctionに 環境変数・シークレットを設定する機能が ど...
Search
Daijiro Wachi
July 30, 2021
Technology
0
1.2k
amplify-cliで追加したfunctionに 環境変数・シークレットを設定する機能が どのように実現されたか / amplify-env-vars
https://aws-amplify-jp.connpass.com/event/217715/
Daijiro Wachi
July 30, 2021
Tweet
Share
More Decks by Daijiro Wachi
See All by Daijiro Wachi
OSS開発における合意形成にJavaScriptで参加し、変化を起こす / front-end-lounge-1
watilde
6
3k
Amplify Japan User Group and OSS
watilde
0
1.1k
Web VitalsとJavaScriptエラーの可視化 - フロントエンドにおけるObservabilityとは / visualize-web-vitals-and-javascript-error
watilde
6
2.6k
Firefighting planner
watilde
1
62
Doctor Wombat - A debug guide to using npm.
watilde
0
430
Asynchronous wombats - some of the communication issues from our differences we face on GitHub
watilde
0
480
Write a song in JavaScript
watilde
3
700
npm3 ❓
watilde
18
13k
npm update -g npm
watilde
5
2.8k
Other Decks in Technology
See All in Technology
持続可能なソフトウェア開発を支える『GitHub CI/CD実践ガイド』
tmknom
8
1.4k
LINEヤフーのフロントエンド組織・体制の紹介
lycorp_recruit_jp
1
1.2k
2024年のナビゲーション・フォーカス対応:Composeでキーボード・ナビゲーションをサポートしよう
tahia910
0
110
AI活用したくてもできなかった不動産SaaSの今とこれから
nealle
0
340
Discovering AI Models
picardparis
4
3.9k
どこよりも遅めなWinActor Ver.7.5.0 新機能紹介
tamai_63
0
210
PDF Viewer作成の今までとこれから
hunachi
0
480
リアルお遍路+SORACOM IoT
ozk009
1
140
不動産 x AIことはじめ~データの真価を拓くために
estie
0
130
フロントエンド開発事例③ Yahoo! JAPAN トップページ
lycorptech_jp
PRO
0
100
不動産tech Product Night#2_AIことはじめ_GA橋本
takehikohashimoto
0
190
ナレッジグラフとLLMの相互利用
koujikozaki
0
430
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
Agile that works and the tools we love
rasmusluckow
327
20k
Embracing the Ebb and Flow
colly
83
4.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
0
130
Build The Right Thing And Hit Your Dates
maggiecrowley
30
2.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.2k
Become a Pro
speakerdeck
PRO
22
4.9k
Building Your Own Lightsaber
phodgson
101
6k
Build your cross-platform service in a week with App Engine
jlugia
228
18k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
Transcript
Daijiro Wachi - @watilde amplify-cliͰՃͨ͠functionʹ ڥมɾγʔΫϨοτΛઃఆ͢Δػೳ͕ ͲͷΑ͏ʹ࣮͞Ε͔ͨ Amplify Boost Up#1
2021/07/30
None
7/7🎋ʹϦϦʔε͞Εͨ@aws-amplify/
[email protected]
ͷ৽ػೳ ڥมɾγʔΫϨοτͷཧ Commit hash: fac354e Source: https://aws.amazon.com/jp/blogs/mobile/con fi gure-environment-variables-and-secrets-for-your-lambda-functions-with-amplify-cli/ ࣮ࡍͷίϛοτ
ϦϦʔεهࣄ ެࣜυΩϡϝϯτ
͓͢Δ͜ͱ • Summary • ڥมɾγʔΫϨοτཧػೳͷ͍ํ • Approach • ͲͷΑ͏ʹڥมཧͷ։ൃ͕ਐΜͩͷ͔ •
ڥมཧͷٕज़తͳৄࡉ • Conclusion • ·ͱΊ
͓͢Δ͜ͱ • Summary • ڥมɾγʔΫϨοτཧػೳͷ͍ํ • Approach • ͲͷΑ͏ʹڥมཧͷ։ൃ͕ਐΜͩͷ͔ •
ڥมཧͷٕज़తͳৄࡉ • Conclusion • ·ͱΊ
͍ํ - ڥม ৽نՃ͢ΔfunctionʹڥมͷઃఆΛ͢Δํ๏
͍ํ - ڥม Advanced settingsΑΓɺKeyͱValueΛೖྗ
͍ํ - ڥม process.env ܦ༝Ͱͷݺͼग़͠
͍ํ - Secret ৽نՃ͢ΔfunctionʹγʔΫϨοτͷઃఆΛ͢Δํ๏
͍ํ - Secret Advanced settingsΑΓɺKeyͱValueΛೖྗ
͍ํ - Secret SSM(AWS Secrets Manager) ܦ༝ͰΛݺͼग़͠
͍ํ - Secret SSM(AWS Secrets Manager) ܦ༝ͰΛݺͼग़͠
͓͢Δ͜ͱ • Summary • ڥมɾγʔΫϨοτཧػೳͷ͍ํ • Approach • ͲͷΑ͏ʹڥมཧͷ։ൃΛਐΊ͔ͨ •
ڥมཧͷٕज़తͳৄࡉ • Conclusion • ·ͱΊ
ͲͷΑ͏ʹڥมཧͷ։ൃΛਐΊ͔ͨ ࣗࢹͰɺͲͷΑ͏ʹҙࢥஅΛߦ͔ͬͨ 1. Feature request͕GitHub issuesʹ࡞͞ΕΔ 2. ࡞͞ΕͨissueΛݩʹٞ👍͕ߦΘΕΔ 3. ࣮ݱՄೳੑɺΠϯύΫτͳͲෳͷ߲Λݩʹ༏ઌॱҐ͚
4. ઃܭɾ࣮ͷ࣮ࢪ 5. ίʔυϨϏϡʔͷ࣮ࢪ ※ৗʹ͜ͷϓϩηε͕ద༻͞Ε͍ͯΔΘ͚Ͱ͋Γ·ͤΜ
1. Feature request͕GitHub issuesʹ࡞͞ΕΔ Source: https://github.com/aws-amplify/amplify-cli/issues/2227 User storyԽΛҙࣝ͠ʮ୭͕ɺԿΛɺͳͥɺߦ͍͍ͨͷ͔ʯ͕ఏڙ͞ΕΔ͜ͱ͕ଟ͍
2. ࡞͞ΕͨissueΛݩʹٞ👍͕ߦΘΕΔ ىථ༰͕ڞײΛੜΉͱɺٞͱൃల͞Εࢧ࣋Λड͚Δ Source: https://github.com/aws-amplify/amplify-cli/issues/2227
3. ࣮ݱՄೳੑɺΠϯύΫτͳͲෳͷ߲Λݩʹ༏ઌॱҐ͚ ఆྔతͳधཁΛݟΔͷʹ👍ͷͰιʔτΛͯ͠ΈΔ Source: https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+updated%3A%3E%3D2021-06-01+is%3Aclosed+
4. ઃܭɾ࣮ͷ࣮ࢪ ٞΛಡΈࠐΈɺ࣮ࡍʹΰʔϧΠϝʔδΛܗʹͯ͠ৄࡉͳٞͱൃలͤ͞Δ Source: https://github.com/aws-amplify/amplify-cli/pull/7166
5. ίʔυϨϏϡʔͷ࣮ࢪ ࣭ΛߴΊΔͨΊͷٞΛPR্Ͱ࣮ࢪ Source: https://github.com/aws-amplify/amplify-cli/pull/7166
߹ҙ͕ܗ͞ΕϚʔδʹࢸΔ🎉 Source: https://github.com/aws-amplify/amplify-cli/commit/429c543d1d3f52da60b4c03fa48b67aedb1a661c
ڥมཧͷٕज़తͳৄࡉ amplify/ team-provider-info.json amplify/backend/function/<name>/ function-parameter.json amplify/backend/function/<name>/ cloudformation-template.json Value https://example.com ෦తͳKey
serviceUrl serviceUrl serviceUrl ݺͼग़͠༻ͷKey SERVICE_URL SERVICE_URL (ར༻͢ΔࡍʹҙࣝΛ͢Δඞཁͳ͍ͱࢥ͍·͢)
amplify/team-provider-info.json “ڥ(env)͝ͱ” ʹ͕֨ೲ͞ΕΔ
amplify/backend/function/<name>/function-parameter.json “Ϣʔβʔ͕Ճͨ͠” ڥมͷ෦తͳKeyͱݺͼग़͠༻ͷKeyΛfunction͝ͱʹϦετԽ
amplify/backend/function/<name>/cloudformation-template.json team-provider-info.jsonʹอଘ͞Ε͍ͯΔͱݺͼग़͠༻ͷKeyͷඥ͚
͓͢Δ͜ͱ • Summary • ڥมɾγʔΫϨοτཧػೳͷ͍ํ • Approach • ͲͷΑ͏ʹڥมཧͷ։ൃ͕ਐΜͩͷ͔ •
ڥมཧͷٕज़తͳৄࡉ • Conclusion • ·ͱΊ
ใࠂΛఏҊʹɺఏҊΛٞʹɺٞΛ࣮ݱʹ ^͕ࣗࢥ͏OSS։ൃͷੈք؍ • ҙࢥஅupstreamͰߦΘΕ͍ͯΔ • ҙݟΛڞײͷ֫ಘ͕Ͱ͖ΔఏҊͱঢ՚͢Δͱٞͱൃల͢Δ • Өڹൣғͷ࠷খԽͱઃܭͷॊೈੑτϨʔυΦϑʹͳΔ͜ͱ͕͋Δ • OSS։ൃʹ͓͍ͯɺ
௨ৗͷϓϩμΫτ։ൃͷΑ͏ͳΞϓϩʔνͰ มԽΛى͜͢͜ͱ͕Ͱ͖Δ͜ͱ͕͋Δ