toil.lib.aws.ami¶
Attributes¶
Functions¶
|
Retrieve the flatcar AMI image to use as the base for all Toil autoscaling instances. |
|
Yield AMI IDs for the given architecture from the Flatcar release feed. |
|
Check a Flatcar release feed for the latest flatcar AMI. |
|
Query AWS for all AMI names matching |
Module Contents¶
- toil.lib.aws.ami.logger¶
- toil.lib.aws.ami.get_flatcar_ami(ec2_client, architecture='amd64')¶
Retrieve the flatcar AMI image to use as the base for all Toil autoscaling instances.
AMI must be available to the user on AWS (attempting to launch will return a 403 otherwise).
- Priority is:
User specified AMI via TOIL_AWS_AMI
Official AMI from stable.release.flatcar-linux.net
Search the AWS Marketplace
If all of these sources fail, we raise an error to complain.
- toil.lib.aws.ami.flatcar_release_feed_amis(region, architecture='amd64', source='stable')¶
Yield AMI IDs for the given architecture from the Flatcar release feed.
- Parameters:
- Return type:
Iterator[str]
Retries if the release feed cannot be fetched. If the release feed has a permanent error, yields nothing. If some entries in the release feed are unparseable, yields the others.
- toil.lib.aws.ami.feed_flatcar_ami_release(ec2_client, architecture='amd64', source='stable')¶
Check a Flatcar release feed for the latest flatcar AMI.
Verify it’s on AWS.
- Parameters:
ec2_client (botocore.client.BaseClient) – Boto3 EC2 Client
architecture (str) – The architecture type for the new AWS machine. Can be either amd64 or arm64
source (str) – can be set to a Flatcar release channel (‘stable’, ‘beta’, or ‘alpha’), ‘archive’ to check the Internet Archive for a feed, and ‘toil’ to check if the Toil project has put up a feed.
- Return type:
Optional[str]