senzing-garage/community-roadmap

AWS meter-based pricing

Closed this issue · 3 comments

For deployments listed in AWS Marketplace, utilize AWS Marketplace Metering Service integration as an alternative to Bring Your Own License (BYOL).

Code examples:

Python

response = client.meter_usage(
    ProductCode='string',
    Timestamp=datetime(2015, 1, 1),
    UsageDimension='string',
    UsageQuantity=123,
    DryRun=True|False,
    UsageAllocations=[
        {
            'AllocatedUsageQuantity': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
  1. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/meteringmarketplace.html#MarketplaceMetering.Client.meter_usage

Java

default MeterUsageResponse meterUsage(MeterUsageRequest meterUsageRequest)
  1. https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/marketplacemetering/MarketplaceMeteringClient.html#meterUsage-software.amazon.awssdk.services.marketplacemetering.model.MeterUsageRequest-
  2. Custom: https://docs.aws.amazon.com/marketplace/latest/userguide/java-integration-example-meterusage.html
  3. Hourly: https://docs.aws.amazon.com/marketplace/latest/userguide/java-integration-example-registerusage.html

A spike on using the Docker HEALTHCHECK as a means of driving metering:

https://github.com/Senzing/accountant-aws-marketplace