During creation of AWS::ECS::Service via cloudformation i got the error: Model validation failed
The error is related to #HealthCheckGracePeriodSeconds and some other properties. Error detail is: expected type: Number, found: String.
In yaml it is already a number. It's not clear to me whats going wrong. Already tried to desclare it as string or as parameter with type Number.
I need some hint because i am stuck in the muck at this point.
Error is:
Model validation failed
(
#/HealthCheckGracePeriodSeconds: expected type: Number, found: String
#/DesiredCount: expected type: Number, found: String
#/DeploymentConfiguration/MaximumPercent: expected type: Number, found: String
#/DeploymentConfiguration/MinimumHealthyPercent: expected type: Number, found: String
)
Definition in template.yaml is:
ServiceDefinition:
Type: AWS::ECS::Service
Properties:
ServiceName: !Ref ServiceName
Cluster: !Ref ClusterName
TaskDefinition: !Ref TaskDefinition
DeploymentConfiguration:
MinimumHealthyPercent: 100
MaximumPercent: 200
DesiredCount: 1
HealthCheckGracePeriodSeconds: 60
LaunchType: FARGATE
NetworkConfiguration:
AwsVpcConfiguration:
AssignPublicIP: ENABLED
SecurityGroups: !FindInMap [Env2SecurityGroups, !Ref AWS::AccountId, securitygroup]
Subnets: !FindInMap [Env2PublicSubnets, !Ref AWS::AccountId, subnets]