# Aws cli commands from the ecs (fargate) agent task

**URL:** <https://community.jenkins.io/t/aws-cli-commands-from-the-ecs-fargate-agent-task/5803>\
**Category:** Using Jenkins\
**Created:** [February 15, 2023, 7:10pm UTC](https://community.jenkins.io/t/aws-cli-commands-from-the-ecs-fargate-agent-task/5803 "2023-02-15T19:10:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aub\_C](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@Aub\_C](https://community.jenkins.io/u/Aub_C)\
**Post date:** [February 15, 2023, 7:10pm UTC](https://community.jenkins.io/t/aws-cli-commands-from-the-ecs-fargate-agent-task/5803/1 "2023-02-15T19:10:25Z")

</div>

How do I go about running aws cli commands from the ecs (fargate) agent task (jenkins/inbound-agent) using the amazon-ecs plugin? Specifically updating the task definitions image after a build.

Thanks!

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [February 17, 2023, 5:30pm UTC](https://community.jenkins.io/t/aws-cli-commands-from-the-ecs-fargate-agent-task/5803/2 "2023-02-17T17:30:38Z")

</div>

`sh('aws ... do thingie')`?

if you are asking because the agent doesn’t have aws cli in it. You can extend the agent yourself

```auto
FROM jenkins/inbound-agent
RUN apt-get ...

```

or use the Jenkins Tools system to install it as needed.
