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
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
Engineer Career Talk
lycorp_recruit_jp
0
120
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
ハイパーパラメータチューニングって何をしているの
toridori_dev
0
140
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
3
190
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
990
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Unsuck your backbone
ammeep
668
57k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Ruby is Unlike a Banana
tanoku
97
11k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Done Done
chrislema
181
16k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Building Your Own Lightsaber
phodgson
103
6.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
The Pragmatic Product Professional
lauravandoore
31
6.3k
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։ൃʹ͓͍ͯɺ
௨ৗͷϓϩμΫτ։ൃͷΑ͏ͳΞϓϩʔνͰ มԽΛى͜͢͜ͱ͕Ͱ͖Δ͜ͱ͕͋Δ