@cloud-carbon-footprint/aws
Version:
The core logic to get cloud usage data and estimate energy and carbon emissions from Amazon Web Services.
300 lines • 8.57 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AWS_QUERY_GROUP_BY = exports.KNOWN_USAGE_UNITS = exports.LINE_ITEM_TYPES = exports.UNSUPPORTED_USAGE_TYPES = exports.UNKNOWN_USAGE_TYPES = exports.BYTE_HOURS_USAGE_TYPES = exports.NETWORKING_USAGE_TYPES = exports.HDD_USAGE_TYPES = exports.SSD_USAGE_TYPES = exports.SSD_SERVICES = void 0;
exports.SSD_SERVICES = [
'AmazonDocDB',
'AmazonDynamoDB',
'AmazonEFS',
'AmazonES',
'AmazonSimpleDB',
'AmazonSageMaker',
'AWSIoTAnalytics',
'AmazonKinesisAnalytics',
'AmazonMQ',
'AmazonECS',
'AmazonLightsail',
'AmazonNeptune',
'AmazonFSx',
'AmazonKinesis',
];
exports.SSD_USAGE_TYPES = [
'VolumeUsage.gp2',
'VolumeUsage.io2',
'VolumeUsage.io1',
'VolumeUsage.gp3',
'VolumeUsage.piops',
'GP2-Storage',
'PIOPS-Storage',
'Aurora:StorageUsage',
'Kafka.Storage.GP2',
'ES:Magnetic-Storage',
'TimedPITRStorage-ByteHrs',
'ECS-EC2-GB-Hours',
'Lambda-GB-Second',
'Lambda-Edge-GB-Second',
'RDS:Multi-AZ-StorageUsage',
'Fargate-GB-Hours',
'dc2.large',
'dc2.8xlarge',
'ra3.xlplus',
'ra3.4xlarge',
'ra3.16xlarge',
'ra3.large',
'Storage.SSD.50',
'Storage.MultiAZ:SSD',
'RDS:GP3-Storage',
'Express.Storage',
'TimedStorage-RabbitMQ-ByteHrs',
'Vectors-TimedStorage-ByteHrs',
'Fargate-EphemeralStorage-GB-Hours',
'Lambda-Storage-GB-Second',
'Lambda-Storage-GB-Second-ARM',
'ES:GP3-Storage',
'RDS:Multi-AZ-GP3-Storage',
'RDS:PIOPS-Storage-IO2',
'RDS:Multi-AZ-PIOPS-Storage-IO2',
'RDS:Multi-AZCluster-PIOPS-Storage-IO2',
'IO-OptimizedStorageUsage',
'RDS:Multi-AZCluster-GP3-Storage',
'Storage.SSD.125',
'Storage.SAZ_2N2:SSD',
'Storage.SAZ_2N:SSD',
'Storage.SAZ2:SSD',
'Fargate-ARM-GB-Hours',
];
exports.HDD_USAGE_TYPES = [
'VolumeUsage.st1',
'VolumeUsage.sc1',
'VolumeUsage',
'SnapshotUsage',
'TimedStorage-ByteHrs',
'RDS:StorageUsage',
'GlacierByteHrs',
'Aurora:BackupUsage',
'RDS:ChargedBackupUsage',
'TimedStorage-RRS-ByteHrs',
'ElastiCache:BackupUsage',
'BackupUsage',
'Redshift:PaidSnapshots',
'TimedStorage-SIA-ByteHrs',
'EarlyDelete-SIA',
'TimedStorage-GlacierStaging',
'TimedStorage-SIA-SmObjects',
'TimedStorage-GDA-ByteHrs',
'TimedStorage-GDA-Staging',
'TimedStorage-ZIA-ByteHrs',
'TimedStorage-INT-FA-ByteHrs',
'EarlyDelete-GDA',
'ProcessedStorage-ByteHrs',
'EarlyDelete-ZIA',
'EarlyDelete-ByteHrs',
'TimedStorage-ZIA-SmObjects',
'TimedStorage-INT-IA-ByteHrs',
'EarlyDelete-SIA-SmObjects',
'EarlyDelete-ZIA-SmObjects',
'QS-Enterprise-SPICE',
'TimedBackupStorage-ByteHrs',
'DurableApplicationBackups',
'dc1.large',
'dc1.8xlarge',
'ds2.xlarge',
'ds2.8xlarge',
'EU-TimedStorage-GDA-Staging',
'BytesDeleted-STANDARD',
'BytesDeleted-SIA',
'BytesDeleted-INT',
'BytesDeleted-GDA',
'OverwriteBytes-Put-GLACIER',
'OverwriteBytes-Put-RRS',
'BackupUsage.MultiAZ',
'ColdStorage-ByteHrs-EFS',
'WarmStorage-ByteHrs-EFS',
'WarmStorage-ByteHrs-DynamoDB',
'MagneticStore-ByteHrs',
'ColdStorage-ByteHrs-DynamoDB',
'WarmStorage-ByteHrs-S3',
'AMP:MetricStorageByteHrs',
'TimedStorage-INT-AIA-ByteHrs',
'TimedStorage-GIR-ByteHrs',
'ArchiveTimedStorage-ByteHrs',
'ArchiveTimedStorage-SmallFiles',
'IATimedStorage-ByteHrs',
'IATimedStorage-ET-ByteHrs',
'IATimedStorage-ET-SmallFiles',
'IATimedStorage-SmallFiles',
'TimedStorage-INT-AA-ByteHrs',
'Tables-TimedStorage-ByteHrs',
'TimedStorage-EBS-ByteHrs',
'TimedStorage-GigabyteHrs',
'TimedStorage-GIR-SmObjects',
'TimedStorage-GlacierByteHrs',
'TimedStorage-Z-ByteHrs',
'TimedStorage-XZ-ByteHrs',
'ElasticStorageUsage',
'EarlyDelete-GIR',
'EarlyDelete-GIR-SmObjects',
'StorageUsedInS3ByteHour',
'SnapshotArchiveEarlyDelete',
];
exports.NETWORKING_USAGE_TYPES = [
'AWS-Out-Bytes',
'DataTransfer-Out-Bytes',
'DataTransfer-Regional-Bytes',
'TotalDataXfer-Out-Bytes',
'Egress-Bytes',
'UploadBytes',
'UPLOAD',
'ExportDataSize-Bytes',
'DOWNLOAD',
'Data-Bytes-Out',
'VpcEndpoint-Bytes',
'TransitGateway-Bytes',
'Retrieval',
'BilledBytes',
'DataTransfer-xAZ-Out-Bytes',
'DataTransfer-xAZ-In-Bytes',
'DataTransfer-AZ-Out-Bytes',
'DataTransfer-AZ-In-Bytes',
'VpcPeering-Out-Bytes',
'VpcPeering-In-Bytes',
'DataTransferOut',
'DataTransfer-Out-OBytes',
'DataXfer-Out-Free-Bytes',
'DataProcessing-Bytes',
'Traffic-GB-Processed',
'S3RTC-In-Bytes',
'S3RTC-Out-Bytes',
'VPCLattice-DataProcessing-Bytes',
'AWS-In-Bytes',
'MRAP-Out-Bytes',
'ImportDataSize-Bytes',
];
exports.BYTE_HOURS_USAGE_TYPES = [
'ByteHrs',
'SmObjects',
'EarlyDelete-GDA',
'EarlyDelete-SIA',
'EarlyDelete-ZIA',
'GlacierByteHrs',
'ByteHrs-EFS',
'ByteHrs-DynamoDB',
'EarlyDelete-GIR',
];
exports.UNKNOWN_USAGE_TYPES = [
'AmazonEKS-Hours:perCluster',
'SoftwareUsage',
'BundleUsage',
'Small-Directory-Usage',
'MicrosoftAD-DC-Usage',
'InactivePipelines',
'Lambda-Provisioned',
'ets-hd-success',
'ets-sd-success',
'BuildDuration',
'Build-Min',
'AW-HW-User-Usage',
'TransitGateway-Hours',
'VpcEndpoint-Hours',
'VPN-Usage-Hours',
'NatGateway-Hours',
'NatGateway-Bytes',
'LoadBalancerUsage',
'IdleAddress',
'UnusedStaticIP',
'AdditionalAddress',
'ResolverNetworkInterface',
'DataScanned',
'FastSnapshotRestore',
'GMD-Metrics',
'Dollar',
'Airflow-SmallEnvironment',
'MemoryStore-ByteHrs',
'Output-SD-Hours',
'Output-HD-Hours',
'Output-FullHD-Hours',
'Input-Standard-Hours',
'Airflow-SmallWorker',
'AppRunner-Provisioned-GB-hours',
'AppRunner-GB-hours',
'ApiGatewayCacheUsage',
'PortUsage',
'SharedMsftAD-Usage',
'Kafka.mcu.general',
'SnapshotArchiveStorage',
'PaidPrivateCA',
'Firehose-VpcDelivery-Hours',
'Airflow-MediumEnvironment',
'IPAddressManager-IP-Hours',
'Gateway:VTL-Storage',
'PublicIPv4:InUseAddress',
'VPCLattice-Service-Hourly',
'CloudWAN-Attachment-Hours',
'Guardrail-',
'Column-Statistics-DPU-Hour',
'CodeExecutionInDPUHours',
'Canvas:Session-Hrs',
'Logs-LiveTail',
'Application-Signals',
'MLflow:TrackingServerCompute',
'Airflow-MicroEnvironment',
'MemoryOptimizedStoppedGraphUsage',
'Small-SimpleAD-Usage',
'AmazonEKS-Hours:extendedSupport',
'Q-Business-Starter-Index-free',
'KafkaServerless-ClusterHours',
'VpcEndpoint-Resource-Hours',
'VpcLattice-Service-Network-Resource-Hours',
'CachedData:Valkey',
'CachedData:Redis',
'CachedData:Memcached',
];
exports.UNSUPPORTED_USAGE_TYPES = [
'EMR-EKS-EC2-GBHours',
'APS3-EMR-EKS-EC2-vCPUHours',
'ECS-EC2-GB-Hours',
'ECS-EC2-vCPU-Hours',
'Dollar',
'HostBoxUsage',
'Runtime:Consumption-based:Memory',
'SERVERLESS-MemoryGBHours',
'EKS-Auto:',
'ECS-Anywhere-Instance-hours',
'EnterpriseServer',
'MemoryOptimizedGraphUsage',
'ConnectorSync',
'KendraDeveloperEdition',
'Kendra-GenAI-',
'OpenSearchExtendedSupport',
];
exports.LINE_ITEM_TYPES = [
'Usage',
'DiscountedUsage',
'SavingsPlanCoveredUsage',
];
var KNOWN_USAGE_UNITS;
(function (KNOWN_USAGE_UNITS) {
KNOWN_USAGE_UNITS["HOURS_1"] = "Hrs";
KNOWN_USAGE_UNITS["HOURS_2"] = "Hours";
KNOWN_USAGE_UNITS["HOURS_3"] = "hours";
KNOWN_USAGE_UNITS["VCPU_HOURS"] = "vCPU-Hours";
KNOWN_USAGE_UNITS["DPU_HOUR"] = "DPU-Hour";
KNOWN_USAGE_UNITS["ACU_HOUR"] = "ACU-Hr";
KNOWN_USAGE_UNITS["GB_HOURS"] = "GB-Hours";
KNOWN_USAGE_UNITS["GB_MONTH_1"] = "GB-Mo";
KNOWN_USAGE_UNITS["GB_MONTH_2"] = "GB-Month";
KNOWN_USAGE_UNITS["GB_MONTH_3"] = "GB-Mp";
KNOWN_USAGE_UNITS["GB_MONTH_4"] = "GB-month";
KNOWN_USAGE_UNITS["GB_1"] = "GB";
KNOWN_USAGE_UNITS["GB_2"] = "GigaBytes";
KNOWN_USAGE_UNITS["SECONDS_1"] = "seconds";
KNOWN_USAGE_UNITS["SECONDS_2"] = "Second";
KNOWN_USAGE_UNITS["LAMBDA_SECONDS"] = "Lambda-GB-Second";
})(KNOWN_USAGE_UNITS || (exports.KNOWN_USAGE_UNITS = KNOWN_USAGE_UNITS = {}));
exports.AWS_QUERY_GROUP_BY = {
day: 'day',
week: 'week',
month: 'month',
quarter: 'quarter',
year: 'year',
};
//# sourceMappingURL=CostAndUsageTypes.js.map