Creating a data export for your Capacity Manager data
To create a data export, you can use the Data Exports page in the Capacity Manager console or the AWS CLI.
Prerequisites
You must create an Amazon Simple Storage Service (Amazon S3) bucket. You must make sure of the following:
For more information, see Setting up an Amazon S3 bucket for Capacity Manager data exports.
Procedure
You can export your Capacity Manager data using the AWS Console, the AWS CLI, or PowerShell.
- Console
-
To create a data export
-
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
-
In the navigation pane, choose Capacity Manager.
-
Choose the Data exports tab.
-
Choose Create data export.
-
Configure your export properties, delivery location, and tags (optional).
-
Choose Create.
- AWS CLI
-
To create a data export
Use the following command to create a data export with the specified configuration:
aws ec2 create-capacity-manager-data-export \
--s3-bucket-name my-exports-bucket \
--s3-bucket-prefix capacity-data-exports \
--schedule hourly \
--output-format parquet/CSV \
--tag-specifications 'ResourceType=capacity-manager-data-export,Tags=[{Key=environment,Value=production}]'
- PowerShell
-
To create a data export
Use the New-EC2CapacityManagerDataExport cmdlet.
New-EC2CapacityManagerDataExport `
-S3BucketName "my-exports-bucket" `
-S3BucketPrefix "capacity-data-exports" `
-Schedule "hourly" `
-OutputFormat "parquet" `
-TagSpecification @([Amazon.EC2.Model.TagSpecification]@{
ResourceType = "capacity-manager-data-export"
Tags = @([Amazon.EC2.Model.Tag]@{
Key = "environment"
Value = "production"
})
})