Skip to main content

Check out Port for yourself ➜ 

Amazon Elastic Compute Cloud (EC2)

AWS::EC2::Instance

The following example demonstrates how to ingest your AWS EC2 instances to Port.

EC2 Instance supported actions

The table below summarizes the available actions for ingesting Amazon EC2 Instance resources in Port:

ActionDescriptionTypeRequired AWS Permission
DescribeInstancesActionDiscover EC2 instances and retrieve detailed configuration data.Defaultec2:DescribeInstances
GetInstanceStatusActionRetrieve instance status information.Optionalec2:DescribeInstanceStatus
Optional Properties Note

Properties of optional actions will not appear in the response unless you explicitly include the action that provides them in your configuration.

You can use the following Port blueprint definitions and integration configuration:

EC2 Instance blueprint (click to expand)
{
"identifier": "ec2Instance",
"description": "This blueprint represents an AWS EC2 instance in our software catalog",
"title": "EC2 instance",
"icon": "AWS",
"schema": {
"properties": {
"instanceArn": {
"type": "string",
"title": "Instance ARN"
},
"instanceId": {
"type": "string",
"title": "Instance ID"
},
"instanceType": {
"type": "string",
"title": "Instance type"
},
"availabilityZone": {
"type": "string",
"title": "Availability zone"
},
"tags": {
"type": "array",
"title": "Tags",
"items": {
"type": "object",
"properties": {
"Key": {
"type": "string"
},
"Value": {
"type": "string"
}
}
}
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"account": {
"title": "Account",
"target": "awsAccount",
"required": true,
"many": false
}
}
}
EC2 Instance mapping configuration (click to expand)
resources:
- kind: AWS::EC2::Instance
selector:
query: 'true'
includeActions:
# Optional: Include up to 3 additional actions for more properties
# Choose based on which properties you need most
# - GetInstanceStatusAction
port:
entity:
mappings:
identifier: .Properties.InstanceId
title: .Properties.InstanceId
blueprint: '"ec2Instance"'
properties:
instanceArn: .Properties.InstanceArn
instanceId: .Properties.InstanceId
instanceType: .Properties.InstanceType
availabilityZone: .Properties.AvailabilityZone
tags: .Properties.Tags
relations:
account: .__ExtraContext.AccountId

For more details about EC2 instance properties, refer to the AWS EC2 API documentation.

AWS::EC2::Volume

The following example demonstrates how to ingest your AWS EBS (Elastic Block Store) volumes to Port.

EBS Volume supported actions

The table below summarizes the available actions for ingesting Amazon EBS Volume resources in Port:

ActionDescriptionTypeRequired AWS Permission
DescribeVolumesActionDiscover EBS volumes and retrieve core configuration data such as type, size, IOPS, throughput, availability zone, state, encryption status, and tags.Defaultec2:DescribeVolumes
DescribeVolumeAttributeActionRetrieve the AutoEnableIO attribute for each volume. Required to populate the autoEnableIO property.Optionalec2:DescribeVolumeAttribute
Optional Properties Note

Properties of optional actions will not appear in the response unless you explicitly include the action that provides them in your configuration.

You can use the following Port blueprint definitions and integration configuration:

EBS Volume blueprint (click to expand)
{
"identifier": "ebsVolume",
"title": "EBS Volume",
"icon": "AWS",
"schema": {
"properties": {
"volumeType": {
"type": "string",
"title": "Volume Type",
"description": "The volume type (gp2, gp3, io1, io2, st1, sc1, standard)"
},
"size": {
"type": "number",
"title": "Size (GiB)",
"description": "The size of the volume in GiB"
},
"iops": {
"type": "number",
"title": "IOPS",
"description": "The number of I/O operations per second"
},
"throughput": {
"type": "number",
"title": "Throughput (MiB/s)",
"description": "The throughput provisioned for the volume in MiB/s"
},
"availabilityZone": {
"type": "string",
"title": "Availability Zone",
"description": "The Availability Zone in which the volume resides"
},
"state": {
"type": "string",
"title": "State",
"description": "The current state of the volume",
"enum": [
"creating",
"available",
"in-use",
"deleting",
"deleted",
"error"
]
},
"creationDate": {
"type": "string",
"title": "Creation Date",
"description": "The date and time the volume was created",
"format": "date-time"
},
"encrypted": {
"type": "boolean",
"title": "Encrypted",
"description": "Indicates whether the volume is encrypted"
},
"autoEnableIO": {
"type": "boolean",
"title": "Auto Enable IO",
"description": "Indicates whether the volume is auto-enabled for I/O operations"
},
"tags": {
"type": "array",
"title": "Tags",
"description": "Tags associated with the volume",
"items": {
"type": "object"
}
},
"arn": {
"type": "string",
"title": "ARN",
"description": "The Amazon Resource Name (ARN) of the volume"
}
},
"required": []
},
"calculationProperties": {},
"relations": {
"account": {
"title": "Account",
"target": "awsAccount",
"required": false,
"many": false
}
}
}
EBS Volume mapping configuration (click to expand)
resources:
- kind: AWS::EC2::Volume
selector:
query: 'true'
includeActions:
# Optional: Include up to 3 additional actions for more properties
# Choose based on which properties you need most
# - DescribeVolumeAttributeAction
port:
entity:
mappings:
identifier: .Properties.VolumeId
title: '(.Properties.Tags // [] | map(select(.Key == "Name")) | first | .Value) // .Properties.VolumeId'
blueprint: '"ebsVolume"'
properties:
volumeType: .Properties.VolumeType
size: .Properties.Size
iops: .Properties.Iops
throughput: .Properties.Throughput
availabilityZone: .Properties.AvailabilityZone
state: .Properties.State
creationDate: .Properties.CreateTime
encrypted: .Properties.Encrypted
autoEnableIO: .Properties.AutoEnableIO
tags: .Properties.Tags
arn: '"arn:aws:ec2:" + .__ExtraContext.Region + ":" + .__ExtraContext.AccountId + ":volume/" + .Properties.VolumeId'
relations:
account: .__ExtraContext.AccountId

For more details about EBS volume properties, refer to the AWS EC2 API documentation.