--- Creating base instance
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
27.2.2~20.04.1
One moment, checking your subscription first
Updating package lists
Installing FIPS packages
Updating package lists
Could not enable FIPS.
------------------
--- Updating ua package
27.3~20.04.1
One moment, checking your subscription first
Ubuntu Focal does not provide an AWS optimized FIPS kernel
For help see: https://ubuntu.com/advantage.
------------------
AWS Bug verified with the following script:
------- ------- ------- ------- -------
import logging
import os
from pycloudlib. ec2.cloud import EC2
api = EC2( key_id= os.getenv( "UACLIENT_ BEHAVE_ AWS_ACCESS_ KEY_ID" ), access_ key=os. getenv( "UACLIENT_ BEHAVE_ AWS_SECRET_ ACCESS_ KEY")
tag="test-ec2",
access_
secret_
)
image_id = "ami-0193aa0a9d f84a08b" # Focal pro image .pem".format( "test-key" )
private_key_path = "ec2-{}
key_name = "test-key"
if key_name in api.list_keys(): delete_ key(key_ name)
api.
keypair = api.client. create_ key_pair( KeyName= key_name)
with open(private_ key_path, "w") as stream: write(keypair[ "KeyMaterial" ])
stream.
os.chmod( private_ key_path, 0o600)
api.use_ key(private_ key_path, private_key_path, key_name) or_create_ vpc(name= "test-ec2- pro") image_id, vpc=vpc)
vpc = api.get_
instance = api.launch(
print("--- Creating base instance") execute( "lsb_release -a")) execute( "sh -c 'sudo apt-get update > /dev/null'") execute( "sh -c 'sudo apt-get install ubuntu- advantage- tools > /dev/null'") execute( "ua version")) execute( "sudo ua enable fips --assume-yes")) ------- ------- ----")
print(instance.
instance.
instance.
print(instance.
print(instance.
print("
print("--- Updating ua package") archive. ubuntu. com/ubuntu/ {}-proposed restricted main multiverse universe' >> /etc/apt/ sources. list.d/ proposed- repositories. list\"" execute( cmd.format( "focal" )) execute( "sh -c 'sudo apt-get update > /dev/null'") execute( "sh -c 'sudo apt-get install ubuntu- advantage- tools > /dev/null'") execute( "ua version")) execute( "sudo ua enable fips --assume-yes")) ------- ------- ----") ------- ------- ------- ------- ------- -----
cmd = "sudo sh -c \"echo 'deb http://
instance.
instance.
instance.
print(instance.
print(instance.
print("
instance.delete()
-------
To run that script, you need the pycloudlib dependency, which can be found here: /github. com/canonical/ pycloudlib/ tree/main/ pycloudlib
https:/
Test output:
Test output:
--- Creating base instance /ubuntu. com/advantage.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
27.2.2~20.04.1
One moment, checking your subscription first
Updating package lists
Installing FIPS packages
Updating package lists
Could not enable FIPS.
------------------
--- Updating ua package
27.3~20.04.1
One moment, checking your subscription first
Ubuntu Focal does not provide an AWS optimized FIPS kernel
For help see: https:/
------------------
PS: This bug only affects focal