Slide 1

Slide 1 text

© NTT Communications Corporation All Rights Reserved. AWS Outposts 上のリソースを CDK する
 2022/4/9
 NTT Communications 株式会社
 福田優真


Slide 2

Slide 2 text

© NTT Communications Corporation All Rights Reserved. 2 目次
 ● 自己紹介
 ● AWS Outposts について
 ● AWS Outposts のリソースを CDK する方法
 ● まとめ


Slide 3

Slide 3 text

© NTT Communications Corporation All Rights Reserved. 3 自己紹介
 ● 名前: 福田優真
 ● 所属: NTT Com イノベーションセンター
 ○ 主にクラウドまわりをやってます
 ■ マルチクラウド
 ■ ハイブリッドクラウド


Slide 4

Slide 4 text

© NTT Communications Corporation All Rights Reserved. 4 取り扱い元
 ● ニュースリリース出てます
 ○ 国内初、「AWS Outposts」に 自社データ分析ツールを組み 込んだソリューションを開発 ● 発表で取り扱う内容についての ブログ書きました


Slide 5

Slide 5 text

© NTT Communications Corporation All Rights Reserved. 5 本題


Slide 6

Slide 6 text

© NTT Communications Corporation All Rights Reserved. 6 要約
 AWS Outposts で動くリソースを CDK する話


Slide 7

Slide 7 text

© NTT Communications Corporation All Rights Reserved. 7 苦労した点
 ● とにかく CFn がサポートしてなくて、
 カスタムリソースでガリガリ
 ○ サポートしても L1
 ○ フィードバックはしてるので、もしかしたら状況
 変わるかも
 ● 一部リソースが別のリソースを利用するのに必要だが、
 特にそれらに依存性がないことによるデプロイ単位を
 決めるのに最初は困った
 ● レファレンスがないので、ドキュメントや
 API レファレンス、エラーメッセージと睨めっこして
 ひたすら解析
 ● etc…


Slide 8

Slide 8 text

© NTT Communications Corporation All Rights Reserved. 8 AWS Outposts


Slide 9

Slide 9 text

© NTT Communications Corporation All Rights Reserved. 9 AWS Outposts
 AWS の出すハイブリッドクラウド製品


Slide 10

Slide 10 text

© NTT Communications Corporation All Rights Reserved. 10 ハイブリッドクラウド
 ● オンプレミスにクラウドサービスを導入するための
 ソリューション
 ● Azure/GCP/AWS 各社が展開中
 ○ Azure Stack Hub/HCI
 ○ GCP Anthos/Distributed Cloud
 ○ AWS Outposts
 ● データを Public な場所に流さなくても
 クラウドサービスを利用できるようになる


Slide 11

Slide 11 text

© NTT Communications Corporation All Rights Reserved. 11 従来のクラウドサービス


Slide 12

Slide 12 text

© NTT Communications Corporation All Rights Reserved. 12 ハイブリッドクラウドサービス


Slide 13

Slide 13 text

© NTT Communications Corporation All Rights Reserved. 13 AWS Outposts 詳解
 ● AWS のサブセットが提供される
 ○ EC2, EKS, ALB, S3, …
 ● Public な AWS と変わらない体験を提供
 ○ Public な AWS のリソースともシームレスに連携
 ● 42U ラックまたは 1U/2U サーバータイプを販売
 ○ 今回は 42U ラックで試した結果について解説


Slide 14

Slide 14 text

© NTT Communications Corporation All Rights Reserved. 14 AWS Outposts 詳解
 管理もマネジメントコンソールからできる


Slide 15

Slide 15 text

© NTT Communications Corporation All Rights Reserved. 15 AWS Outposts 詳解
 Outpost 上の subnet 等もマネジメントコンソールから管理可能


Slide 16

Slide 16 text

© NTT Communications Corporation All Rights Reserved. 16 AWS Outposts のデプロイイメージ
 Outposts は AZ に紐付く


Slide 17

Slide 17 text

© NTT Communications Corporation All Rights Reserved. 17 AWS Outposts のイメージ
 42U タイプ
 (ref: https://aws.amazon.com/jp/blogs/news/outposts-osaka/)


Slide 18

Slide 18 text

© NTT Communications Corporation All Rights Reserved. 18 AWS Outposts のユースケース
 ● 低レイテンシーなコンピューティング
 ○ Public AWS よりも近くでやりとりするため、
 レイテンシーの要件が厳しいところでも導入可能
 ● ローカルなデータ処理
 ○ データが外出しできないような場所でも
 外にデータが出ないため導入可能
 ● データレジデンシー
 ○ データを特定の地域に留めおかなければならない
 場所でもその地域にデプロイするだけ
 ● オンプレミス環境のモダナイズ
 ○ クラウド移行の前段として


Slide 19

Slide 19 text

© NTT Communications Corporation All Rights Reserved. 19 AWS Outposts with CDK


Slide 20

Slide 20 text

© NTT Communications Corporation All Rights Reserved. 20 やりたいこと
 AWS Outposts 上で動くリソースを CDK で管理する


Slide 21

Slide 21 text

© NTT Communications Corporation All Rights Reserved. 21 試した Outposts リソース
 ● subnet
 ● EBS Volume
 ● S3 on Outposts
 ○ Outposts に載せるものは S3 on Outposts と
 呼ばれる
 ● ALB


Slide 22

Slide 22 text

© NTT Communications Corporation All Rights Reserved. 22 試した結果
 ● 一部カスタムリソースを使わなくてはならない
 ● L2 サポートがまだ


Slide 23

Slide 23 text

© NTT Communications Corporation All Rights Reserved. 23 カスタムリソース
 ● CloudFormation が対応してないリソースを
 管理する仕組み
 ● 作成/更新/削除のライフサイクルを Lambda で管理
 ● CDK でやる場合は provider framework という
 AWS が提供するフレームワークに則って
 ボイラープレートとライフサイクルを担当する
 Lambda を用意するだけ


Slide 24

Slide 24 text

© NTT Communications Corporation All Rights Reserved. 24 Lambda 実装例


Slide 25

Slide 25 text

© NTT Communications Corporation All Rights Reserved. 25 Lambda 実装例
 どんなライフサイクルでフックされた のかの状態を示す

Slide 26

Slide 26 text

© NTT Communications Corporation All Rights Reserved. 26 Lambda 実装例
 各ライフサイクルに合わせて リソース操作

Slide 27

Slide 27 text

© NTT Communications Corporation All Rights Reserved. 27 ボイラープレート


Slide 28

Slide 28 text

© NTT Communications Corporation All Rights Reserved. 28 ボイラープレート
 ライフサイクルをハンドルする Lambda を用意する

Slide 29

Slide 29 text

© NTT Communications Corporation All Rights Reserved. 29 ボイラープレート
 Provider Framework お決まりのコード

Slide 30

Slide 30 text

© NTT Communications Corporation All Rights Reserved. 30 ボイラープレート
 ハンドラに追加で渡したいものは この properties に オブジェクトで指定

Slide 31

Slide 31 text

© NTT Communications Corporation All Rights Reserved. 31 カスタムリソース使用先
 ● subnet
 ○ 顧客所有の IP をリソースにつける操作が未サポート
 ■ 顧客所有の IP: オンプレ環境から AWS に
 接続する IP アドレス
 ● ALB
 ○ Outposts へのデプロイ自体が未サポート


Slide 32

Slide 32 text

© NTT Communications Corporation All Rights Reserved. 32 カスタムリソースがいらないもの
 ● S3 on Outposts
 ○ L1 はサポートされているが、プレビュー段階
 ● EBS Volume
 ○ L1 サポート済み


Slide 33

Slide 33 text

© NTT Communications Corporation All Rights Reserved. 33 Outposts resources with CDK


Slide 34

Slide 34 text

© NTT Communications Corporation All Rights Reserved. 34 EBS Volume
 デプロイ先 Outpost を指定するだけ


Slide 35

Slide 35 text

© NTT Communications Corporation All Rights Reserved. 35 EBS Volume


Slide 36

Slide 36 text

© NTT Communications Corporation All Rights Reserved. 36 EBS Volume
 デプロイ先を指定するだけ

Slide 37

Slide 37 text

© NTT Communications Corporation All Rights Reserved. 37 S3 on Outposts
 ● バケットとは別に次の2つをデプロイする必要がある
 ○ Outposts エンドポイント
 ■ VPC から S3 on Outposts へ接続するための
 ネットワークインターフェースコレクション
 ○ アクセスポイント
 ■ バケットポリシーを管理を簡素化してくれる機能
 ● バケットは aws-cdk-lib/aws-s3outposts に
 あるものを利用して管理する必要がある
 ○ v1 なら @aws-cdk/aws-s3outposts ● 現在プレビュー段階

Slide 38

Slide 38 text

© NTT Communications Corporation All Rights Reserved. 38 S3 on Outposts(Outposts エンドポイント)
 ● サブネット内に Outpost 毎に用意する
 ○ 同じサブネットに2つつくろうとするとエラー
 ○ サブネット内で共有して利用される
 ● バケットに紐付いてないので、サブネットと一緒に
 管理した方が良さそう
 ● 443(HTTPS) inboud ルールを持つ
 セキュリティグループを割り当てなければならない
 ● 最近サポートされた?(昨年10月あたりは CLI か
 マネジメントコンソールからしか操作できなかったはず)


Slide 39

Slide 39 text

© NTT Communications Corporation All Rights Reserved. 39 S3 on Outposts(Outposts エンドポイント)
 S3 のマネジメントコンソール内にあるが、直接 S3 on Outposts に
 結び付いてるわけではない


Slide 40

Slide 40 text

© NTT Communications Corporation All Rights Reserved. 40 S3 on Outposts(Outposts エンドポイント)


Slide 41

Slide 41 text

© NTT Communications Corporation All Rights Reserved. 41 S3 on Outposts(Outposts エンドポイント)
 デプロイ先の情報と エンポイントにつける SG の 情報を設定する

Slide 42

Slide 42 text

© NTT Communications Corporation All Rights Reserved. 42 S3 on Outposts(バケット)
 ● aws-cdk-lib/aws-s3outpost に専用の
 コンポーネントがある
 ● Outpost 毎に分離されているため、デプロイ先
 Outpost を指定する必要がある
 ○ Public 上の S3 とも分離されている


Slide 43

Slide 43 text

© NTT Communications Corporation All Rights Reserved. 43 S3 on Outposts(バケット)


Slide 44

Slide 44 text

© NTT Communications Corporation All Rights Reserved. 44 S3 on Outposts(バケット)
 バケット名の他に デプロイ先 Outpost を指定する

Slide 45

Slide 45 text

© NTT Communications Corporation All Rights Reserved. 45 S3 on Outposts(アクセスポイント)
 ● S3 の機能の1つでありバケットに紐付くので、
 S3 on Outposts バケットと一緒に管理した方が
 良さそう
 ● VPC 単位でデプロイ
 ● 実はアクセスポイントをデプロイすると、デプロイ先
 サブネットに Outposts エンドポイントがなければ
 勝手にデプロイしてくれる
 ○ 共有設定も勝手にしてくれるので、実はこれを
 コードで定義しておけば OK だったり


Slide 46

Slide 46 text

© NTT Communications Corporation All Rights Reserved. 46 S3 on Outposts(アクセスポイント)


Slide 47

Slide 47 text

© NTT Communications Corporation All Rights Reserved. 47 S3 on Outposts(アクセスポイント)
 アクセスポイント名や接続先 バケット、 デプロイ先 VPC を 指定する ★ aws-cdk-lib/aws-s3 のアクセスポイントでは bucket にバケット名を取る が、 aws-cdk-lib/aws-s3outposts はバケットARN をとる


Slide 48

Slide 48 text

© NTT Communications Corporation All Rights Reserved. 48 subnet
 ● Outpost 上へのデプロイはサポート済み
 ● 顧客所有の IP アドレスをサブネット上のリソースに
 つける設定(mapCustomerOwnedIpOnLaunch)を
 入れるにはカスタムリソースを使う


Slide 49

Slide 49 text

© NTT Communications Corporation All Rights Reserved. 49 subnet


Slide 50

Slide 50 text

© NTT Communications Corporation All Rights Reserved. 50 subnet
 デプロイ先 Outpost を指定できる プロパティが追加されている

Slide 51

Slide 51 text

© NTT Communications Corporation All Rights Reserved. 51 subnet(MapOnCustomerOwnedIpOnLaunch)
 ● ModifySubnetAttribute API に MapOnCustomerOwnedIpOnLaunch の設定がある
 ○ これを利用
 ○ ちなみに、 CreateSubnet API にはこの設定がない


Slide 52

Slide 52 text

© NTT Communications Corporation All Rights Reserved. 52 subnet(MapOnCustomerOwnedIpOnLaunch)


Slide 53

Slide 53 text

© NTT Communications Corporation All Rights Reserved. 53 subnet(MapOnCustomerOwnedIpOnLaunch)
 参照先顧客所有 IP のプール ID を設 定し、 map するようにする

Slide 54

Slide 54 text

© NTT Communications Corporation All Rights Reserved. 54 ALB
 ● Outposts 上へのデプロイもできないので、
 カスタムリソースで自前管理する必要がある
 ● もちろん、顧客所有の IP をつける場合も同じで
 カスタムリソースによるリソース作成時に設定する
 必要がある
 ○ subnet と違って CreateLoadBalancer API では
 設定できるが、
 ModifyLoadBalancerAttributes API では
 設定不可


Slide 55

Slide 55 text

© NTT Communications Corporation All Rights Reserved. 55 ALB(作成/更新)
 ★ 更新時はリソースを作っておけば、古いものは自動削除される


Slide 56

Slide 56 text

© NTT Communications Corporation All Rights Reserved. 56 ALB(作成/更新)
 参照先顧客所有 IP のプール ID を設 定し、 map するようにする ★ 更新時はリソースを作っておけば、古いものは自動削除される


Slide 57

Slide 57 text

© NTT Communications Corporation All Rights Reserved. 57 ALB(削除)


Slide 58

Slide 58 text

© NTT Communications Corporation All Rights Reserved. 58 ALB(削除)
 デプロイしたロードバランサーを 指定する

Slide 59

Slide 59 text

© NTT Communications Corporation All Rights Reserved. 59 まとめ


Slide 60

Slide 60 text

© NTT Communications Corporation All Rights Reserved. 60 サポート状況
 ● L2 はなく、 L1 サポートのみ
 ● Outposts へのサポート状況にバラつきあり
 ○ サポート済: ELB Volume, S3 on Outposts
 ■ ただし、 S3 on Outposts はプレビュー段階
 ○ 一部サポート済: subnet
 ○ 未サポート: ALB


Slide 61

Slide 61 text

© NTT Communications Corporation All Rights Reserved. 61 まとめ
 ● オンプレでもクラウドの恩恵を預かれるハイブリッド
 クラウド製品が登場してきた
 ○ AWS Outposts
 ● AWS Outposts に展開するリソースを CDK する
 方法について紹介
 ● Outposts を CDK でやるにはカスタムリソースの
 知識が必要
 ○ CDK で設定できない項目がある


Slide 62

Slide 62 text

© NTT Communications Corporation All Rights Reserved. 62 NTT Communciations 株式会社