Deterministic creation and labeling of EC2 instances

I create 3 instances of EC2 and then iterate and tag each one. Sometimes a tag request fails, although an instance later appears.

Could this be a timing issue? Do I have to wait a few seconds after creating the instance before marking it? Is there a deterministic way to get started?

+3
source share
2 answers

Update 20140512

At the same time, AWS added more detailed documentation on Troubleshooting API Queries , including the Eventual Consistency section , which basically confirms the analysis in my original answer below:

API Amazon EC2 - , API. , API, , Amazon EC2, , . [...]

[...] , [...] , , , , .

, :

  • . , , . [...]

  • , Describe . , , .

[ ]

. AWS SDK , - . AWS", , , .


20130719

API AWS AWS , , , , ., , :


@datasage, API AWS, -, - , , , , , .. CAP.

. Alex Ciminian question AWS Spot Instance, :

- [...] API Bamboo AWS Plugin , AWS API ; , , id create, , , ().

  • , , , API AWS ( , , , EC2), .

AWS API , , / AWS SDK Java- , .

AWS SDK PHP 2 "", , , . :

, SDK, "". , , , . [...] @method, "waitUntil", .

$client->waitUntil('BucketExists', array('Bucket' => 'my-bucket'));
+12

. _ . boto,

reservation = conn.run_instances(1, 1, instance_type='m1.small', key_name='samplename')

, , .

0

Source: https://habr.com/ru/post/1539671/


All Articles