DatabaseMigrationService.Waiter.ReplicationTaskStopped doesn't work for recently started jobs
See original GitHub issueUse case
I have a job that kicks off a DMs replication task on a periodic basis.
Expected behaviour
DatabaseMigrationService.Waiter.ReplicationTaskStopped waits for the replication task to reach a stopped or error state.
Actual behaviour
Errors out immediately with:
Traceback (most recent call last):
File "lambda-dms-kickoff.py", line 41, in <module>
lambda_handler({},{})
File "lambda-dms-kickoff.py", line 33, in lambda_handler
'Values': [DMS_TASK_ARN]
File "/Users/Jared/git-repos/aws-lambda-attachment-extractor/.venv/lib/python3.6/site-packages/botocore/waiter.py", line 53, in wait
Waiter.wait(self, **kwargs)
File "/Users/Jared/git-repos/aws-lambda-attachment-extractor/.venv/lib/python3.6/site-packages/botocore/waiter.py", line 323, in wait
last_response=response,
botocore.exceptions.WaiterError: Waiter ReplicationTaskStopped failed: Waiter encountered a terminal failure state
This is also the case with the AWS CLI:
aws --region us-east-1 dms wait replication-task-stopped --filters "Name=replication-task-arn,Values=$replication_task_arn"
Waiter ReplicationTaskStopped failed: Waiter encountered a terminal failure state
Although if I check the status manually, I can see it’s in a non-terminal and non-failure state:
aws --region us-east-1 dms describe-replication-tasks --filters "Name=replication-task-arn,Values=$replication_task_arn" --query "ReplicationTasks[0].Status"
"starting"
Code
start_resp = dms.start_replication_task(
ReplicationTaskArn=DMS_TASK_ARN,
StartReplicationTaskType='reload-target'
)
time.sleep(3)
waiter = dms.get_waiter('replication_task_stopped')
waiter.wait(Filters=[
{
'Name': 'replication-task-arn',
'Values': [DMS_TASK_ARN]
},
])
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:18 (2 by maintainers)
Top Results From Across the Web
Troubleshooting migration tasks in AWS Database Migration ...
Troubleshoot issues when migrating data using AWS Database Migration Service (AWS DMS).
Read more >DatabaseMigrationService — Boto3 Docs 1.26.33 ... - AWS
A low-level client representing AWS Database Migration Service ... open-source databases such as Oracle, PostgreSQL, Microsoft SQL Server, Amazon Redshift, ...
Read more >aws dms - Fig.io
AWS Database Migration Service AWS Database Migration Service (AWS DMS) can migrate your data to and from the most widely used commercial and...
Read more >Create a migration job | Database Migration Service
Database Migration Service uses migration jobs to migrate data from your ... how the newly created Cloud SQL instance will connect to the...
Read more >Best Practices for Using AWS DMS for SQL Server Replication
Basic concepts for getting started with Amazon Database Migration Service · AWS DMS Replication Instances · AWS DMS Endpoints · Amazon DMS Tasks....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is still an issue which makes waiters for ‘running’ and ‘stopped’ states almost unusable. Is there any plans to fix this?
@swetashre Can we re-open this issue?