<p>I think this is because your ECS service was created before tagging was available for ECS services. </p>

<p>See this blog post by AWS on how to migrate to the new ARN format. <a href="https://aws.amazon.com/blogs/compute/migrating-your-amazon-ecs-deployment-to-the-new-arn-and-resource-id-format-2/" rel="nofollow noreferrer">https://aws.amazon.com/blogs/compute/migrating-your-amazon-ecs-deployment-to-the-new-arn-and-resource-id-format-2/</a></p>

CC BY-SA 4.0
2020-05-26T19:14:51.107Z
If you have a lot of ECS services already it might be a lot of work to recreate everything to take advantage of tags.
chicks
CC BY-SA 4.0
2020-05-26T12:22:23.460Z
2020-05-26T12:22:23.460Z
Levi
<p>I am trying to tag commit hash and app version onto the ECS service to make it easier for developers to identify the service with the code. </p>

<p>But I get this error</p>

<pre><code>+ aws ecs tag-resource --resource-arn arn:aws:ecs:ap-southeast-1:12344556677:service/master-web-dev-WebECSServices --tags key=COMMITHASH,value=85491def key=VERSION,value=0.2.4
An error occurred (InvalidParameterException) when calling the TagResource operation: Long arn format must be used for tagging operations
</code></pre>

<p>Is there any problem with the ARN? Why do I always get this issue?</p>

<amazon-web-services><amazon-ecs><aws-cli>
Get tagging to work on AWS CLI
Moses Liao GZ
# Get tagging to work on AWS CLI

(Asked by: username_0 on 2020-05-25)

I am trying to tag commit hash and app version onto the ECS service to make it easier for developers to identify the service with the code. 
But I get this error
+ aws ecs tag-resource --resource-arn arn:aws:ecs:ap-southeast-1:12344556677:service/master-web-dev-WebECSServices --tags key=COMMITHASH,value=85491def key=VERSION,value=0.2.4
An error occurred (InvalidParameterException) when calling the TagResource operation: Long arn format must be used for tagging operations

Is there any problem with the ARN? Why do I always get this issue?

**Tags:** amazon-web-services, amazon-ecs, aws-cli


---

## 1 answers

### Answer by username_1 on 2020-05-26. Score: 3

I think this is because your ECS service was created before tagging was available for ECS services.

See this blog post by AWS on how to migrate to the new ARN format. <https://aws.amazon.com/blogs/compute/migrating-your-amazon-ecs-deployment-to-the-new-arn-and-resource-id-format-2/>

> **Comments:**
> **username_2**: If you have a lot of ECS services already it might be a lot of work to recreate everything to take advantage of tags.  

---

