AWS EC2
Required AWS EC2 Attributes
The following cost calculation tags are required for traces originating from application and services running on AWS EC2 instances.
Always Required Fields
These fields are always required regardless of the instance type:
Attribute Name to Send to Beakpoint Insights | Example Value | Allowed Values |
---|---|---|
aws.ec2.instance_type | t3.micro | Any valid EC2 instance type |
aws.ec2.instance_id | i-abc1234 | Any valid EC2 instance ID |
aws.region | us-east-1 | Any valid AWS region |
aws.ec2.operating_system | Linux | Linux, Windows, macOS |
aws.ec2.license_model | No License Required | No License Required, Bring Your Own License |
aws.ec2.tenancy | default | default, dedicated, host |
Additional Fields for Spot and Scheduled Instances
These fields are required only if the instance is Spot or Scheduled. If your instance is neither Spot nor Scheduled, you can either leave this attribute off or set it to null.
Attribute Name to Send to Beakpoint Insights | Example Value | Allowed Values |
---|---|---|
aws.ec2.instance_lifecycle | spot | spot, scheduled, on-demand |
Additional Fields for Capacity Reservations
These fields are required only if the instance is using Capacity Reservations. If your instance is not using spot reservations, you can either leave these attributes off or set them to null.
Attribute Name to Send to Beakpoint Insights | Example Value | Allowed Values |
---|---|---|
aws.ec2.capacity_reservation_id | cr-0123456789abcdef0 | Any valid capacity reservation ID |
aws.ec2.capacity_reservation_preference | open | open, none |
Additional Fields for EC2 Fleet
These fields are required only if the instance is part of an EC2 Fleet. If your instance is not part of an EC2 fleet, you can either leave these attributes off or set them to null.
Attribute Name to Send to Beakpoint Insights | Example Value | Allowed Values |
---|---|---|
aws.ec2.fleet_id | fleet-12345678-1234-1234-1234-123456789012 | Any valid EC2 Fleet ID |
aws.ec2.fleet_request_id | sfr-12345678-1234-1234-1234-123456789012 | Any valid Spot Fleet request ID |
Additional Fields for Placement Tenancy
These fields are required only in specific tenancy configurations. Otherwise, you can either leave this attribute off or set it to null.
Attribute Name to Send to Beakpoint Insights | Example Value | Allowed Values |
---|---|---|
aws.ec2.placement_tenancy | default | default, dedicated, host |
Visualization with Mermaid
The diagram below shows which attributes are required depending on the instance type.
Retrieving Instance Details
You can retrieve instance details in a variety of ways, such as through the AWS CLI and AWS API.
We will be releasing SDKs for various languages to make it easier to send these attributes to Beakpoint Insights. Stay tuned for updates!
AWS CLI
aws ec2 describe-instances --instance-ids i-abc123abc123 --region us-east-1
which will return:
{
"Reservations": [
{
"ReservationId": "r-123456",
"OwnerId": "123456789123456789",
"Groups": [],
"Instances": [
{
"Architecture": "x86_64",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"AttachTime": "2024-12-18T03:42:39+00:00",
"DeleteOnTermination": true,
"Status": "attached",
"VolumeId": "vol-123456789456456"
}
}
],
"ClientToken": "abcdefgh-8b11-5c11-4b3c-1234562d7809",
"EbsOptimized": false,
"EnaSupport": true,
"Hypervisor": "xen",
"IamInstanceProfile": {
"Arn": "arn:aws:iam::xxxxxxxxxxx:instance-profile/DescribeImages",
"Id": "AIPAWMFUO5NBK46JGNL5H"
},
"NetworkInterfaces": [
{
"Association": {
"IpOwnerId": "amazon",
"PublicDnsName": "ec2-34-226-121-173.compute-1.amazonaws.com",
"PublicIp": "1.2.3.4"
},
"Attachment": {
"AttachTime": "2024-12-18T03:42:39+00:00",
"AttachmentId": "eni-attach-abc123",
"DeleteOnTermination": true,
"DeviceIndex": 0,
"Status": "attached",
"NetworkCardIndex": 0
},
"Description": "",
"Groups": [
{
"GroupId": "sg-1234567897897899",
"GroupName": "my-group"
}
],
"Ipv6Addresses": [],
"MacAddress": "12:89:85:e5:d8:a7",
"NetworkInterfaceId": "eni-03c73dcd24e0ceb5f",
"OwnerId": "xxxxxxxxxxx",
"PrivateDnsName": "ip-172-31-80-86.ec2.internal",
"PrivateIpAddress": "172.31.80.86",
"PrivateIpAddresses": [
{
"Association": {
"IpOwnerId": "amazon",
"PublicDnsName": "ec2-1-2-3-4.compute-1.amazonaws.com",
"PublicIp": "1.2.3.4"
},
"Primary": true,
"PrivateDnsName": "ip-172-31-80-86.ec2.internal",
"PrivateIpAddress": "172.31.80.86"
}
],
"SourceDestCheck": true,
"Status": "in-use",
"SubnetId": "subnet-123123123456456",
"VpcId": "vpc-111222333111222333",
"InterfaceType": "interface",
"Operator": {
"Managed": false
}
}
],
"RootDeviceName": "/dev/xvda",
"RootDeviceType": "ebs",
"SecurityGroups": [
{
"GroupId": "sg-1234567897897899",
"GroupName": "my-group"
}
],
"SourceDestCheck": true,
"Tags": [
{
"Key": "Name",
"Value": "MyEc2Instance"
}
],
"VirtualizationType": "hvm",
"CpuOptions": {
"CoreCount": 1,
"ThreadsPerCore": 1
},
"CapacityReservationSpecification": {
"CapacityReservationPreference": "open"
},
"HibernationOptions": {
"Configured": false
},
"MetadataOptions": {
"State": "applied",
"HttpTokens": "required",
"HttpPutResponseHopLimit": 2,
"HttpEndpoint": "enabled",
"HttpProtocolIpv6": "disabled",
"InstanceMetadataTags": "disabled"
},
"EnclaveOptions": {
"Enabled": false
},
"BootMode": "uefi-preferred",
"PlatformDetails": "Linux/UNIX",
"UsageOperation": "RunInstances",
"UsageOperationUpdateTime": "2024-12-18T03:42:39+00:00",
"PrivateDnsNameOptions": {
"HostnameType": "ip-name",
"EnableResourceNameDnsARecord": true,
"EnableResourceNameDnsAAAARecord": false
},
"MaintenanceOptions": {
"AutoRecovery": "default"
},
"CurrentInstanceBootMode": "legacy-bios",
"NetworkPerformanceOptions": {
"BandwidthWeighting": "default"
},
"Operator": {
"Managed": false
},
"InstanceId": "i-abc123abc123",
"ImageId": "ami-01816d07b1128cd2d",
"State": {
"Code": 16,
"Name": "running"
},
"PrivateDnsName": "ip-172-31-80-86.ec2.internal",
"PublicDnsName": "ec2-1-2-3-4.compute-1.amazonaws.com",
"StateTransitionReason": "",
"KeyName": "MySecurityKey",
"AmiLaunchIndex": 0,
"ProductCodes": [],
"InstanceType": "t2.micro",
"LaunchTime": "2024-12-18T03:42:39+00:00",
"Placement": {
"GroupName": "",
"Tenancy": "default",
"AvailabilityZone": "us-east-1c"
},
"Monitoring": {
"State": "disabled"
},
"SubnetId": "subnet-123123123",
"VpcId": "vpc-123132132123",
"PrivateIpAddress": "172.31.80.86",
"PublicIpAddress": "1.2.3.4"
}
]
}
]
}