As we mentioned earlier, memory pressure on DMS instance may happen when migration task put high load on the DMS instance and the allocated memory is not enough to handle the workload. Hence to recreate this scenario, we will put load via DMS task(s).
In this troubleshooting exercise, we are going to use resources (DMS task/RDS instances etc) created under Oracle Source to Amazon Aurora (PostgreSQL) Target lab. However, if you are following any other lab with any other RDBMS source/target engine(s), feel free to continue using those resources.
Navigate to list of DMS task on AWS DMS console. Select the DMS full load migration task. From Actions dropdown menu, click on Stop.

After the task status changes to Stopped, once again, open Actions > Modify.

On the Modify data migration task page, scroll down to Advanced task settings section. Under Full load tuning settings, put 49 in text box for Maximum number of tables to load in parallel and 50000 in Commit rate during full load text box.

Now scroll down to Table mappings section. Under Selection Rules, replace Schema name from DMS_SAMPLE to %. Now scroll down to bottom of the page and hit the Save button.

Once task modification finish, go ahead and RESTART (not resume) the task.

Monitor DMS instance cloud watch metrics. When load on DMS instance memory increases, you may notice decrease in Freeable Memory and increase/fluctuations in SwapUsage. Also monitor DMS task status. After sometime, you will notice that DMS task status is changed to Failed.

Navigate to failed DMS task, under Overview details tab, notice the Last failure message. If DMS task failed due to memory pressure on DMS instance, you will see the message “Last Error Replication task out of memory. Stop Reason FATAL_ERROR Error Level FATAL.”
At this stage, we are able to successfully create the scenario where DMS task fails due to memory pressure on DMS instance!
If you notice task successfully completed even after adding more tables on task, you may add even more tables on the task. Alternatively you may also create separate task on same instance and run all tasks in parallel.