将请求转发到ECS 集群(接上篇)
一 、ALB编辑
二、ACL编辑
- my-acl-01 (public acl)编辑入出站规则
- my-acl-02 (private acl)同样的入出站规则编辑
三、NAT网关创建
- 创建在共有子网01上
四、编辑私有路由表
- 指向NAT网关
五、任务定义
/bin/sh -c "echo '<html> <head> <title>Amazon ECS Sample App</title> <style>body {margin-top: 40px; background-color: #333;} </style> </head><body> <div style=color:white;text-align:center> <h1>Amazon ECS Sample App</h1> <h2>Congratulations!</h2> <p>Your application is now running on a container in Amazon ECS.</p> </div></body></html>' > /usr/local/apache2/htdocs/index.html && httpd-foreground"
- 任务定义创建成功
- cloudwatch 创建成功
六、创建ECS集群
-
创建集群服务
-
成功访问容器里的HTTP服务
-
-
cloudwatch 监视成功