简体   繁体   English

AWS Data Pipeline Service创建新的ec2实例

[英]AWS Data Pipeline Service creates new ec2 instance

I have created a new DataPipeline to stop some instances eg tagged as auto-stop/auto-start . 我创建了一个新的DataPipeline来停止某些实例,例如标记为auto-stop / auto-start。

My command is sth like this: 我的命令是这样的:

aws ec2 describe-instances --region us-west-2 --filter "Name=tag:auto-stop,Values=yes" "Name=instance-state-name,Values=running" --query 'Reservations[*].Instances[*].[InstanceId]' --output text |xargs aws ec2 stop-instances --region us-west-2 --instance-ids

ie Stop all instances which are running and tagged as auto-stop:yes in given region 即停止所有正在运行并标记为自动停止的实例:是在给定区域中

Now as soon as scheduler starts an activity, I see a new t1.micro instance is started with a public ip assigned. 现在,调度程序开始活动后,我会看到一个新的t1.micro实例已启动,并分配了一个公共IP。 My question is,is this behavior normal for Data Pipelines ? 我的问题是,这种行为对于数据管道是否正常?

Please provide me any link to documentation and how much I ll be charged for this activity. 请提供任何指向文档的链接以及向我收取多少费用。

If the creation of the associated instance is a normal thing,what is the life-cycle of that instance ? 如果创建关联实例是正常的事情,那么该实例的生命周期是什么?

Yes, this behavior is normal. 是的,这是正常现象。 The t1.micro instance is the one executing the command. t1.micro实例是执行命令的实例。

An Ec2Resource object is set up in your Data Pipeline. 在您的数据管道中设置了一个Ec2Resource对象。 It can be customized, see documentation: http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-object-ec2resource.html 可以对其进行自定义,请参见文档: http : //docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-object-ec2resource.html

By default it's a t1.micro instance that terminates after 50 minutes. 默认情况下,它是一个t1.micro实例,该实例在50分钟后终止。 You are charged for this instance (EC2 pricing: https://aws.amazon.com/ec2/pricing/ ). 您需要为此实例付费(EC2定价: https//aws.amazon.com/ec2/pricing/ )。

As mentioned in one of EC2 knowledge base article https://aws.amazon.com/premiumsupport/knowledge-center/stop-start-ec2-instances/ : 如EC2知识库文章https://aws.amazon.com/premiumsupport/knowledge-center/stop-start-ec2-instances/中所述

An Amazon EC2 t1.micro instance is started as the host environment for execution of a data pipeline. 将Amazon EC2 t1.micro实例作为执行数据管道的主机环境启动。 EC2 instances started for this purpose run for a default timeout period of 50 minutes. 为此目的而启动的EC2实例的默认超时时间为50分钟。 All resources used to host execution of a data pipeline are accrued to your account. 用于托管数据管道执行的所有资源都将累积到您的帐户中。 Executing pipelines to stop and restart an EC2 instance for 100 minutes or less will use the same amount of resources as would be used by simply letting an EC2 t1.micro instance continue to run. 执行管道以在100分钟或更短的时间内停止并重新启动EC2实例,将使用与简单地让EC2 t1.micro实例继续运行所使用的资源相同的资源。 You should stop and restart one or more EC2 t1.micro or larger instances for more than 100 minutes (50 minutes to stop and 50 minutes to start) to ensure that the method described in this article does not consume more resources than are conserved. 您应停止并重新启动一个或多个EC2 t1.micro或更大的实例超过100分钟(停止50分钟,启动50分钟),以确保本文所述方法不会消耗比保守方法更多的资源。

The life cycle of the Ec2 Resource is tied to the activities that need to run on that resource. Ec2资源的生命周期与需要在该资源上运行的活动有关。 Resource is terminated when activities are complete or the 'terminateAfter' timeout is reached. 活动完成或达到“ terminateAfter”超时后,资源将终止。 I believe, as it stands today, AWS Ec2 does not charge for t1.micro instances. 我相信,按照目前的情况,AWS Ec2不对t1.micro实例收费。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM