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
AWS Directory ServiceとFSxをCLIでさわってみた / AWS Dire...
Search
める
September 02, 2021
Technology
620
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS Directory ServiceとFSxをCLIでさわってみた / AWS Directry Service and FSx for Windows Server
2021/09/02 JAWS-UG CLI専門支部でのLT内容です。
める
September 02, 2021
More Decks by める
See All by める
AWSをCLIで理解したい! / I want to understand AWS using the CLI
mel_27
2
1.4k
AWS ドキュメントをあるいてみた / Walk on AWS documents
mel_27
0
220
Amazon FSx for ONTAPを 試してみた / Try Amazon FSx for ONTAP
mel_27
0
950
Other Decks in Technology
See All in Technology
LLMと共に進化するプロセスを目指して
ymatsuwitter
13
4.1k
DevOps Agentで始めるAWS運用 〜フロンティアエージェントが変える運用の現場〜
nyankotaro
1
390
Android の公式 Skill / Android skills
yanzm
0
140
非定型業務をAI slackbotで自動化する ~ 社内要望を自動壁打ちするbotを作った ~/automating-ad-hoc-work-with-ai-slackbot
shibayu36
0
630
On-behalf-of Token exchange with AgentCore Identity
hironobuiga
2
160
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
1
720
攻撃者視点で考えるDetection Engineering
cryptopeg
2
1.5k
2026.06.13_AI時代に事業会社が「SIer出身エンジニア」を求める理由 / Why Businesses Seek Engineers with a System Integrator Background in the AI Era
jumtech
0
1.1k
失敗を経て、Harness Engineering で 大切にしたいことを考える / Learning from Failure: What Matters in Harness Engineering
bitkey
PRO
1
340
AIの性能が向上しても未解決な組織の重大問題は何か?/An Unsolved Organizational Problem in the Age of AI
moriyuya
4
640
Disciplined Vibes: Scaling AI-Assisted Engineering
sheharyar
0
140
脆弱性対応、どこで線を引くか
rymiyamoto
1
380
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
How GitHub (no longer) Works
holman
316
150k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Done Done
chrislema
186
16k
Scaling GitHub
holman
464
140k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
71
40k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Transcript
AWS Directory Serviceと FSxをCLIでさわってみた める(@mel________27) JAWS-UG CLI専門支部 #224R 2021/09/02
Who am I? 名前:める (@mel________27) 所属:三重県の某SIer 業務:インフラエンジニア(今年6月~) 好きなAWSのサービス:Cloud9、CloudShell 2
AWS Directory Service とは Microsoft Active Directoryなどのディレクトリサービスを提供するサービス。 コマンド:ds Simple ADとMicrosoft
Active Directoryが作成できますが 今回はMicrosoft Active Directoryの話をします。 3
AWS Managed Microsoft AD とは MicrosoftのActive Directoryの機能を提供するマネージド型サービス。 Active Directoryとは Microsoftのディレクトリサービス。
Windows Serverがあれば機能を有効化するだけで使える。 ※Azure Active Directoryもある 4
Amazon FSxとは ファイルサーバのマネージド型サービス。 コマンド:fsx FSx for Windows ServerとFSx for Lustreがありますが
今回はFSx for Windows Serverの話をします。 5
構成図 亀田さん主催のハンズオン手順をもとにしています https://github.com/harunobukameda/Amazon-FSx-for-Windows-File-Server Amazon FSx for Windows File Server AWS
Managed Microsoft AD Amazon EC2 (AD管理用) ドメイン認証 ドメイン認証 ファイル共有 6
aws ds create-microsoft-ad \ --name ドメイン名(フル) \ --short-name NetBIOS名(短いドメイン名) \
--password Adminのパスワード \ --edition エディション(Standard/Enterprise) \ --vpc-settings VpcId=VPCID,SubnetIds=サブネットID1,サブネットID2 ※サブネットは複数AZを指定する必要がある。 Microsoft ADの作成コマンド 7
Microsoft ADの作成とSimple ADの作成でサブコマンドが違う! create-microsoft-ad サブコマンド →Microsoft ADを作成するためのコマンド create-directory サブコマンド →Simple
ADを作成するためのコマンド ※確認コマンドはどちらもdescribe-directories つまづきポイント① 8
その他 - 管理者として与えられるユーザはAdmin。(× Administrator) - ADの機能はWindows Server 2012 R2がベース。 -
AD本体のイベントログが見れない、など制限事項はいくつかあるので、 オンプレミスから移行する場合は現行の利用機能が使用できるか要確認。 - オンプレミスADの冗長設定としてDirectory Serviceを使用するのは無理そう。 (別ドメインを作って信頼関係を結ぶしかない) 9
その他 - EC2(Win SV)をドメインに追加する場合、マネコンだとドメインの指定があるが CLIでの作成時は指定できないようなので 作成したEC2にログインしてドメイン参加するしかなさそう。 10
aws fsx create-file-system \ --file-system-type ファイルシステム種別 (WINDOWS/LUSTRE) \ --storage-capacity ストレージ容量
\ --storage-type ストレージタイプ(HDD/SSD) \ --subnet-ids サブネットID1 サブネットID2 \ --tags Key=Name,Value=${FSX_TAG_NAME} \ --windows-configuration ActiveDirectoryId=ディレクトリID,DeploymentType=MULTI_AZ_1, PreferredSubnetId=優先サブネット,ThroughputCapacity=スループットキャパシティ ※windows-configurationは別ファイル(JSON)にして読み込んだほうがいいかも FSxの作成コマンド 11
aws fsx create-backup \ --file-system-id ファイルシステムID \ --tags Key=Name,Value=タグ名 ※バックアップの作成中にもう一度バックアップの作成コマンドを実行すると
エラーになる FSxのバックアップコマンド 12
つまづきポイント② 削除時のコマンドについて、最終バックアップの取得がデフォルトで有効なので ファイルシステムの作成に失敗したものを削除しようとするとエラーになった 明示的にバックアップのスキップを指定する必要がある (この時は別のVPCに存在するADを指定してしまったためエラー発生) 13
その他 - 自動バックアップについて 毎日のバックアップの時間のデフォルト値がまちまちなので 指定したほうがよさそう(作成タイミングに依存する?) 14
まとめ - CLIからDirectory Service(AWS Managed Microsoft AD)を作成した。 - CLIからFSx for
Windows Serverを作成した。 - AWS Managed Microsoft ADの制限事項については 利用する場合は要件にあうか確認が必要そう。 - (FSxでマネコンの一部の挙動が気になったこともあり) 今後もできるだけCLIを使っていきたい。 15
参考 亀田さん主催のハンズオン手順 https://github.com/harunobukameda/Amazon-FSx-for-Windows-File-Server [AWS Black Belt Online Seminar] AWS Managed
Microsoft AD https://aws.amazon.com/jp/blogs/news/webinar-bb-awsmanagedmicrosoftad-2021/ 16