• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

securitywing

How to Enable Backend Access to AWS Fargate Container Using ECS EXEC

by wing

Unlike AWS ECS  EC2 launch type, Fargate does not allow backend access. To enable backend access, you have to update your task definition and the task role. This post will help you enable docker container access of a fargate task. The only requirement before enabling ecs exec on fargate is that the platform version need to be 1.4.

Step 1 : Update the task role

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ssmmessages:CreateControlChannel",
"ssmmessages:CreateDataChannel",
"ssmmessages:OpenControlChannel",
"ssmmessages:OpenDataChannel"
],
"Resource": "*"
}
]
}

Step 2:  Force update an existing service to enable execute command.

aws ecs update-service –service test-service –cluster test –region eu-west-1 –enable-execute-command –force-new-deployment –profile=<aws profile name>

After updating the service, if you check the task definition, you will be able to see that following line has been added.

"enableExecuteCommand": true,

Step 3: Check if the exec agent is running and enabled.

aws ecs execute-command –region eu-west-1 –profile=<aws profile name>  –cluster test –task <task id> –container <container name> –interactive –command  sh

Related posts:

  1. How to Query AWS CloudTrail Logs with Athena
  2. How to Permanently Auto-Mount EFF Volume to EC2 instance using User-Data
  3. How to Enable AWS Cross Account ECR Image Replication
  4. Top 10 Actions to Prevent Cyber Defence Evasion on AWS Cloud

Filed Under: AWS

Primary Sidebar

Please help us sharing

Categories

  • AWS
  • Basics
  • Containers
  • Cryptocurrency
  • Cyber
  • Internet Security and Safety
  • IS Audit
  • IT Security Exams
  • Law & Human Rights
  • Network Security Tips
  • Off Track
  • Social Media Governance
  • Tech Comparisons
  • Tech Stack Suitability
  • Telecom
  • Tutorial

CISSP Sample Test

Take a CISSP Sample Test

CISA Sample Test

CISA IT governance Sample test

Please Follow Us

Contact us for Ads

Go to Contact Form

Search

Footer

Copyrights

Protected by Copyscape Duplicate Content Detection Software

Securitywing.com reserves the copyrights of all of its published articles.No contents of this site is permitted to be published to anywhere else in the Internet.If any contents are found in any other websites, securitywing reserves the rights to file a DMCA complaint. But you have the right to use the link of any relevant article of this site to point from your website if you consider that it might improve the quality of your article.

Tags

audit AWS backup basics browser check cisco cloud computer configuration cyber data database email gmail hsrp ids iis informaiton internet kubernetes linux load balancing malware microsoft network protection redundancy risk router security security tips server social media SSL switch test tools vpn vrrp web webserver website windows wordpress

Copyright © 2010-2025 ·All Rights Reserved · SecurityWing.com