I am out of ideas on this one.
CREATE_FAILED: VerdaccioTaskDef (AWS::ECS::TaskDefinition)
Resource handler returned message: "Model validation failed (#/ContainerDefinitions/0/Memory: expected type: Number, found: String
#/ContainerDefinitions/0/Cpu: expected type: Number, found: String
#/ContainerDefinitions/0/Essential: expected type: Boolean, found: String
#/ContainerDefinitions/0/PortMappings/0/HostPort: expected type: Number, found: String
#/ContainerDefinitions/0/PortMappings/0/ContainerPort: expected type: Number, found: String
#/EphemeralStorage/SizeInGiB: expected type: Number, found: String)" (RequestToken: 40e20ed9-5261-6a60-e3ca-59d4dfb4ab02, HandlerErrorCode: InvalidRequest)
Here is my yaml for the ECS Task Definition
VerdaccioTaskDef:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
-
Name: verdaccio-app
Cpu: 512
Memory: 0.5
Image: 827047061928.dkr.ecr.eu-west-2.amazonaws.com/bpmg/myrepo:1
PortMappings:
-
ContainerPort: 4879
HostPort: 4879
Protocol: tcp
Essential: true
ExecutionRoleArn:
Fn::GetAtt: [ ExecutionRole, Arn ]
Family:
Fn::Join:
- ""
- - ${self:service}-family
NetworkMode: awsvpc
RuntimePlatform:
OperatingSystemFamily: Linux
RequiresCompatibilities:
- FARGATE
Tags:
- Key: name
Value: 'Software Tooling'
TaskRoleArn:
Fn::GetAtt: [ TaskRole, Arn ]
EphemeralStorage:
SizeInGiB: 5
I have read elsewhere that badly formed YAML higher up the document can cause CloudFormation to report errors erroneously.
Can someone please check over my task def and see if I’ve done anything wrong?