aws/operators/bedrock.py:206 |
BedrockCreateAgentRuntimeOperator |
BedrockAgentRuntimeReadyTrigger |
— |
aws/operators/bedrock.py:390 |
BedrockDeleteAgentRuntimeOperator |
BedrockAgentRuntimeDeletedTrigger |
— |
aws/operators/bedrock.py:542 |
BedrockCustomizeModelOperator |
BedrockCustomizeModelCompletedTrigger |
— |
aws/operators/bedrock.py:631 |
BedrockCreateProvisionedModelThroughputOperator |
BedrockProvisionModelThroughputCompletedTrigger |
— |
aws/operators/bedrock.py:804 |
BedrockCreateKnowledgeBaseOperator |
BedrockKnowledgeBaseActiveTrigger |
— |
aws/operators/bedrock.py:989 |
BedrockIngestDataOperator |
BedrockIngestionJobTrigger |
— |
aws/operators/bedrock.py:1308 |
BedrockBatchInferenceOperator |
BedrockBatchInferenceCompletedTrigger |
— |
aws/operators/comprehend.py:189 |
ComprehendStartPiiEntitiesDetectionJobOperator |
ComprehendPiiEntitiesDetectionJobCompletedTrigger |
— |
aws/operators/comprehend.py:338 |
ComprehendCreateDocumentClassifierOperator |
ComprehendCreateDocumentClassifierCompletedTrigger |
— |
aws/operators/dms.py:260 |
DmsModifyTaskOperator |
DmsTaskModifyCompleteTrigger |
— |
aws/operators/dms.py:762 |
DmsDeleteReplicationConfigOperator |
DmsReplicationTerminalStatusTrigger |
— |
aws/operators/dms.py:773 |
DmsDeleteReplicationConfigOperator |
DmsReplicationDeprovisionedTrigger |
— |
aws/operators/dms.py:794 |
DmsDeleteReplicationConfigOperator |
DmsReplicationConfigDeletedTrigger |
— |
aws/operators/dms.py:948 |
DmsStartReplicationOperator |
DmsReplicationDeprovisionedTrigger |
— |
aws/operators/dms.py:991 |
DmsStartReplicationOperator |
DmsReplicationCompleteTrigger |
— |
aws/operators/dms.py:1098 |
DmsStopReplicationOperator |
DmsReplicationStoppedTrigger |
— |
aws/operators/eks.py:358 |
EksCreateClusterOperator |
EksCreateClusterTrigger |
region_name |
aws/operators/eks.py:408 |
EksCreateClusterOperator |
EksDeleteClusterTrigger |
region_name |
aws/operators/eks.py:441 |
EksCreateClusterOperator |
EksCreateFargateProfileTrigger |
region_name |
aws/operators/eks.py:454 |
EksCreateClusterOperator |
EksCreateNodegroupTrigger |
region_name |
aws/operators/eks.py:598 |
EksCreateNodegroupOperator |
EksCreateNodegroupTrigger |
region_name |
aws/operators/eks.py:712 |
EksCreateFargateProfileOperator |
EksCreateFargateProfileTrigger |
region_name |
aws/operators/eks.py:802 |
EksDeleteClusterOperator |
EksDeleteClusterTrigger |
region_name |
aws/operators/eks.py:944 |
EksDeleteNodegroupOperator |
EksDeleteNodegroupTrigger |
region_name |
aws/operators/eks.py:1036 |
EksDeleteFargateProfileOperator |
EksDeleteFargateProfileTrigger |
region_name |
aws/operators/emr.py:234 |
EmrAddStepsOperator |
EmrAddStepsTrigger |
— |
aws/operators/emr.py:865 |
EmrCreateJobFlowOperator |
EmrCreateJobFlowTrigger |
— |
aws/operators/emr.py:1076 |
EmrTerminateJobFlowOperator |
EmrTerminateJobFlowTrigger |
— |
aws/operators/emr.py:1174 |
EmrServerlessCreateApplicationOperator |
EmrServerlessCreateApplicationTrigger |
— |
aws/operators/emr.py:1219 |
EmrServerlessCreateApplicationOperator |
EmrServerlessStartApplicationTrigger |
— |
aws/operators/emr.py:1365 |
EmrServerlessStartJobOperator |
EmrServerlessStartApplicationTrigger |
— |
aws/operators/emr.py:1423 |
EmrServerlessStartJobOperator |
EmrServerlessStartJobTrigger |
— |
aws/operators/emr.py:1682 |
EmrServerlessStopApplicationOperator |
EmrServerlessCancelJobsTrigger |
— |
aws/operators/emr.py:1705 |
EmrServerlessStopApplicationOperator |
EmrServerlessStopApplicationTrigger |
— |
aws/operators/emr.py:1735 |
EmrServerlessStopApplicationOperator |
EmrServerlessStopApplicationTrigger |
— |
aws/operators/emr.py:1828 |
EmrServerlessDeleteApplicationOperator |
EmrServerlessDeleteApplicationTrigger |
— |
aws/operators/glue.py:751 |
GlueDataQualityRuleSetEvaluationRunOperator |
GlueDataQualityRuleSetEvaluationRunCompleteTrigger |
— |
aws/operators/glue.py:899 |
GlueDataQualityRuleRecommendationRunOperator |
GlueDataQualityRuleRecommendationRunCompleteTrigger |
— |
aws/operators/rds.py:646 |
RdsCreateDbInstanceOperator |
RdsDbAvailableTrigger |
region_name |
aws/operators/rds.py:736 |
RdsDeleteDbInstanceOperator |
RdsDbDeletedTrigger |
region_name |
aws/operators/rds.py:820 |
RdsStartDbOperator |
RdsDbAvailableTrigger |
region_name |
aws/operators/rds.py:924 |
RdsStopDbOperator |
RdsDbStoppedTrigger |
region_name |
aws/sensors/bedrock.py:155 |
BedrockCustomizeModelCompletedSensor |
BedrockCustomizeModelCompletedTrigger |
— |
aws/sensors/bedrock.py:225 |
BedrockProvisionModelThroughputCompletedSensor |
BedrockProvisionModelThroughputCompletedTrigger |
— |
aws/sensors/bedrock.py:294 |
BedrockKnowledgeBaseActiveSensor |
BedrockKnowledgeBaseActiveTrigger |
— |
aws/sensors/bedrock.py:381 |
BedrockIngestionJobSensor |
BedrockIngestionJobTrigger |
— |
aws/sensors/comprehend.py:132 |
ComprehendStartPiiEntitiesDetectionJobCompletedSensor |
ComprehendPiiEntitiesDetectionJobCompletedTrigger |
— |
aws/sensors/comprehend.py:217 |
ComprehendCreateDocumentClassifierCompletedSensor |
ComprehendCreateDocumentClassifierCompletedTrigger |
— |
aws/sensors/emr.py:520 |
EmrJobFlowSensor |
EmrTerminateJobFlowTrigger |
— |
aws/sensors/emr.py:648 |
EmrStepSensor |
EmrStepSensorTrigger |
— |
aws/sensors/glue.py:207 |
GlueDataQualityRuleSetEvaluationRunSensor |
GlueDataQualityRuleSetEvaluationRunCompleteTrigger |
— |
aws/sensors/glue.py:327 |
GlueDataQualityRuleRecommendationRunSensor |
GlueDataQualityRuleRecommendationRunCompleteTrigger |
— |
aws/sensors/opensearch_serverless.py:115 |
OpenSearchServerlessCollectionActiveSensor |
OpenSearchServerlessCollectionActiveTrigger |
— |
Under which category would you file this issue?
Providers
Apache Airflow version
3.3.1
What happened and how to reproduce it?
An
AwsBaseOperator/AwsBaseSensorsubclass always carriesregion_name,verifyandbotocore_config, the base class sets all threein
__init__. When the task defers, the trigger builds its own hook. Anyof the three not explicitly forwarded to the trigger is lost, so the deferred
half of the task talks to AWS with different settings than the synchronous
half:
region_name— the triggerer falls back to the boto3 default region, sothe task polls a different region than the one it started work in and waits
on a resource that isn't there.
verify— SSL certificate verification silently returns to the default.A deployment that deliberately set
verify=False, or pointed it at aprivate CA bundle, loses that in the triggerer.
botocore_config— custom timeouts, retry policies and connection limitsare dropped, so the triggerer polls with default botocore behaviour.
None of this fails loudly. The task simply behaves differently once it defers.
Scope
An AST sweep of every
self.defer(trigger=...)call in the provider finds110 defer sites:
region_nameBy service:
region_nameWhy this should not continue service-by-service
The remaining sites split into two very different shapes:
three (2 sites), or takes
**kwargsthat reachAwsBaseWaiterTrigger(5 sites).
__init__signatures that never accept the parameters, and
hook()implementationsthat build the hook from
aws_conn_idalone. Fixing those service byservice means editing 54 call sites and 54 trigger signatures.
So the bulk of the remaining work is one structural change, not more
per-service PRs.
Proposed fix
Give
AwsBaseWaiterTriggera defaulthook()driven by ahook_classattribute, the same shape as
AwsBaseHookMixin._hook_parameters, so thehook is built from the serialized parameters in one place instead of in each
subclass. Add one parametrized invariant test over the deferrable operators
asserting that a deferred trigger's serialized payload carries the operator's
region_name/verify/botocore_config, so a new operator that forgetsthem fails in CI rather than in production.
The 7 call-site-only sites can go in the same change or a small follow-up.
Reproduce
Run any deferrable operator from the table with a non-default
region_name,verifyorbotocore_config, and inspect the trigger it defers with:Already fixed
What you think should happen instead?
A deferred task should reach AWS with the same region, SSL verification setting and botocore configuration as the synchronous path. Whether a task
defers is an execution detail; it should not change which endpoint the task talks to or how it authenticates to it.
Operating System
Not Applicable
Deployment
Other
Apache Airflow Provider(s)
amazon
Versions of Apache Airflow Providers
apache-airflow-providers-amazon — audit run against main (9.35.1)
Official Helm Chart version
Not Applicable
Kubernetes Version
Not Applicable
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
Shape A — trigger already names all three; operator-side fix only (2 sites)
aws/operators/glue.py:361GlueJobOperatorGlueJobCompleteTriggeraws/sensors/glue.py:99GlueJobSensorGlueJobCompleteTriggerShape B — trigger takes
**kwargs; operator-side fix only (5 sites)aws/operators/ecs.py:138EcsCreateClusterOperatorClusterActiveTriggeraws/operators/ecs.py:215EcsDeleteClusterOperatorClusterInactiveTriggeraws/operators/sagemaker_unified_studio.py:175SageMakerNotebookOperatorSageMakerNotebookJobTriggeraws/operators/sagemaker_unified_studio_notebook.py:191SageMakerUnifiedStudioNotebookOperatorSageMakerUnifiedStudioNotebookTriggeraws/sensors/batch.py:99BatchSensorBatchJobTriggerShape C — trigger signature is closed; needs the base-class fix (53 sites)
aws/operators/bedrock.py:206BedrockCreateAgentRuntimeOperatorBedrockAgentRuntimeReadyTriggeraws/operators/bedrock.py:390BedrockDeleteAgentRuntimeOperatorBedrockAgentRuntimeDeletedTriggeraws/operators/bedrock.py:542BedrockCustomizeModelOperatorBedrockCustomizeModelCompletedTriggeraws/operators/bedrock.py:631BedrockCreateProvisionedModelThroughputOperatorBedrockProvisionModelThroughputCompletedTriggeraws/operators/bedrock.py:804BedrockCreateKnowledgeBaseOperatorBedrockKnowledgeBaseActiveTriggeraws/operators/bedrock.py:989BedrockIngestDataOperatorBedrockIngestionJobTriggeraws/operators/bedrock.py:1308BedrockBatchInferenceOperatorBedrockBatchInferenceCompletedTriggeraws/operators/comprehend.py:189ComprehendStartPiiEntitiesDetectionJobOperatorComprehendPiiEntitiesDetectionJobCompletedTriggeraws/operators/comprehend.py:338ComprehendCreateDocumentClassifierOperatorComprehendCreateDocumentClassifierCompletedTriggeraws/operators/dms.py:260DmsModifyTaskOperatorDmsTaskModifyCompleteTriggeraws/operators/dms.py:762DmsDeleteReplicationConfigOperatorDmsReplicationTerminalStatusTriggeraws/operators/dms.py:773DmsDeleteReplicationConfigOperatorDmsReplicationDeprovisionedTriggeraws/operators/dms.py:794DmsDeleteReplicationConfigOperatorDmsReplicationConfigDeletedTriggeraws/operators/dms.py:948DmsStartReplicationOperatorDmsReplicationDeprovisionedTriggeraws/operators/dms.py:991DmsStartReplicationOperatorDmsReplicationCompleteTriggeraws/operators/dms.py:1098DmsStopReplicationOperatorDmsReplicationStoppedTriggeraws/operators/eks.py:358EksCreateClusterOperatorEksCreateClusterTriggeraws/operators/eks.py:408EksCreateClusterOperatorEksDeleteClusterTriggeraws/operators/eks.py:441EksCreateClusterOperatorEksCreateFargateProfileTriggeraws/operators/eks.py:454EksCreateClusterOperatorEksCreateNodegroupTriggeraws/operators/eks.py:598EksCreateNodegroupOperatorEksCreateNodegroupTriggeraws/operators/eks.py:712EksCreateFargateProfileOperatorEksCreateFargateProfileTriggeraws/operators/eks.py:802EksDeleteClusterOperatorEksDeleteClusterTriggeraws/operators/eks.py:944EksDeleteNodegroupOperatorEksDeleteNodegroupTriggeraws/operators/eks.py:1036EksDeleteFargateProfileOperatorEksDeleteFargateProfileTriggeraws/operators/emr.py:234EmrAddStepsOperatorEmrAddStepsTriggeraws/operators/emr.py:865EmrCreateJobFlowOperatorEmrCreateJobFlowTriggeraws/operators/emr.py:1076EmrTerminateJobFlowOperatorEmrTerminateJobFlowTriggeraws/operators/emr.py:1174EmrServerlessCreateApplicationOperatorEmrServerlessCreateApplicationTriggeraws/operators/emr.py:1219EmrServerlessCreateApplicationOperatorEmrServerlessStartApplicationTriggeraws/operators/emr.py:1365EmrServerlessStartJobOperatorEmrServerlessStartApplicationTriggeraws/operators/emr.py:1423EmrServerlessStartJobOperatorEmrServerlessStartJobTriggeraws/operators/emr.py:1682EmrServerlessStopApplicationOperatorEmrServerlessCancelJobsTriggeraws/operators/emr.py:1705EmrServerlessStopApplicationOperatorEmrServerlessStopApplicationTriggeraws/operators/emr.py:1735EmrServerlessStopApplicationOperatorEmrServerlessStopApplicationTriggeraws/operators/emr.py:1828EmrServerlessDeleteApplicationOperatorEmrServerlessDeleteApplicationTriggeraws/operators/glue.py:751GlueDataQualityRuleSetEvaluationRunOperatorGlueDataQualityRuleSetEvaluationRunCompleteTriggeraws/operators/glue.py:899GlueDataQualityRuleRecommendationRunOperatorGlueDataQualityRuleRecommendationRunCompleteTriggeraws/operators/rds.py:646RdsCreateDbInstanceOperatorRdsDbAvailableTriggeraws/operators/rds.py:736RdsDeleteDbInstanceOperatorRdsDbDeletedTriggeraws/operators/rds.py:820RdsStartDbOperatorRdsDbAvailableTriggeraws/operators/rds.py:924RdsStopDbOperatorRdsDbStoppedTriggeraws/sensors/bedrock.py:155BedrockCustomizeModelCompletedSensorBedrockCustomizeModelCompletedTriggeraws/sensors/bedrock.py:225BedrockProvisionModelThroughputCompletedSensorBedrockProvisionModelThroughputCompletedTriggeraws/sensors/bedrock.py:294BedrockKnowledgeBaseActiveSensorBedrockKnowledgeBaseActiveTriggeraws/sensors/bedrock.py:381BedrockIngestionJobSensorBedrockIngestionJobTriggeraws/sensors/comprehend.py:132ComprehendStartPiiEntitiesDetectionJobCompletedSensorComprehendPiiEntitiesDetectionJobCompletedTriggeraws/sensors/comprehend.py:217ComprehendCreateDocumentClassifierCompletedSensorComprehendCreateDocumentClassifierCompletedTriggeraws/sensors/emr.py:520EmrJobFlowSensorEmrTerminateJobFlowTriggeraws/sensors/emr.py:648EmrStepSensorEmrStepSensorTriggeraws/sensors/glue.py:207GlueDataQualityRuleSetEvaluationRunSensorGlueDataQualityRuleSetEvaluationRunCompleteTriggeraws/sensors/glue.py:327GlueDataQualityRuleRecommendationRunSensorGlueDataQualityRuleRecommendationRunCompleteTriggeraws/sensors/opensearch_serverless.py:115OpenSearchServerlessCollectionActiveSensorOpenSearchServerlessCollectionActiveTriggerDynamic trigger selection; needs the base-class fix (1 sites)
aws/sensors/bedrock.py:490BedrockBatchInferenceSensortrigger_classThe counts come from parsing every
self.defer(trigger=...)call withast, recording which of the three keywords the trigger construction receives, then reading each trigger class's__init__signature to classify the fix shape.Drafted-by: Claude Code (Opus 5); reviewed by @SEPURI-SAI-KRISHNA before posting
Are you willing to submit PR?
Code of Conduct