janrito opened a new issue, #29637:
URL: https://github.com/apache/airflow/issues/29637

   ### Apache Airflow Provider(s)
   
   amazon
   
   ### Versions of Apache Airflow Providers
   
   
https://raw.githubusercontent.com/apache/airflow/constraints-2.4.3/constraints-3.10.txt
   
   ### Apache Airflow version
   
   2.4.3
   
   ### Operating System
   
   https://github.com/aws/aws-mwaa-local-runner / on macos 12.6
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   [local ](https://github.com/aws/aws-mwaa-local-runner)
   
   ### What happened
   
   ECS task definition cpu and memory params are incorrectly invalidated
   
   ### What you think should happen instead
   
   parameters are correct, it should register a task. I can run the same bit of 
code using boto3.client.ecs.register_task_definition`
   
   ### How to reproduce
   
   Try and define a task using:
   
   ```python 
   EcsRegisterTaskDefinitionOperator(
           task_id="register_task",
           family=TASK_FAMILY_NAME,
           container_definitions=[
               {
                   "name": CONTAINER_NAME,
                   "image": "ubuntu",
                   "workingDirectory": "/usr/bin",
                   "entryPoint": ["sh", "-c"],
                   "command": ["ls"],
               }
           ],
           register_task_kwargs={
               "requiresCompatibilities": ["FARGATE"],
               "cpu": "256",
               "memory": "512",
               "networkMode": "awsvpc",
           },
       )
   ```
   
   ```logs
   botocore.exceptions.ParamValidationError: Parameter validation failed:
   Invalid type for parameter cpu, value: 256, type: <class 'int'>, valid 
types: <class 'str'>
   Invalid type for parameter memory, value: 512, type: <class 'int'>, valid 
types: <class 'str'>
   ```
   
   Could this error have something to do with JSON serialising/deserialising 
where the parameters are autodetected as `int`s, rather than deserialised into 
strings
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to