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.3k
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
67
Doctor Wombat - A debug guide to using npm.
watilde
0
460
Asynchronous wombats - some of the communication issues from our differences we face on GitHub
watilde
0
500
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
生成AIのガバナンスの全体像と現実解
fnifni
1
180
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
300
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
170
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
250
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
160
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
240
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
なぜCodeceptJSを選んだか
goataka
0
160
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
40
7.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Site-Speed That Sticks
csswizardry
2
190
A Philosophy of Restraint
colly
203
16k
Bash Introduction
62gerente
608
210k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Designing for Performance
lara
604
68k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Music & Morning Musume
bryan
46
6.2k
Code Review Best Practice
trishagee
65
17k
Visualization
eitanlees
146
15k
Git: the NoSQL Database
bkeepers
PRO
427
64k
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։ൃʹ͓͍ͯɺ
௨ৗͷϓϩμΫτ։ൃͷΑ͏ͳΞϓϩʔνͰ มԽΛى͜͢͜ͱ͕Ͱ͖Δ͜ͱ͕͋Δ