Problems Provisioning EC2 Instance

I’m having trouble provisioning EC2 instances. I created a customized AMI using the Market Place version of CentOS 7. I can launch instances using this AMI if I do it in the AWS console. However, when I tried to provisioning the host using Foreman I get the following error. What am I doing wrong?

2020-01-28T11:15:41 [I|app|18dc0b4c]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"blah", "host"=>{"name"=>"aws-test", "organization_id"=>"2", "location_id"=>"4", "hostgroup_id"=>"", "compute_resource_id"=>"2", "compute_profile_id"=>"1", "environment_id"=>"17", "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"aws-test", "domain_id"=>"1", "subnet_id"=>"12", "ip"=>"", "ip6"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "compute_attributes"=>{"flavor_id"=>"t1.micro", "availability_zone"=>"", "subnet_id"=>"subnet-fd4aa5b6", "security_group_ids"=>["", "sg-02d47b466517eb900", "sg-0b3b6373", "sg-1326346e"], "managed_ip"=>"private", "image_id"=>"ami-068f0508ef99603ad"}, "architecture_id"=>"1", "operatingsystem_id"=>"4", "provision_method"=>"image", "build"=>"1", "medium_id"=>"", "ptable_id"=>"", "pxe_loader"=>"", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"5-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}}
2020-01-28T11:15:41 [I|app|18dc0b4c] Rendering UserData template for aws-test.example.com
2020-01-28T11:15:41 [W|app|18dc0b4c] Could not find a provider for aws-test.example.com. Providers returned {"MediumProviders::Default"=>["CentOS 7.7.1908 medium was not set for host 'aws-test.example.com'", "Invalid medium '' for 'CentOS 7.7.1908'"]}
2020-01-28T11:15:41 [I|app|18dc0b4c] Revoked old certificates and enabled autosign for UserData
2020-01-28T11:15:41 [I|app|18dc0b4c] Adding Compute instance for aws-test.example.com
2020-01-28T11:15:42 [W|app|18dc0b4c] Unhandled EC2 error
2020-01-28T11:15:42 [W|app|18dc0b4c] Failed to create a compute aws (us-west-2-EC2) instance aws-test.example.com: UnsupportedOperation => The instance configuration for this AWS Marketplace product is not supported. Please see the AWS Marketplace site for more information about supported instance types, regions, and operating systems.
 
2020-01-28T11:15:42 [W|app|18dc0b4c] Rolling back due to a problem: [#<Orchestration::Task:0x00007f9d80483378 @name="Set up compute instance aws-test.example.com", @id="Set up compute instance aws-test.example.com", @status="failed", @priority=3, @action=[#<Host::Managed id: nil, name: "aws-test.example.com", last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: "", architecture_id: 1, operatingsystem_id: 4, environment_id: 17, ptable_id: nil, medium_id: nil, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 5, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 2, puppet_proxy_id: nil, certname: nil, image_id: 4, organization_id: 2, location_id: 4, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: 1, provision_method: "image", grub_pass: "", global_status: 0, lookup_value_matcher: "fqdn=aws-test.example.com", pxe_loader: "", initiated_at: nil, build_errors: nil>, :setCompute], @created=1580238941.5867605, @timestamp=2020-01-28 19:15:42 UTC>]
2020-01-28T11:15:42 [I|app|18dc0b4c] Processed 2 tasks from queue 'Host::Managed Main', completed 0/4
2020-01-28T11:15:42 [E|app|18dc0b4c] Task 'Render user data template for aws-test.example.com' *rollbacked*
2020-01-28T11:15:42 [E|app|18dc0b4c] Task 'Set up compute instance aws-test.example.com' *failed*
2020-01-28T11:15:42 [E|app|18dc0b4c] Task 'Acquire IP addresses for aws-test.example.com' *canceled*
2020-01-28T11:15:42 [E|app|18dc0b4c] Task 'Query instance details for aws-test.example.com' *canceled*
2020-01-28T11:15:42 [E|app|18dc0b4c] Failed to save: Failed to create a compute aws (us-west-2-EC2) instance aws-test.example.com: UnsupportedOperation => The instance configuration for this AWS Marketplace product is not supported. Please see the AWS Marketplace site for more information about supported instance types, regions, and operating systems.