A new Flexera Community experience is coming on November 25th. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AWS EC2 connector import failing

We have configured AWS EC2 Connection (Amazon Web Services) in Beacon, have provided all required access keys, the connection testing is succeeded. Have installed/configured AWS for windows powershell.

Now we have executed import to get all inventory from AWS, but it's failing by giving below error,

 

The 'Get-AWSRegion' command was found in the module 'AWS.Tools.Common', but the module could not be loaded. For more information, run 'Import-Module AWS.Tools.Common'.

 

Can you please help me to understand what's this error and how we can fix it.

Thanks in Advance!

 

Best regards,

Sandeep

 

(10) Replies
ChrisG
By Community Manager Community Manager
Community Manager

The following guidance in the message you are receiving is referring to something you can run in a PowerShell window on the beacon server:

For more information, run 'Import-Module AWS.Tools.Common'.

Try doing that as the message has suggested, and see where it takes you.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Thanks Chris for your response on this issue! I executed it in powershell and got below message,

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS P:\> Import-Module AWS.Tools.Common
WARNING: Multiple variants of AWS Tools for PowerShell (AWSPowerShell, AWSPowerShell.NetCore or AWS.Tools) are
currently installed. Please run 'Get-Module -Name AWSPowerShell,AWSPowerShell.NetCore,AWS.Tools.Common -ListAvailable'
for details. To avoid problems with cmdlet auto-importing, it is suggested to only install one variant.
AWS.Tools is the new modularized version of AWS Tools for PowerShell, compatible with PowerShell Core 6+ and Windows
Powershell 5.1+ (when .NET Framework 4.7.2+ is installed).
AWSPowerShell.NetCore is the monolithic variant that supports all AWS services in a single large module, it is
compatible with PowerShell Core 6+ and Windows Powershell 3+ (when .NET Framework 4.7.2+ is installed).
AWSPowerShell is the legacy module for older systems which are either running Windows PowerShell 2 or cannot be updated
to .NET Framework 4.7.2 (or newer).
PS P:\>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

PS P:\> Get-Module -Name AWSPowerShell,AWSPowerShell.NetCore,AWS.Tools.Common -ListAvailable


Directory: C:\Users\s310266\Documents\WindowsPowerShell\Modules


ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 4.0.5.0 AWS.Tools.Common {Clear-AWSHistory, Set-AWSHistoryConfiguration, Initialize...


Directory: C:\Program Files (x86)\AWS Tools\PowerShell


ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 4.0.6.0 AWSPowerShell {Clear-AWSHistory, Set-AWSHistoryConfiguration, Initialize...

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

I am really very new with powershell so not understanding what steps I need to follow to fix it.

 

Best regards,

Sandeep

If I follow this message correctly, it seems to suggest that you can't have both the AWS.Tools.Common and AWSPowerShell modules installed at the same time.

Given that the AWS.Tools.Common module is installed under the C:\Users\s310266\Documents\WindowsPowerShell\Modules directory that is private to the s310266 user (so wouldn't be available to processes running under other user accounts running on this server), I would suggest deleting that one to see if that resolves the error (or changes the error in some way).

Hopefully the AWSPowerShell  module that is installed under C:\Program Files (x86)\AWS Tools\PowerShell will be enough for the FlexNet Manager Suite AWS connector to run, but the import process will give you an error message if it is not enough.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Thanks Chris for your help.

The issue got fixed after I deleted AWS.Tools.Common under the C:\Users\s310266\Documents\WindowsPowerShell\Modules. The import got completed without any issue.

Now another problem we faced is import/reconciliation completed successfully but no instances got imported into FNMS, in the logs, I could see zero instance imported message. We have configured this connector in our development environment which connects to the AWS Sandbox environment which have around 10 instances configured so expected to get these 10 instances to FNMS.

Please find attached logs and screen shot for your reference.

 

Best regards,

Sandeep

You will see this information by navigating to Discovery and Inventory->Virtual Devices-->Cloud Service Provider Inventory

In order to have these Cloud Instances appear under your Active Inventory view, you must run some type of Discovery Tool to capture the actual Hardware and Software Inventory from this computer, such as with SCCM, BigFix, BMC Discovery, or the FlexNet Manager Agent.

 

I couldn't see any device in the "Discovery and Inventory->Virtual Devices-->Cloud Service Provider Inventory", which is our issue, if import/reconciliation got completed without any error It should be visible there in "Cloud Service Provider Inventory" tab.

I could see in the log zero devices are imported that might be the cause. Please see attachment of logs which I uploaded last message.

 

My concern is, if import completed successfully and there are some instances in AWS so why devices are not visible in "Cloud Service Provider Inventory" tab and also why it's showing zero devices transferred or imported to FNMP?

 

Best regards,

Sandeep

I recently noticed that with FNMS 2020 R1, the online documentation on the FNMS connector to AWS EC2 has improved considerably.

As Captain Kirk explained, in addition to having the AWS connector configured and working for collecting data from a single Amazon AWS account, you have to collect hardware and software information from each instance running on Amazon AWS. The AWS connector will provide the following additional information for instances only:

  • Availability type
  • Availability Zone
  • Cores
  • Creation date (and time)
  • Host ID (use to link to host)
  • Image ID (for the AMI, or Amazon Machine Image, from which the instance was instantiated)
  • Instance ID
  • Instance region
  • Instance type
  • Last known state
  • Lifecycle mode (displayed as Lifecycle in the Cloud Service Provider Inventory page, and as Purchased option in the Cloud Hosting tab of the inventory device properties)
  • MAC address
  • Network ID
  • Threads per core

On a standalone Beacon (not running on an EC2 instance), you see the data imported from the AWS API and uploaded to the FNMS Inventory Server as ZIP files in the local \ProgramData\Flexera Software\Beacon\IntermediateData\Uploaded folder. The name of the ZIP files is I[S=<AWS-Account-Name]_YYYYMMDDHHMMSS.

If you look into the XML files contained in the ZIP files, you can see that the properties listed above are extracted for AWS devices only.

 

Usually this is caused by a lack of permissions on the account if there are definite instances on that account and there are no errors. Please check that you have granted the necessary permissions to the user / role who is collecting data on behalf of the account:

image.png

The data collection parts of this script run in PowerShell Runspaces which fail silently. 

“Things are only impossible until they are not.”
― Jean-Luc Picard

Hi,

I found the text only documentation a bit hard to follow, especially for the subtle differences between parent and child accounts. A colleague of mine prepared a pictured documentation and asked me to share it, please find it attached.

Edit: Updated attachment, even more pictures
Edit: Attachment updated again

Best regards,

Markward

Thanks a lot mfranz for your help and sharing such good document, definitely it would help us to fix our issue related to AWS EC2 connector.

I will update this thread once get fixed out issue. Thanks again for your help.

 

Best regards,

Sandeep