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
High Availability Vault Service on AWS Environment
Search
Gea-Suan Lin
March 17, 2022
Technology
7.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
High Availability Vault Service on AWS Environment
Gea-Suan Lin
March 17, 2022
More Decks by Gea-Suan Lin
See All by Gea-Suan Lin
用 AWS CodeDeploy 解決程式佈署
gslin
0
450
MySQL to NoSQL & Search Engine
gslin
0
2.2k
用 Vagrant 與 Docker 拯救世界
gslin
1
310
Startup IT infrastructure: Developing and Working with AWS
gslin
8
3.8k
Talk about Percona XtraDB Cluster
gslin
0
210
API Design Optimized for Mobile Platform
gslin
9
8.8k
Use Facebook::Graph to write desktop application
gslin
2
520
COSCUP 2012 - MySQL System Stability
gslin
17
12k
MySQL System Stability
gslin
4
6k
Other Decks in Technology
See All in Technology
凡エンジニアがこの先生きのこるためには。〜TypeScript完全に理解したい〜
alchemy1115
2
310
Terraform共通モジュールをチーム横断で“変えられる”運用へ ― リリースと適用の分離
kekke_n
1
3.4k
2年前に削除したPHPクラスが、 ある日突然決済をエラーにした
ykagano
1
290
「AIに依存している」と 「AIを使いこなしている」の違い
k8yasuma
0
120
End-to-Endで考える信頼性 —LINEアプリにおけるクライアント開発×SRE連携の実践
maruloop
4
4.6k
SREとQA 二人三脚で進めるSLO運用/sre-qa-slo
sugitak
0
920
CSに"SLO"は要らない、経営層に"99.9%"は伝わらない - SREを全社に"翻訳"する3原則
cscengineer
PRO
1
5k
ファミコンでPHPを動かす / PHP on the Famicom
tomzoh
2
420
Making sense of Google’s agentic dev tools
glaforge
1
280
最適な自走を最小限の支援で — M&Aで拡大する組織で少人数SREが挑んだ1年 / SRE NEXT 2026
genda
0
1.5k
[2026-07-15] AI Ready なはずだったアーキテクチャと、見えてきた課題・次に目指す状態
wxyzzz
9
4k
公式ドキュメントの歩き方etc
coco_se
1
120
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
350
Technical Leadership for Architectural Decision Making
baasie
3
440
Making the Leap to Tech Lead
cromwellryan
135
10k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Code Review Best Practice
trishagee
74
20k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Transcript
High Availability Vault Service on AWS Environment Gea-Suan Lin (DK)
Director of SW Platform and Infrastructures
Links • This slide: ◦ https://bit.ly/3igUbgh • AWS Summit Taiwan
2021: ◦ https://aws.amazon.com/tw/events/taiwan/2021summit/ • My wiki: ◦ https://wiki.gslin.org/wiki/Vault/Install (in Chinese)
Explain “Migo” • https://wiki.gslin.org/wiki/Migo
What is HashiCorp Vault? • “Manage secrets and protect sensitive
data” • Usually: ◦ Credentials ◦ Tokens ◦ … • Sometimes: ◦ Endpoint information ◦ …
Why do people need Vault? • Auditing. • Credentials/tokens versioning.
• We don’t want to put credentials into Ansible and/or GitLab…
Today’s objectives • High availability. ◦ But I don’t want
to manage HA by myself.
Technologies • Amazon EC2 (Multi-AZ) ◦ (or container-based services like
ECS/EKS) • Amazon DynamoDB • AWS KMS • AWS ELB • AWS ACM (optional)
Setup DynamoDB • Create a table called vault. ◦ Primary
key as Path. ◦ Sort key as Key.
None
Setup KMS • Create a key with SYMMETRIC_DEFAULT.
None
Setup EC2 • Create two t3a.nano or t4g.nano instances. •
We choose Ubuntu 20.04.
None
Install Vault curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -;
sudo apt-add-repository "deb https://apt.releases.hashicorp.com $(lsb_release -cs) main"; sudo apt update && sudo apt install vault
Setup Vault api_addr = "http://10.10.10.10:8200" cluster_addr = "http://10.10.10.10:8201" log_level =
"Info" ui = true listener "tcp" { address = "0.0.0.0:8200" cluster_address = "10.10.10.10:8201" tls_disable = "true" } seal "awskms" { region = "ap-southeast-1" access_key = "x" secret_key = "x" kms_key_id = "x" } storage "dynamodb" { ha_enabled = "true" region = "ap-southeast-1" table = "vault" access_key = "x" secret_key = "x" }
Setup EC2 IAM Role • Create an EC2 role. •
Attach two inline policies. • Attach to EC2 instances.
EC2 IAM Role - Policy-Vault-DynamoDB { "Version": "2012-10-17", "Statement": [
{ "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "dynamodb:BatchGetItem", "dynamodb:BatchWriteItem", "dynamodb:PutItem", "dynamodb:DescribeTable", "dynamodb:DeleteItem", "dynamodb:GetItem", "dynamodb:Scan", "dynamodb:ListTagsOfResource", "dynamodb:Query", "dynamodb:UpdateItem", "dynamodb:DescribeTimeToLive", "dynamodb:GetRecords" ], "Resource": [ "arn:aws:dynamodb:ap-southeast-1:123456789012:table/vault/stream/*", "arn:aws:dynamodb:ap-southeast-1:123456789012:table/vault/index/*", "arn:aws:dynamodb:ap-southeast-1:123456789012:table/vault" ] }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": [ "dynamodb:DescribeReservedCapacityOfferings", "dynamodb:ListTables", "dynamodb:DescribeReservedCapacity", "dynamodb:DescribeLimits" ], "Resource": "*" } ] }
EC2 IAM Role - Policy-Vault-KMS { "Version": "2012-10-17", "Statement": [
{ "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "kms:Decrypt", "kms:Encrypt", "kms:DescribeKey" ], "Resource": "arn:aws:kms:ap-southeast-1:123456789012:key/01234567-89ab-cdef-0123-456789abcdef" } ] }
None
Setup ELB • Choose ALB • /v1/sys/health as health check
path. • Backend in port 8200. • Frontend in port 80. ◦ Recommend to use ACM for HTTPS (port 443).
Start Vault sudo systemctl enable vault; sudo service vault start
Initialization # Remember to write down the root token vault
operator init \ -recovery-shares=1 \ -recovery-threshold=1 \ -address=http://127.0.0.1:8200
Now it’s working • http://vault.example.com/ ◦ https://vault.example.com/ (HTTPS)
Monitoring • Cloudwatch ◦ ELB (ALB) ◦ EC2 ◦ DynamoDB
◦ KMS
That’s it… • Q&A after sessions. • And we’re hiring!