Day 38: Deploying Containerized Applications with Amazon ECS

Application is not accessible.

Though I am able to access the application, challenge 38 reports " Application is not accessible." Where is the issue ??


First, make sure you’re naming everything appropriately. When I ran the task, these were as follows; I’m working from this guide to do this.

  1. Create a Private ECR Repository:
  • Create a private ECR repository named datacenter-ecr to store Docker images.
  1. Build and Push Docker Image:
  • Use the Dockerfile located at /root/pyapp on the aws-client host.
  • Build a Docker image using this Dockerfile.
  • Tag the image with latest tag.
  • Push the Docker image to the datacenter-ecr repository.
  1. Create and Configure ECS cluster:
  • Create an ECS cluster named datacenter-cluster using the Fargate launch type.
  1. Create an ECS Task Definition:
  • Define a task named datacenter-taskdefinition using the Docker image from the datacenter-ecr ECR repository.
  • Specify necessary CPU and memory resources.
  1. Deploy the Application Using ECS Service:
  • Create a service named datacenter-service on the datacenter-cluster to run the task.
  • Ensure the service runs at least one task.

I set these using a vars.sh file, as so:

export ECR_REPO="datacenter-ecr"
export ECS_CLUSTER="datacenter-cluster"
export ECS_SERVICE="datacenter-service"
export TASK_DEF="datacenter-taskdefinition"

This validates off a private FARGATE address; so I’m not sure you’ve configured the service correctly, even though you appear successful setting up the image – the service won’t have a public IP endpoint if you did it per spec.

Thank you @rob_kodekloud … The service is accessible using public IP as shown in my second picture. However, I didnt set the variables in vars.sh (kind of) … Really confused if we need to complete the task with only steps what KodeKloud defines (without any deviation :wink: )

Some of the tasks are “tweaky” and are hard to get right. It’s not that you have to do them one way; it’s just that there are a lot more ways “to get it wrong” :slight_smile: This task in particular is more tweaky than most.