Reputation: 683
I am using AWS SDK for python to create AWS spot instances, but not getting on how can I specify multiple key-value name pait which will eventually get reflected under 'Tags' section of the created VM. According to the below API documentation, keyName is the name if the key pair , and I am not sure whether this is related to Tags or not.
https://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.Client.request_spot_instances
Upvotes: 2
Views: 1078
Reputation: 7366
You can not define tags through request_spot_instances
. You need to either use create_tags
after the spot instance request is created or create a Launch template with tags defined in them and then create a spot instance fleet request to have tags.
References:
Upvotes: 2