afrou04 / plactice-aws

0 stars 0 forks source link

本番・ステージ環境ネットワーク構築 #5

Open afrou04 opened 4 years ago

afrou04 commented 4 years ago

アーキテクチャイメージ

スクリーンショット 2020-05-13 21 24 08 スクリーンショット 2020-05-13 21 23 57

TODO

テスト

afrou04 commented 4 years ago

ルートテーブル作成 https://qiita.com/naoki_mochizuki/items/f795fe3e661a3349a7ce#4%E3%83%AB%E3%83%BC%E3%83%88%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AE%E4%BD%9C%E6%88%90

プライベートサブネット作成 https://www.udemy.com/course/draft/1706378/learn/lecture/10689216#overview

ALBの作成 https://www.udemy.com/course/draft/1706378/learn/lecture/10759890#overview

afrou04 commented 4 years ago

本番環境ではEC2のcloud watchのモニタリングを有効化する

スクリーンショット 2020-06-14 20 37 47

afrou04 commented 4 years ago

ec2にsshで接続

$ chmod 400 {filename}.pem
$ ssh -i {filename}.pem ec2-user@{ec2-ip-address}
afrou04 commented 4 years ago

alb, tg(target group)を作成後、作成したtgを確認。 設定したEC2のステータスがhealthyになっているかをチェックする。

albのDNS名をコピーしてブラウザで確認したときに正常にEC2のレスポンスが返却されていれば成功

afrou04 commented 4 years ago

EC2 hello worldにおすすめ https://qiita.com/kumamonmaster/items/f384f378ed70da865d8d

afrou04 commented 4 years ago

本番 ALBまで完了

afrou04 commented 4 years ago

ssl

https://qiita.com/yujiro0102/items/8a58fa92b861edd14547 https://qiita.com/mongamae-nioh/items/7629f66797e3bc7a752d https://qiita.com/gremito/items/2a416b042a0c94d4541d

https://blog.kozakana.net/2019/03/aws-dns-validate/

スクリーンショット 2020-06-15 18 19 00

こんなイメージ?

acmの設定をやったら、route53で設定するという項目が出るのでそれをすれば30分程度で登録できる。

ALBのリスナーの設定を追加する必要がある。 リスナーに追加でACMを設定する。 https://dev.classmethod.jp/articles/aws-beginner-elb-ssl/

afrou04 commented 4 years ago

Appatchのhttps変換の設定 実際はnginxを使うので、必要ない可能性も https://aws.amazon.com/jp/premiumsupport/knowledge-center/redirect-http-https-elb/

afrou04 commented 4 years ago

rds

TODO

security group 例 スクリーンショット 2020-06-16 11 52 01

RDS接続方法

afrou04 commented 4 years ago

role

まとめ

https://scrapbox.io/k5690033-88476523/aws_iam

参考記事

awsのアカウント管理について https://nishiyama.hatenablog.com/entry/how-to-manage-aws-access-key-safely#%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB

特定のbucketのみのアクセスを許可する http://blog.serverworks.co.jp/tech/2018/04/23/post-63971/

6/16