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
3.1k
Amplify Japan User Group and OSS
watilde
0
1.1k
Web VitalsとJavaScriptエラーの可視化 - フロントエンドにおけるObservabilityとは / visualize-web-vitals-and-javascript-error
watilde
6
2.7k
Firefighting planner
watilde
1
66
Doctor Wombat - A debug guide to using npm.
watilde
0
450
Asynchronous wombats - some of the communication issues from our differences we face on GitHub
watilde
0
490
Write a song in JavaScript
watilde
3
720
npm3 ❓
watilde
18
13k
npm update -g npm
watilde
5
2.8k
Other Decks in Technology
See All in Technology
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
520
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
170
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
160
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
450
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
Featured
See All Featured
Facilitating Awesome Meetings
lara
50
6.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Practical Orchestrator
shlominoach
186
10k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Docker and Python
trallard
40
3.1k
Speed Design
sergeychernyshev
25
620
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Building an army of robots
kneath
302
43k
A Tale of Four Properties
chriscoyier
156
23k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
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։ൃʹ͓͍ͯɺ
௨ৗͷϓϩμΫτ։ൃͷΑ͏ͳΞϓϩʔνͰ มԽΛى͜͢͜ͱ͕Ͱ͖Δ͜ͱ͕͋Δ