Skip to content

Instantly share code, notes, and snippets.

@omas-public
Last active July 13, 2026 07:13
Show Gist options
  • Select an option

  • Save omas-public/e783900200af2cba75f8d481bb9e2338 to your computer and use it in GitHub Desktop.

Select an option

Save omas-public/e783900200af2cba75f8d481bb9e2338 to your computer and use it in GitHub Desktop.

AWS Hands On

  1. 公開鍵を除き,作成したすべてを削除する
  2. 以下の手順で作成する

VPC及びサブネットを作成する

  • VPCを作成する
  • Publicサブネットを作成する
  • Privateサブネットを作成する

Internet Gatewayを作成する

  • Internet Gatewayを作成し、VPCにアタッチする

RoutingTable(ルートテーブル)を作成する

  • Publicサブネット用のroute tableを作成する
  • Privateサブネット用のroute tableを作成する

Firewall(セキュリティグループ)を作成する

  • bastion用のセキュリティグループを作成する
    • ssh:0.0.0.0/0
  • Webサーバ用のセキュリティグループを作成する
    • ssh:bastion/32
    • http:0.0.0.0/0
  • DBサーバ用のセキュリティグループを作成する
    • ssh:bastion/32
    • dbport:webserver/32

EC2インスタンスを作成する

  • bastion用のEC2インスタンスをfirewallを適用して作成する
  • Webサーバ用のEC2インスタンスをfirewallを適用して作成する
  • DBサーバ用のEC2インスタンスをfirewallを適用して作成する

Nat Gatewayを作成する

  • Nat Gatewayを作成して、Publicサブネットに配置する
  • Privateサブネットのroute tableにNat Gatewayを設定する

サーバーのインストール

  • WebサーバにApacheをインストールする
  • DBサーバにMariaDBをインストールする

NatGatewayおよびelastic IP の削除

  • NatGatewayとelastic IP を削除する
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment