-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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-patterns: taskDefinition prop ignored on QueueProcessingFargateService #27360
Comments
Could you share the section of your CloudFormation template that shows the TaskDefinition that's failing to deploy? |
Thanks for the quick follow-up. There appear to be two I believe this is the one that is failing to deploy: TaskDefinitionB36D86D9:
Type: AWS::ECS::TaskDefinition
Properties:
Cpu: "256"
Family: ServiceFargateStackTaskDefinition86E89CC0
Memory: "512"
NetworkMode: awsvpc
RequiresCompatibilities:
- FARGATE
RuntimePlatform:
CpuArchitecture: ARM64
TaskRoleArn:
Fn::GetAtt:
- TaskDefinitionTaskRoleFD40A61D
- Arn
Metadata:
aws:cdk:path: ServiceFargateStack-dev/TaskDefinition/Resource The other one appears to have the missing QueueProcessingServiceQueueProcessingTaskDefAEA09787:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
- Environment:
- Name: QUEUE_NAME
Value:
Fn::GetAtt:
- QueueProcessingServiceEcsProcessingQueue72F6FF5A
- QueueName
Essential: true
Image:
Fn::Sub: ************.dkr.ecr.*********.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-************-*********:bda004f18ece5320181a8e43a710afe55db93c142a7bd3804eb41e8d420edb9a
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group:
Ref: LogGroupF5B46931
awslogs-stream-prefix: service-fargate
awslogs-region: *********
Name: QueueProcessingContainer
Cpu: "256"
ExecutionRoleArn:
Fn::GetAtt:
- QueueProcessingServiceQueueProcessingTaskDefExecutionRoleFF08A907
- Arn
Family: ServiceFargateStackdevQueueProcessingServiceQueueProcessingTaskDefB41D4DE2
Memory: "512"
NetworkMode: awsvpc
RequiresCompatibilities:
- FARGATE
TaskRoleArn:
Fn::GetAtt:
- QueueProcessingServiceQueueProcessingTaskDefTaskRoleACE5F3E7
- Arn
Metadata:
aws:cdk:path: ServiceFargateStack-dev/QueueProcessingService/QueueProcessingTaskDef/Resource I guess I wouldn't have expected there to be two |
Well, that explains it. The aws-cdk/packages/aws-cdk-lib/aws-ecs-patterns/lib/fargate/queue-processing-fargate-service.ts Line 72 in 0aa1096
If you specify the cpu, memory, runtime platform on the |
QueueProcessingFargateService
construct
Hi @peterwoodworth , I'm interested in working on this issue. Can I be assigned to it? If there are any specific guidelines or pointers related to this, please let me know. Thanks! |
@alhridoy just be sure to follow the contributing guide and you'll be good to go, thanks! |
…rvice (#28220) Fixed a bug in queueProcessingFargateService where the taskDefinition provided as an argument was not being used, and a default taskDefinition was always being generated instead. Closes #27360 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the bug
I am trying to set up a Fargate task that processes items from an SQS queue and stumbled onto the
QueueProcessingFargateService
construct which appears to do just that. However, after configuring the construct, I am getting the following error when runningcdk deploy
:Expected Behavior
The CDK stack deploys successfully.
Current Behavior
The CDK stack fails to deploy.
Reproduction Steps
Possible Solution
Maybe I just misconfigured the construct? 🤷
Is there some kind of underlying change needed to support
ecs.ContainerImage.fromDockerImageAsset(asset)
vsecs.ContainerImage.fromRegistry('test')
?Additional Information/Context
No response
CDK CLI Version
2.99.0 (build 0aa1096)
Framework Version
No response
Node.js Version
18.18.0
OS
ubuntu-2204:2023.02.1
Language
Typescript
Language Version
5.2.2
Other information
No response
The text was updated successfully, but these errors were encountered: