Skip to main content

Check out Port for yourselfย 

Amazon Elastic Compute Cloud

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. ReferenceDefaultec2:DescribeInstances
GetInstanceStatusActionRetrieve instance status information. ReferenceOptionalec2: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.