Get AWS credentials from the MIQ AWS provider

I tried using the method mentioned in (Accessing AWS Credentials) - I’m a MIQ newbie
firstly it seems ems_amazon is now deprecated
and secondly - I believe the structure of the ext_management_systems itself has changed

I’m using the latest RedHat CLoudforms 4.5 - could you please help me.

I’m trying to get the credentials of the AWS provider - so I can use it along with the API/CLI to interact with AWS services that CF does not natively interact with like Lambda/Cloudformation etc.

Could some please suggest a mechanism for this - any help will be dearly appreciated?

I found the credentials stored under the VMDB table - authentications.

However can’t figure a way to retrieve the credentials from within Automate Jobs.

The other challenge is that the Security Key is encrypted using v2_key - the same one used by the VMDB, first created when the (first) VMDB was created.

Please help.

@provider = $evm.vmdb(:ManageIQ_Providers_Amazon_CloudManager).first
username = @provider.authentication_userid
password = @provider.authentication_password

Have you tried to do a ems.connect , which should return you a connection to the AWS.

See here and then here

The ems is the ExtManagementSystem instance of the ec2 cloud manager.