DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Adding a Custom Domain and SSL to AWS EC2
  • Automate Application Load Balancers With AWS Load Balancer Controller and Ingress
  • Keep Your Application Secrets Secret
  • Auto Remediation of GuardDuty Findings for a Compromised ECS Cluster in AWSVPC Network Mode

Trending

  • Unlocking the Potential of Apache Iceberg: A Comprehensive Analysis
  • Measuring the Impact of AI on Software Engineering Productivity
  • Comprehensive Guide to Property-Based Testing in Go: Principles and Implementation
  • Unlocking Data with Language: Real-World Applications of Text-to-SQL Interfaces
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Deploy Docker Images to AWS Fargate — Run Containers Without Managing Infrastructure

Deploy Docker Images to AWS Fargate — Run Containers Without Managing Infrastructure

This tutorial shows how you can deploy Docker images of microservices to AWS Fargate without having to worry about container management.

By 
Raman Sharma user avatar
Raman Sharma
·
Jun. 15, 18 · Tutorial
Likes (6)
Comment
Save
Tweet
Share
17.0K Views

Join the DZone community and get the full member experience.

Join For Free

In the previous article, we looked at how to create a simple Spring Boot application and push it over to DockerHub. In this final article of this series, we will look into using the Docker image and deploying the application using AWS Fargate. AWS Fargate is a technology for Amazon ECS and EKS that allows you to run containers without having to manage servers or clusters. Fargate is an abstraction, so instead of you managing your instances and clusters, it will accomplish this for you.

Picking up from where we left, we have our image at DockerHub. We could easily have this pushed to AWS ECR as well. On AWS Fargate, we have the option to choose an existing configuration or create a custom one. Since we are working with a Spring Boot application, we will choose "Custom."

Default Container Definitions

Click on "configure" to add the Container Definition.

Container name: employeeapp

Image: coolindguy/employeeapp

*By default, the field accepts images from Document Hub. If you are using ECR, you have to provide the complete ECR URL.

  1. Memory limits: We can leave it at the soft limit of 128 MiB for our sample deployment.
  2. Port mappings: The service is running on port 8080, so we can map it to the same.

Task Definition: A task definition describes one or more containers through attributes. We leave everything as default for our purposes.


awsvpc
Create new
FARGATE
0.5GB (512)
0.25 vCPU (256)

Defining the Service and provisioning an ALB:

employeeapp-service
(This can be changed to a desired count of simultaneous task definitions in a cluster).

Automatically create new

8080
HTTP

Define the cluster for the application:

Automatically create new
Automatically create new

This is the desired state of our deployment:

Image title

At this point, we can review our deployment state and click on the "create" button. I did not have much luck getting the desired state a few times, so be patient with that.

Image title

After you see all 10 tasks completed, you can see the service details by clicking "View Service."

You can navigate to "Target Group Name" -> "Load Balancer" to get the DNS Name of the Load Balancer URL, which should give load balancer access to your containerized application running on AWS Fargate.

The same application can be deployed via ECS as well, but Fargate abstracts a lot of the complexity and you can focus on your application and not have to worry about the nitty-gritty of container management.

AWS Docker (software) Load balancing (computing) application Spring Framework Task (computing) Infrastructure

Opinions expressed by DZone contributors are their own.

Related

  • Adding a Custom Domain and SSL to AWS EC2
  • Automate Application Load Balancers With AWS Load Balancer Controller and Ingress
  • Keep Your Application Secrets Secret
  • Auto Remediation of GuardDuty Findings for a Compromised ECS Cluster in AWSVPC Network Mode

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!