[SOLVED] Chef training on aws opsworks with learn_chef_apache2 issue

I am going through the training module and running in to an issue during bootstrap of client in Opsworks. All has gone great so far, however when bootstrapping it is trying to execute yum in favor of apt.

[2019-05-22T21:53:39+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2019-05-22T21:53:39+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-05-22T21:53:39+00:00] FATAL: Chef::Exceptions::package: yum_package[apache2] (learn_chef_apache2::default line 11) had an error: Chef::Exceptions::package: No candidate version available for apache2

This is the command I am running:
knife bootstrap -N node1-ubuntu -x ec2-user --sudo --run-list 'recipe[learn_chef_apache2]'

It is an Ubuntu AMI, however the OpsWorks is an Amazon2 instance.
Here is the tracefile from the server:
Generated at 2019-05-22 21:53:39 +0000
Chef::Exceptions::package: yum_package[apache2] (learn_chef_apache2::default line 11) had an error: Chef::Exceptions::package: No candidate version available for apache2
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/mixin/why_run.rb:238:in run' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/mixin/why_run.rb:316:inblock in run'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/mixin/why_run.rb:315:in each' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/mixin/why_run.rb:315:inrun'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/provider.rb:192:in process_resource_requirements' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/provider.rb:170:inrun_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource.rb:578:in run_action' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:70:inrun_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:98:in block (2 levels) in converge' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:98:ineach'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:98:in block in converge' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/resource_list.rb:94:inblock in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/stepable_iterator.rb:114:in call_iterator_block' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/stepable_iterator.rb:85:instep'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/stepable_iterator.rb:103:in iterate' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/stepable_iterator.rb:55:ineach_with_index'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/resource_list.rb:92:in execute_each_resource' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:97:inconverge'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:720:in block in converge' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:715:incatch'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:715:in converge' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:754:inconverge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:286:in run' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application.rb:303:inrun_with_graceful_exit_option'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application.rb:279:in block in run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/local_mode.rb:44:inwith_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application.rb:261:in run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application/client.rb:449:inrun_application'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application.rb:66:in run' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/bin/chef-client:25:in<top (required)>'
/bin/chef-client:75:in load' /bin/chef-client:75:in'

Caused by Chef::Exceptions::package: No candidate version available for apache2
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/mixin/why_run.rb:238:in run' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/mixin/why_run.rb:316:inblock in run'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/mixin/why_run.rb:315:in each' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/mixin/why_run.rb:315:inrun'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/provider.rb:192:in process_resource_requirements' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/provider.rb:170:inrun_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource.rb:578:in run_action' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:70:inrun_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:98:in block (2 levels) in converge' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:98:ineach'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:98:in block in converge' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/resource_list.rb:94:inblock in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/stepable_iterator.rb:114:in call_iterator_block' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/stepable_iterator.rb:85:instep'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/stepable_iterator.rb:103:in iterate' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/stepable_iterator.rb:55:ineach_with_index'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/resource_collection/resource_list.rb:92:in execute_each_resource' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/runner.rb:97:inconverge'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:720:in block in converge' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:715:incatch'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:715:in converge' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:754:inconverge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/client.rb:286:in run' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application.rb:303:inrun_with_graceful_exit_option'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application.rb:279:in block in run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/local_mode.rb:44:inwith_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application.rb:261:in run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application/client.rb:449:inrun_application'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/lib/chef/application.rb:66:in run' /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.12.9/bin/chef-client:25:in<top (required)>'
/bin/chef-client:75:in load' /bin/chef-client:75:in'

Thanks!

I solved this issue. I was bootstrapping to the chef server as my instance, when I should've been using the instance IP, itself. Run is good!