Score:0

AWS ECS: RegisterTaskDefinition result with new revision ends with unexpected changes

us flag

I'm trying to register a new task on AWS ECS using the API

My initial task revision looks like this: initial revision created on ECS UI

I want to call RegisterTaskDefinition to change the task size for example So update Task memory (MiB)1024 Task CPU (unit)512

to Task memory (MiB)2048 Task CPU (unit)1024

So I call the API like this

Aws\Ecs\EcsClient
RegisterTaskDefinition
{
    "containerDefinitions": [{
        "name": "httpd",
        "image": "httpd:2.4",
        "cpu": 256,
        "memory": 1024
    }],
    "requiresCompatibilities": ["EC2", "FARGATE"],
    "revision": 5,
    "family": "task-fargate-1",
    "memory": 2048,
    "cpu": 1024,
    "networkMode": "awsvpc",
    "executionRoleArn": "arn:aws:iam::180813930377:role/ecsTaskExecutionRole",
    "taskRoleArn": "arn:aws:iam::180813930377:role/ecsTaskExecutionRole",
    "taskDefinitionArn": "arn:aws:ecs:eu-west-3:180813930377:task-definition/task-fargate-1:5"
}

API executes and returns the new revision but some config of the new revision are lost and the launch type that used to be FARGATE is now EC2

new revisions: r6 after using ECS UI and r7 after using API

any help would be really great because I've been stuck with this for a few days now.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.