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

   ### Apache Airflow version
   
   2.3.2 (latest released)
   
   ### What happened
   
   Using the Amazon ECSOperator to trigger tasks yields a:
   `botocore.exceptions.ClientError: An error occurred 
(InvalidSignatureException) when calling the RunTask operation: The request 
signature we calculated does not match the signature you provided. Check your 
AWS Secret Access Key and signing method. Consult the service documentation for 
details.
   [2022-07-10, 09:15:53 UTC] {taskinstance.py:1400} INFO - Marking task as 
FAILED. dag_id=ecs_dag, task_id=test_task, execution_date=20220710T091047, 
start_date=20220710T091552, end_date=20220710T091553
   [2022-07-10, 09:15:53 UTC] {standard_task_runner.py:97} ERROR - Failed to 
execute job 124 for task ELeiloes.docker_pt_eleiloes_re (An error occurred 
(InvalidSignatureException) when calling the RunTask operation: The request 
signature we calculated does not match the signature you provided. Check your 
AWS Secret Access Key and signing method. Consult the service documentation for 
details.; 749131)`
   
   ### What you think should happen instead
   
   The task should be able to successfully trigger the task and monitor its 
success.
   
   ### How to reproduce
   
   Create an Amazon Web Services connection, fill in the Access Key and Secret 
Key in the login and password areas, respectively adding the region's name to 
the extras.
   Create an ECS operator referencing said connection with some custom 
overrides:
   
   ```
   ope = EcsOperator(
           task_id=f'docker_{task_name}',
           cluster=cluster_name,
           task_definition=task_definition_name,
           launch_type="EXTERNAL|FARGATE",
           aws_conn_id=ecs_connection_name,
           overrides={
               "containerOverrides": [
                   {
                       "name": f"docker_{task_name}'",
                       "command": ["--flag1", "value1", '--aws_region', 
'us-west-2'],
                   },
               ],
           },
           tags={
               "Project": "Test",
           },
           awslogs_group="/ecs/hello-world",
           awslogs_region=s3_logs_region,
           awslogs_stream_prefix="ecs/hello-world-container"
       )
   ```
   
   ### Operating System
   
   UNIX
   
   ### Versions of Apache Airflow Providers
   
   
[apache-airflow-providers-amazon](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/index.html)
 4.0.0
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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