Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS::ECS::Service Can't update FargateService with CODE_DEPLOY #1529

Closed
sergeivalko opened this issue Feb 17, 2023 · 8 comments
Closed

AWS::ECS::Service Can't update FargateService with CODE_DEPLOY #1529

sergeivalko opened this issue Feb 17, 2023 · 8 comments

Comments

@sergeivalko
Copy link

sergeivalko commented Feb 17, 2023

Name of the resource

AWS::ECS::Service

Resource Name

No response

Issue Description

I found the Update Service API call event and it looks like the cloudformation also sent other information like taskDefinition, network, etc in the requestParameters and I think that's not correct.

image

Expected Behavior

Update API call fills fields that have changed

Observed Behavior

The update API call populates all properties, even those that haven't changed

Error: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment

Test Cases

  1. create stack with ecs fargate service with CODE_DEPLOY deployment controller type
  2. try to update desired count\health check or any allowed then you will see exception

Other Details

my changeset:

[
  {
    "resourceChange": {
      "logicalResourceId": "DeploymentGroup6D277AF0",
      "action": "Modify",
      "physicalResourceId": "default",
      "resourceType": "AWS::CodeDeploy::DeploymentGroup",
      "replacement": "False",
      "moduleInfo": null,
      "details": [
        {
          "target": {
            "name": "ECSServices",
            "requiresRecreation": "Never",
            "attribute": "Properties"
          },
          "causingEntity": "ServiceD69D759B.Name",
          "evaluation": "Dynamic",
          "changeSource": "ResourceAttribute"
        }
      ],
      "changeSetId": null,
      "scope": [
        "Properties"
      ]
    },
    "hookInvocationCount": null,
    "type": "Resource"
  },
  {
    "resourceChange": {
      "logicalResourceId": "ServiceD69D759B",
      "action": "Modify",
      "physicalResourceId": "[ARN]-service/n2p-uniteplatform-dev/n2p-unite-call-queue-metrics-service",
      "resourceType": "AWS::ECS::Service",
      "replacement": "False",
      "moduleInfo": null,
      "details": [
        {
          "target": {
            "name": "DesiredCount",
            "requiresRecreation": "Never",
            "attribute": "Properties"
          },
          "causingEntity": null,
          "evaluation": "Static",
          "changeSource": "DirectModification"
        }
      ],
      "changeSetId": null,
      "scope": [
        "Properties"
      ]
    },
    "hookInvocationCount": null,
    "type": "Resource"
  },
  {
    "resourceChange": {
      "logicalResourceId": "ServiceTaskCountTarget23E25614",
      "action": "Modify",
      "physicalResourceId": "service/n2p-uniteplatform-dev/n2p-unite-call-queue-metrics-service|ecs:service:DesiredCount|ecs",
      "resourceType": "AWS::ApplicationAutoScaling::ScalableTarget",
      "replacement": "Conditional",
      "moduleInfo": null,
      "details": [
        {
          "target": {
            "name": "ResourceId",
            "requiresRecreation": "Always",
            "attribute": "Properties"
          },
          "causingEntity": "ServiceD69D759B.Name",
          "evaluation": "Dynamic",
          "changeSource": "ResourceAttribute"
        }
      ],
      "changeSetId": null,
      "scope": [
        "Properties"
      ]
    },
    "hookInvocationCount": null,
    "type": "Resource"
  }
]
@Rainson12
Copy link

it says this is shipped? How can we make us of it?

@amsoares
Copy link

it says this is shipped? How can we make us of it?

I'm looking for the same.

@bharathcp
Copy link

This seems to be incorrectly closed. The cloud formation service is still not fixed. My cloudtrail still shows cloud formation making updateservice call with all params that is not allowed.
Please reopen the issue.

@AidenAtSea AidenAtSea reopened this Aug 1, 2023
@cfn-github-issues-bot cfn-github-issues-bot moved this from Shipped to Researching in coverage-roadmap Aug 1, 2023
@cfn-github-issues-bot cfn-github-issues-bot moved this from Researching to Coming Soon in coverage-roadmap Aug 1, 2023
@jvesala
Copy link

jvesala commented Aug 23, 2023

Hello everyone!

Do we have more visibility on what Coming soon really means? Weeks or months?

@sergeivalko
Copy link
Author

@jvesala Actually we don't have, we'll have to wait because as you can see the ticket was created on Feb 18th but closed by accident later, hopefully they deliver it soon.

@terusaku
Copy link

Hopefully this roadmap will resolve my issue, too.

and personally, I want to know the scope, what is (not) possible changes through cdk deploy with ECS Fargate that have CODE_DEPLOY config.

CodeDeploy can update ECS Service through deployment, but cannot update ECS TaskDef, I think.
Updating TaskDef is the duty of IaC .

ref.) GitHub Actions: amazon-ecs-deploy-task-definition
CodeDeploy just have reference TaskDef, currently.

@acs-mpatel
Copy link

acs-mpatel commented Nov 30, 2023

This is problem if you are using IaC (Cloudformation). You can't update Task Definition and have to manually update it. Kills the purpose of IaC.
Now that the Cloudformation stack is created, I am stuck with keeping old task definition resource in there without it being used, and will need to update it manually. A fix would be nice.

@cfn-github-issues-bot cfn-github-issues-bot moved this from Coming Soon to Shipped in coverage-roadmap Jan 11, 2024
@MarinusPretorius
Copy link

I see fix was shipped. Any idea when this will be available in af-south-1 region?

Or is this a cdk fix? THen which version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
coverage-roadmap
  
Shipped
Development

No branches or pull requests

10 participants