The Ec2Resource object in AWS Data Pipeline is failing because of the following error. How do I resolve this?

Resource is stalled. Associated tasks not able to make progress.

If an Amazon Elastic Compute Cloud (Amazon EC2) instance used by Data Pipeline takes too long to start, the Ec2Resource object fails because Data Pipeline assumes that the instance isn't ready.

Here are some common reasons why Amazon EC2 instances time out in Data Pipeline.

Software updates after launch

EC2 instances automatically install software updates after they launch. This might cause EC2 instances to time out in Data Pipeline.

Use one of the following options to resolve this issue:

  • In the imageId field for the Ec2Resource object, specify the ID of the latest Amazon Linux hardware virtual machine (HVM) Amazon Machine Image (AMI). Using the latest AMI significantly reduces the amount of time required for software updates.
    Note: Use the AMI ID that corresponds to the Region that your pipeline is in. For a list of AMI IDs for each Region, see the imageId row of the Optional Fields table in the AWS Data Pipeline Developer Guide: Ec2Resource.
  • Install Task Runner on an existing EC2 instance, and then add a workerGroup field to connect the object to the pipeline activities that it should process.

Network connectivity

Check the following:

For more information, see Launching Resources for Your Pipeline into a VPC.

Task Runner installation failure

When you use the Ec2Resource object, cloud-init installs Task Runner. If the installation fails, the EC2 instance can't communicate with the Data Pipeline endpoint.

Check the cloud-init logs for the EC2 instance to find out why the installation failed. For example, if the pipelineLogUri field contains unexpected characters, such as quotation marks, the Task Runner installation script fails.

Note: After you change a pipeline definition, you must reactivate the pipeline for your changes to take effect.

Missing AWS Identity and Access Management (IAM) permissions

The IAM instance profile used by the EC2 instance must give Task Runner permission for the APIs that Task Runner attempts to call, such as PollForTask.

Connect to the EC2 instance and then check the Task Runner logs to find out if a missing permission is causing the error. Then, check that the IAM instance profile is configured correctly.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2018-08-03

Updated: 2019-01-18