<s> from libcloud . compute . types import Provider <EOL> from libcloud . compute . providers import get_driver <EOL> ACCESS_ID = '<STR_LIT>' <EOL> SECRET_KEY = '<STR_LIT>' <EOL> IMAGE_ID = '<STR_LIT>' <EOL> SIZE_ID = '<STR_LIT>' <EOL> cls = get_driver ( Provider . EC2 ) <EOL> driver = cls ( ACCESS_ID , SECRET_KEY , region = "<STR_LIT>" ) <EOL> sizes = driver . list_sizes ( ) <EOL> images = driver . list_images ( ) <EOL> size = [ s for s in sizes if s . id == SIZE_ID ] [ <NUM_LIT:0> ] <EOL> image = [ i for i in images if i . id == IMAGE_ID ] [ <NUM_LIT:0> ] <EOL> node = driver . create_node ( name = '<STR_LIT>' , image = image , size = size ) </s>
