Hands-on: Setup AWS ECR, ECS and Fargate for NodeJS Application in a Docker Image

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ค. 2024
  • Let’s look at how to deploy a docker image with NodeJS application to AWS by using Amazon Elastic Container Registry(Amazon ECR), Amazon Elastic Container Service (Amazon ECS), and AWS Fargate.
    This tutorial also shows how to use AWS Fargate with Application Load Balancer to distribute traffic between multiple instances.
    We’ll use both AWS Management Console and CLI. Get your AWS CLI ready:docs.aws.amazon.com/cli/lates...
    Interested in learning how to use auto scaling with ECS and Fargate? Check our video about it:
    • Hands-on: Creating an ...
    In this video, you will learn:
    0:00 Amazon ECR, ECS and AWS Fargate intro
    0:32 Architecture with Docker image(NodeJS), ECR, ECS, Fargate intro
    01:07 NodeJS + Docker intro
    01:48 Creating ECR repository
    02:45 Pushing Docker image to ECR repository
    05:00 Creating ECS cluster and task
    11:38 Creating architecture with ALB
    More about other AWS services at www.stormit.cloud/blog/
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 31

  • @stormit9507
    @stormit9507  ปีที่แล้ว

    Have questions or want to share your AWS experience? Drop a comment below! ⬇ For more Cloud Computing insights and tutorials, visit our blog at www.stormit.cloud/blog/ 🌩

  • @jj18
    @jj18 2 หลายเดือนก่อน +2

    you are a life saver. Everything worked perfectly. Thanks

    • @stormit9507
      @stormit9507  2 หลายเดือนก่อน

      Hi, thank you for your comment. It's great to see that this video helped you :) If you want to learn more about AWS services or StormIT, visit our blog at: www.stormit.cloud/blog/

  • @tomspencer6838
    @tomspencer6838 ปีที่แล้ว +2

    This is an excellent overview. Nice and clear! Thank you!

    • @stormit9507
      @stormit9507  ปีที่แล้ว

      Hello Tom, thank you for your kind words! If you're interested in learning more, be sure to check out our blog at www.stormit.cloud/blog/ for more in-depth articles on AWS Cloud.

  • @LiRaye
    @LiRaye ปีที่แล้ว +2

    Finally found one video which shows the entire procedure. thx bro !!

    • @stormit9507
      @stormit9507  ปีที่แล้ว

      Hello Li, thank you for your comment. If you are interested in learning more about AWS services, visit our website at: www.stormit.cloud

  • @PrakashChokalingam
    @PrakashChokalingam 10 หลายเดือนก่อน +1

    Thank you for this detailed video. No other video's shown about security group configuration, it helped me a lot.

    • @stormit9507
      @stormit9507  10 หลายเดือนก่อน

      Hello Prakash, you're very welcome! We're glad to hear that the video was helpful for you. If you have any more questions or need further assistance, feel free to ask here: www.stormit.cloud/contact/

  • @saavoiaa
    @saavoiaa 6 หลายเดือนก่อน +1

    Thank you! Very clear explanation!

    • @stormit9507
      @stormit9507  6 หลายเดือนก่อน

      Hi, thank you for your comment. If you're interested in learning more, be sure to check out our blog at www.stormit.cloud/blog/

  • @nikkyujoshi
    @nikkyujoshi 8 หลายเดือนก่อน +1

    Excellent short demo! Thank you very much bro ..

    • @stormit9507
      @stormit9507  7 หลายเดือนก่อน +1

      Glad you liked it!

    • @nikkyujoshi
      @nikkyujoshi 7 หลายเดือนก่อน

      @@stormit9507 Yes bro, Clear, short and precise I love all your content!

  • @aniruddhatope2388
    @aniruddhatope2388 5 หลายเดือนก่อน +1

    Lovely demo. It helped. Thank you.

    • @stormit9507
      @stormit9507  5 หลายเดือนก่อน

      Hi, thank you for your comment! Be sure to visit our blog at www.stormit.cloud/blog/ and subscribe to our newsletter for more updates.

  • @jiahongxie6884
    @jiahongxie6884 ปีที่แล้ว +2

    Thank you so much! May I ask, if my container exposes port 8000. What changes should I make when I am following your tutorial? Should I set port mapping to 8000?

    • @stormit9507
      @stormit9507  ปีที่แล้ว

      Hello Jiahong, you should expose that in Docker and also set it up in port mappings of a new task definition.

  • @iftyislam6761
    @iftyislam6761 3 หลายเดือนก่อน +1

    what should I change if my express runs on the 3001 port?

    • @stormit9507
      @stormit9507  3 หลายเดือนก่อน +1

      Hi, you will need to change the port exposed in the Dockerfile as well as the port in the container task. If you require more specific assistance, please feel free to contact us for a consultation at: www.stormit.cloud/contact/

  • @331-saunaksutradhar7
    @331-saunaksutradhar7 หลายเดือนก่อน

    Hey I am geting this error in the command line while pushing the Docker Image to ECR Repository
    Get-ECRLoginCommand : The term 'Get-ECRLoginCommand' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
    verify that the path is correct and try again.
    At line:1 char:2
    + (Get-ECRLoginCommand).Password | docker login --username AWS --passwo ...
    + ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Get-ECRLoginCommand:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    • @stormit9507
      @stormit9507  หลายเดือนก่อน

      Hi, thank you for your question. Do you have the AWS CLI installed and configured? You can find the installation guide here: docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
      You can also contact us for a consultation at: www.stormit.cloud/contact/

  • @ErickCalderin
    @ErickCalderin ปีที่แล้ว +2

    It did not work to me, I got an error "ECS Deployment Circuit Breaker was triggered"

    • @stormit9507
      @stormit9507  ปีที่แล้ว +1

      Hello Erick, I'm sorry that it isn't working for you. It's hard to determine the specific issue based on the information you provided. I would recommend thoroughly reviewing each step of the manual to ensure everything is correct. And after that, I would attempt to locate relevant logs to review what exactly went wrong. If you're interested, we can arrange a consultation. Please feel free to contact us at: www.stormit.cloud/contact/

    • @ErickCalderin
      @ErickCalderin ปีที่แล้ว +1

      ​@@stormit9507 that is the same question I did, that error message was literally the one I received from AWS after following your steps. Nevertheless, I am trying with a image built and pushed into ECR and weights 2.8 GB. Is this a possible cause of that error? If so, How can I handle with large images in AWS?.
      Just in case you are wondering why my image is so heavyweight, this is a FastAPI app which downloads a model from HuggingFace and generates embeddings of a data set, it is a process that requires GPU but when I tested this image locally it lasts around 16 minutes with my CPU.
      In addition, I made this experiment with AppRun and according the logs it was able to pull the image, do some other startup tasks and download the model (CPU) but it stopped in the embedding generation step.
      So, this is my situation. Hopefully you can help me :)

    • @stormit9507
      @stormit9507  ปีที่แล้ว

      ​@@ErickCalderin your application seems interesting and i don't think this will be an issue of the image size. You are talking about GPU, AWS Fargate basically doesn't have support for GPU, so this could be the issue. Try to read this documentation - docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-gpu.html
      You can try utilizing EC2 instances that are optimized for GPU. This might better suit your requirements.
      As mentioned earlier, it would be easier to assist you if you contacted us directly through our contact form at www.stormit.cloud/contact/.

    • @vojtechkaiser2525
      @vojtechkaiser2525 6 หลายเดือนก่อน

      I had the same error. The reason was when I was setting up my image in my task, I didn't give it the right tag! (The part after semicolon in image name - image-name:tag). If you copy the image url from ECR, it will not include the tag. By default it will look for tag called "latest". If you have something else. It will fail.
      Typically this error indicates that there is something wrong with your task setup or the image itself.
      One other thing I found online was that someone created the image with docker using Mac with the silicion chip (amd arch) and they tried to run the image on x86_64 architecture.

  • @SandWalk
    @SandWalk ปีที่แล้ว

    How can i get SSL certificate for AWS Fargate app

    • @stormit9507
      @stormit9507  ปีที่แล้ว +1

      Hi X Lou, thank you for your comment, but I would need more information. You can contact us for a consultation at www.stormit.cloud/contact/. However, I believe the solution lies in creating a TLS/SSL certificate in AWS Certificate Manager for your domain and using it with an HTTPS listener in ALB.

    • @SandWalk
      @SandWalk ปีที่แล้ว

      thank you sir , So i'm alreay deploy my website to Aws Fargate just like your video above , and i see in your video above too, there is no TLS/SSL in you website and mine are also , do you have the video to solve this problem thank you ,i'm already searching but there is only how to get SSL for EC2 and there is no solution for AWS Fargate!

    • @stormit9507
      @stormit9507  ปีที่แล้ว +1

      @@SandWalk At the moment, we don't have any videos or articles about HTTPS and AWS Fargate, but I'll make a note of it for the future. As mentioned earlier, if you still have issues with this, please contact us directly via www.stormit.cloud/contact/ for a consultation.