Hello everyone. I am Budi. I want to write about Amazon LightSail. Amazon LightSail is an AWS service that can build application and website with low-cost and predictable price. Amazon LightSail has several features like instance, database, storage, networking, container and snapshot.
For this tutorial, I explain about LightSail container and deploy container using Amazon ECR.
Go to Compute section, choose LightSail and automatically open to new tab because the LightSail website is difference from the AWS console. Then choose Containers and click Create container service.
You can change the AWS region with click Change AWS region. Use North Virginia (us-east-1) for deploying ECR private on LightSail.
Choose container service capacity based on memory, vCPU and cost. The price is predictable. Also, can want how many capacity needs.
The deployment section doesn’t need it for now but needs it later. Fill in the service name and get a domain for the container service. You can see the summary and click Create container service for the next step.
The container service status is pending. This means the LightSail container prepare infrastructure and when the status is running, the domain can be accessed.
Now, LightSail can add ECR private image based on the link. Amazon LightSail containers now support deploying images from Amazon ECR private repositories. Before LightSail can add ECR private image, LightSail can add ECR public and Docker Hub only. Click the Images section.
Scroll down until see Amazon ECR private repositories. Then click Add repository.
Because I has one ECR private image on North Virginia, automatically show and choose the ECR private image. Click Add.
If you can see this screenshot, you must go to ECR page for create permissions between ECR private and LightSail.
Click blue bullet, click Actions then Permissions.
Click Edit policy JSON and if finished, click Save. You see the left screenshot if the policy JSON is true with ManageEcrPrivateRepositoriesAccess name.
The right screenshot is when the deployment ECR private image is successful, automatically created ECR private image permissions AllowLightsailPull-.
If edit ECR private permissions are successful, the two requirements are valid then can click Continue. You can see the next step. Copy the URL image and click the Deployments section.
Click Create your first deployment. Fill in the container name. For the image, paste the URL image when copying on the right screenshot. Click add open ports, fill in 8080 and HTTP.
You can add container up to 10 containers in one deployment. Choose public endpoint and click Save and deploy. Waiting until ready.
You have currently a deployment and deployment version. Currently deployment can modify/edit. If created new deployment, old version is inactive. When a deployment is active, it means the container service is running and the status is ready.
See again public domain and click the public domain.
Finally, the deployment is successful. I test the website and upload image. Left screenshot for can upload image. Right screenshot is show result the image.
Thank you all when you read this tutorial. I want to write about LightSail instances and databases. Thank you again!
Top comments (0)