2

I have an AWS Data Pipeline built and keep getting warnings on an EC2 resource's TerminateAfter field being missing. My DataPipeline is designed to use the same instance various times throughout the entire process, which is to run every hour (I haven't run the pipeline yet).

So if I set the Terminate After field to 3 minutes, I'm wondering if the EC2 instance is terminated 3 minutes after every time it is spun up. Or is the EC2 instance terminated 3 minutes after the last time it is used in the pipeline?

simplycoding
  • 2,770
  • 9
  • 46
  • 91

2 Answers2

2

"TerminateAfter" is used to prevent runaway processes. You can set an upper time limit for the process to prevent resources from being used indefinitely. The timer starts when the process begins.

https://books.google.com/books?id=uBtRAgAAQBAJ&pg=PA69&lpg=PA69&dq=aws+resources+%22terminate+after%22&source=bl&ots=N50id8RFbJ&sig=ac2dSsLkMOmhNV8wBWdvgCceYrw&hl=en&sa=X&ei=CVQtVeulIIzmsAS46IH4Dg&ved=0CEoQ6AEwCA#v=onepage&q=aws%20resources%20%22terminate%20after%22&f=false

AFHood
  • 1,020
  • 4
  • 15
  • 26
  • In the linked book, I found the following text to be helpful: "The Terminate After option allows you to set an upper time limit for the copy operation to complete. This will prevent any runaway EC2 instances due to pipeline failures or S3 issues." – mnd Jul 21 '16 at 17:39
1

TerminateAfter is used to denote when the Ec2 resource is terminated after the creation of resource. So, if you set TerminateAfter field to 3 minutes, your Ec2 resource will be torn down 3 minutes After the creation of your resource.

AravindR
  • 677
  • 4
  • 11
  • Are you sure about this? I believe terminateAfter terminates the cluster 'x minutes' (3 minutes here) after its _actual start time_. It has nothing to do with completion of scheduled activity. In fact, very low terminateAfter value might lead to the activity, that is supposed to run on it, being moved to _cancelled_ state. – panther Apr 01 '15 at 19:41