Amazon Elastic Compute Cloud - Documentation for BMC Discovery content reference
Owen Barnes
Related topics
- Product name
- Publisher page
-
- [Amazon|Amazon]
- Category
- Other Application Server Middleware
- Release
- TKU 2023-Dec-1
- More information
- Publisher link
Amazon Elastic Compute Cloud (Amazon EC2) is a web-based service that allows businesses to run application programs in the Amazon Web Services (AWS) public cloud. Amazon EC2 enables developers to spin up virtual machines (VM), which provide compute capacity for IT projects and cloud workloads that run with global AWS data centers.
An example of connecting to Amazon EC2 through a virtual private cloud is represented below.
Supported types
Starting fromTKU_2023_02_01, Discovery supports AWS Launch Template instances and Launch Configurations.
Identification
Triggers
| Pattern | Trigger node | Attribute | Condition | Argument |
|---|---|---|---|---|
| MarkLinuxInstanceHostAsVirtual | HostInfo | aws_instance_id | defined | |
| MarkWindowsInstanceHostAsVirtual | Host | os_type | = | 'Windows' |
| and | ||||
| vendor | = | 'Xen' | ||
| and | ||||
| model | = | 'HVM domU' | ||
| or | ||||
| vendor | = | Amazon EC2' | ||
| and | ||||
| serial | matches | 'regex "^ec2" | ||
| InferVirtualMachines | DiscoveredCloudAPIResultList | discovery_method | = | 'AWS.EC2.DescribeInstances' |
| LinkInstanceToVirtualHost | VirtualMachine | vm_type | = | 'AWS EC2 Instance' |
| LinkAutoScalingGroupToVirtualHosts | VirtualMachine | vm_type | = | 'AWS EC2 AutoScaling Group' |
Discovery methods
The discovery methods are the following:
| Method | Discovered values | Required parameters | REST API reference |
|---|---|---|---|
| AWS.EC2.DescribeInstances | InstanceId | DescribeInstances | |
| ImageId | |||
| VpcId | |||
| SubnetId | |||
| PrivateIpAddress | |||
| PublicIpAddress | result.PublicIpAddress | ||
| InstanceType | |||
| State | result.State | ||
| Platform | |||
| Placement | |||
| LaunchTemplate | for Launch Template instances | ||
| MixedInstancesPolicy | result.LaunchTemplate for Launch Template instances | ||
| LaunchTemplateName | result.LaunchTemplate for Launch Template instances | ||
| Version | result.LaunchTemplate for Launch Template instances | ||
| AWS.AutoScaling.DescribeAutoScalingGroups | Instances | DescribeAutoScalingGroups | |
| AutoScalingGroupARN | |||
| AutoScalingGroupName | |||
| MinSize | |||
| MaxSize | |||
| InstanceId | result.Instances | ||
| HealthStatus | |||
| AvailabilityZones | |||
| AutoScalingGroupARN | |||
| Tags | |||
| AWS.AutoScaling.DescribeLaunchConfigurations | LaunchConfigurationName | DescribeLaunchConfigurations | |
| AWS.EC2.DescribeLaunchTemplateVersion | LaunchTemplateName | DescribeLaunchTemplateVersion | |
| VersionNumber | |||
| DefaultVersion | |||
| LaunchTemplateData | |||
| VersionDescription | |||
| ImageId | result.LaunchTemplateData | ||
| InstanceType |
InferVirtualMachines Pattern models VirtualMachine node for each AWS AutoScaling Group.
| NodeKind | Attribute | Default value/Comments |
|---|---|---|
| VirtualMachine | key | 'aws/<region.code>/ec2/<result.AutoScalingGroupARN>' |
| name | 'AWS EC2 AutoScaling Group <result.AutoScalingGroupName> in <region.label>" | |
| short_name | result.AutoScalingGroupName | |
| type | 'AWS EC2 AutoScaling Group' | |
| vm_type | 'AWS EC2 AutoScaling Group' | |
| vm_name | result.AutoScalingGroupName | |
| cloud | boolean (true) | |
| elastic | boolean (true) | |
| minimum_size | result.MinSize | |
| maximum_size | result.MaxSize | |
| current_size | size(<members>) | |
| members | list(result.Instances) | |
| running | boolean (true/false) | |
| state | '<healthy>/<current_size> members healthy" | |
| availability_zones | result.AvailabilityZones | |
| cloud_id | result.AutoScalingGroupARN | |
| tags | [ <tag_key> <value> ] | |
| image_id | <config.ImageId>, config = launch_config[result.LaunchConfigurationName] | |
| cloud_class | <config.InstanceType>, config = launch_config[result.LaunchConfigurationName] | |
| cdm_vm_enabler_type | ec2_functions.getVMEnablerType(config) | |
| private_ip_addrs | list(result.PrivateIpAddress) | |
| public_ip_addrs | list(result.PublicIpAddress) | |
| all_ip_addrs | list(result.PublicIpAddress + result.PrivateIpAddress) | |
| vpc_ids | list(result.VpcId) | |
| platform | result.Platform | |
| subnet_ids | list(result.SubnetId) | |
| launch_template_id | <autoscaling_launched_template.LaunchTemplateId> | |
| launch_template_name | <autoscaling_launched_template.LaunchTemplateName> | |
| launch_template_version | <autoscaling_launched_template.Version> | |
| member_launch_template_ids | list(<launch_template_ids>) | |
| member_launch_template_names | disct{<launch_template_name>: <launch_template_id>} | |
| member_launch_template_versions | disct{<launch_template_id>: list(<launch_template_versions>)} | |
| images | disct{<image_id>: <version_table>}, where version_table = dict{<launch_template_name>: <launch_template_version>} | |
| template_description | result.VersionDescription |
Discovery view of the scanned results for EC2 AutoScaling Group VirtualMachine is the following:
An example of model visualization is represented below.
InferVirtualMachines Pattern models VirtualMachine node for each AWS EC2 Instance which is not part of the AWS AutoScaling Group.
| NodeKind | Attribute | Default value/Comments |
|---|---|---|
| VirtualMachine | key | 'aws/<region.code>/ec2/<result.InstanceId>' |
| name | "AWS EC2 Instance <aws.getNameFromTags or result.InstanceId> in <region.label>" | |
| short_name | aws.getNameFromTags or result.InstanceId | |
| type | 'AWS EC2 Instance' | |
| vm_type | 'AWS EC2 Instance' | |
| vm_name | aws.getNameFromTags or result.InstanceId | |
| instance_id | result.InstanceId | |
| image_id | result.ImageId | |
| vpc_id | result.VpcId | |
| subnet_id | result.SubnetId | |
| private_ip_addr | result.PrivateIpAddress | |
| public_ip_addr | result.PublicIpAddress | |
| all_ip_addrs | list(<public_ip_addr>) | |
| cloud | boolean (true) | |
| cloud_class | result.InstanceType | |
| cdm_vm_enabler_type | ec2_functions.getVMEnablerType(result) | |
| running | boolean (true/false) | |
| state | result.State.Name | |
| platform | result.Platform | |
| availability_zones | [ placement.AvailabilityZone ], placement = result.Placement | |
| launch_template_id | list(<tag.Value>), where tag = result['Tags'] | |
| launch_template_version | <tag.Value>, where tag = result['Tags'] | |
| cloud_id | aws.getResourceArn(da, <account_id>, region, "ec2", 'instance/<result.InstanceId>') | |
| tags | [ <tag_key> <value> ] |
Discovery view of the scanned results for VirtualMachine is the following:
An example of model visualization is represented below.
Attributes
- Pattern MarkLinuxInstanceHostAsVirtual triggers on HostInfo where aws_instance_id is defined and marks a Linux Amazon EC2 instance as virtual (Xen or KVM based) and attempts to link it to the VirtualMachine.
- MarkWindowsInstanceHostAsVirtual pattern triggers on Windows host where vendor = "Xen" or vendor = "Amazon EC2" and serial matches regex "^ec2". Then Marks a Windows Amazon EC2 instance as virtual and attempts to link it to the VirtualMachine.
- InferVirtualMachines pattern triggers on DiscoveredCloudAPIResultList where discovery_method = "AWS.EC2.DescribeInstances". Runs 'AWS.AutoScaling.DescribeAutoScalingGroups' and 'AWS.AutoScaling.DescribeLaunchConfigurations' queries and, using all the obtained results, infers VirtualMachine nodes to represent each EC2 instance.
- Pattern LinkInstanceToVirtualHost triggers on EC2 instance VM and attempts to link it to a Host.
- Pattern LinkAutoScalingGroupToVirtualHosts triggers on EC2 AutoScaling group and attempts to link it to Hosts.
An example of the BMC Helix Discovery view of the scanned results for CloudService is the following:
The full list of attributes like os_class, state, and image name is available in Reports and Attributes.