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
730
npm3 ❓
watilde
18
13k
npm update -g npm
watilde
5
2.8k
Other Decks in Technology
See All in Technology
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
200
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
540
UI State設計とテスト方針
rmakiyama
2
620
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
850
生成AIのガバナンスの全体像と現実解
fnifni
1
190
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
32k
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
160
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
560
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
850
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
290
2024年にチャレンジしたことを振り返るぞ
mitchan
0
140
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Building an army of robots
kneath
302
44k
A Tale of Four Properties
chriscoyier
157
23k
RailsConf 2023
tenderlove
29
940
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
How to train your dragon (web standard)
notwaldorf
88
5.7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
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։ൃʹ͓͍ͯɺ
௨ৗͷϓϩμΫτ։ൃͷΑ͏ͳΞϓϩʔνͰ มԽΛى͜͢͜ͱ͕Ͱ͖Δ͜ͱ͕͋Δ