group 本番用 us-east-1 (ASGはmax3台設定) 開発用 本番用 Update AMI Id Latest RDP/http CreateImage Daily Backup Set Version Latest CreateAutoScalingGroup ap-northeast-3 10.2.0.0/16 10.2.0.0/24 10.2.1.0/24 Sg-pub Sg-pri Sg-pri Sg-ALB https http ap-southeast-1 Daily Backup Copy Latest Backup AMI LaunchTemplate ap-northeast-1 AMI Id DevImage temporary AMI Id Copy Image Extract AMI Id http start stop LaunchTemplate ①ASGに起動テンプレートLatest設定 ②DLM起動後にAMI Id登録 ④AMI Id parameter出力 Azure IdP RDP https User https Developer ③AMI copy
ap-northeast-1 AMI Id Dev Image Copy Image LaunchTemplate temporary AMI Id Extract AMI Id VPCとEC2をdeployする前に AMIのCrossRegionCopyから 起動用のImageを作成 templateのdeploy時に parameter storeからAMI Id読み込みアタッチ
--region us-east-1 responce.json $ aws lambda invoke --function-name Export-Latest-AMIId-Function --region us-east-1 responce.json VPC、NW、ec2のdeploy $ cd .. $ cd project_root/EC2_Deploy $ sam deploy AutoScalingGroupのdeploy $ cd .././EC2_ASG_Deploy $ sam deploy 開発用EC2をオリジンとするCloudfrontのdeploy $ cd .././CloudFront_Deploy $ sam deploy 開発用EC2の自動起動・自動停止をするLambda関数のdeploy $ cd .././DevEC2-START-STOP-FUNC $ sam deploy