Notification

Icon
Error

AWS: Instance Security Group Permissions (Built-in)

Posted: Tuesday, March 5, 2019 1:20:06 PM(UTC)
Esben.D

Esben.D

Member Administration Original PosterPosts: 1,966
0
Like
The report below gives back a list of AWS Instances and their security group permissions.

The report will only list permissions when the following criteria are met:
  • You have Lansweeper 7.1 or higher.
  • There is AWS Instance data scanned.
  • The asset has the active state.

Code:
Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetName,
  tsysAssetTypes.AssetTypeIcon10 As icon,
  tblAssets.IPAddress,
  tsysIPLocations.IPLocation,
  tblAssetCustom.Manufacturer,
  tblAWSInstance.InstanceId,
  tblAWSInstance.InstanceType,
  tblAWSInstance.Platform,
  tblAWSInstance.Region,
  tblAWSInstance.State,
  tblAWSSecurityGroup.GroupId As SecurityGroupId,
  tblAWSSecurityGroup.Name,
  tblAWSSecurityGroup.OwnerId,
  tblAWSSecurityGroup.Description,
  tblAWSSecurityGroupPermission.FromPort,
  tblAWSSecurityGroupPermission.ToPort,
  tblAWSSecurityGroupPermission.IpProtocol,
  tblAWSSecurityGroupPermissionIpRange.CidrIp,
  tblAWSSecurityGroupPermissionIpRange.Description As RangeDescription
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tsysIPLocations On tsysIPLocations.LocationID =
    tblAssets.LocationID
  Inner Join tblState On tblState.State = tblAssetCustom.State
  Inner Join tblAWSInstance On tblAWSInstance.AssetId = tblAssets.AssetID
  Inner Join tblAWSInstanceSecurityGroup On
    tblAWSInstanceSecurityGroup.AWSInstanceId = tblAWSInstance.AWSInstanceId
  Inner Join tblAWSSecurityGroup On tblAWSSecurityGroup.AWSSecurityGroupId =
    tblAWSInstanceSecurityGroup.AWSSecurityGroupId
  Inner Join tblAWSSecurityGroupPermission On
    tblAWSSecurityGroupPermission.AWSSecurityGroupId =
    tblAWSSecurityGroup.AWSSecurityGroupId
  Inner Join tblAWSSecurityGroupPermissionIpRange On
    tblAWSSecurityGroupPermissionIpRange.AWSSecurityGroupPermissionId =
    tblAWSSecurityGroupPermission.AWSSecurityGroupPermissionId
Where tblState.Statename = 'Active'
Order By tblAWSInstance.Region,
  tblAssets.IPNumeric,
  SecurityGroupId,
  tblAWSSecurityGroupPermission.FromPort

Active Discussions

Lansweeper Report for Microsoft Win 7 Extended Support
by  RC62N   Go to last post Go to first unread
Last post: Yesterday at 6:46:53 PM(UTC)
Lansweeper How to make a colour coded report
by  B.Rutherford  
Go to last post Go to first unread
Last post: Yesterday at 4:27:06 PM(UTC)
Report Center All switches and the assets connected to them
by  NWSF   Go to last post Go to first unread
Last post: 12/12/2019 5:23:34 PM(UTC)
Lansweeper Report showing single asset type
by  RC62N  
Go to last post Go to first unread
Last post: 12/11/2019 10:02:41 PM(UTC)
Report Center .Net 4.5 through 4.8 report - Reg Key scanning based
by  Martin Schulz   Go to last post Go to first unread
Last post: 12/11/2019 11:55:24 AM(UTC)
Lansweeper Assets and Owner listing help
by  ssmarr5  
Go to last post Go to first unread
Last post: 12/10/2019 9:23:09 PM(UTC)
Lansweeper HPE SAS Solid State Drives failure report
by  Tommy75   Go to last post Go to first unread
Last post: 12/10/2019 8:04:05 AM(UTC)
Lansweeper Adding Owner/User information to Assets:All column report
by  ssmarr5  
Go to last post Go to first unread
Last post: 12/10/2019 12:15:01 AM(UTC)