This is a post about the specific usage of AWS services that I tried to use for acquiring AWS qualifications. This time, we will try using Docker on AWS and Amazon ECS (Amazon Elastic Container Service). You can publish a web application using Docker in about 15 minutes.
See below for the article on how to study for the qualification exam.
AWS Beginners Study when AWS Certified Solutions Architect-Associate Qualification Exam AWS Beginners AWS Certified Solutions Architect-Study Method When Passing Professional Qualification Exam
Let's do it. That said, all you have to do is follow the wizard in the ECS Start Now menu. First, to explain only the big picture, the concept of ECS is
As shown in the figure, there are four types, ** Container definition **, ** Task definition **, ** Service **, and ** Cluster **, which are set on three screens according to the wizard.
OK, let's get started. Click the initial screen of ECS or ** Start Now ** on the cluster to start.
Or Click ** Start Now ** to get started. (1st click)
Set the Container definition and Task definition on the first screen. In the container definition, httpd, nginx and tomcat are provided by default. (Select httpd this time) Both the container definition and task definition have a ** edit ** button on the upper right, and some parameters can be customized. For the time being, leave the default and click ** Next **. (2nd click)
Next is the service settings. It seems that ALB can be incorporated as a ** load balancer **, but for the time being, leave ** none ** and click ** next **. (3rd click)
Finally, the cluster settings. However, since it is only ** cluster name **, leave the default and click ** Next **. (4th click)
A confirmation screen will be displayed. Confirm it and click ** Create **. that's all! ** Click 5 times ** to complete the creation! !!
It seems that CloudFormation is used internally, so if you do your best to make it from VPC and there is no problem, it will be created in a few minutes.
After a few minutes ...
Let's click ** View Services **. You can check the created VPC, subnet, and security group information.
Click ** Created Task ** from the ** Tasks ** tab
Since ** public IP ** is assigned, http: // {assigned public IP} / I will try to access it with.
If ↓ is displayed, you have created it without any problem. The web application has been published on AWS ECS!
As an entity, it is as follows defined in the container definition.
Yes, 5 clicks are complete. After that, let's tinker with container definitions etc. ^ ^
It seems that you can easily publish a web application just by specifying the container image of the http (80 port) web application created by yourself with ** custom ** of the Container definition setting.
Set the container image on the opened screen
You can easily do this from ** Delete Cluster ** in the ** Cluster ** menu. Since we are using CloudFormation, everything from the VPC to the task definition of the container is completely deleted.
It was much easier to create than I had imagined. If it is left as it is, the default settings will remain, so in the future I will take a closer look at the settings etc. (^^)
Recommended Posts