How to Convert Trial or BYOL Configuration of DataSunrise to Hourly Billing
In the rapidly evolving landscape of data security, efficient and cost-effective solutions are crucial. DataSunrise provides robust database security and auditing, available under different licensing models, including Trial, Bring Your Own License (BYOL), and Hourly Billing. Transitioning from a Trial or BYOL configuration to an Hourly Billing setup can streamline operations and provide more flexibility. This guide walks you through the necessary steps to convert your existing DataSunrise configuration to an Hourly Billing model on AWS.
Step-by-Step Guide to Convert to Hourly Billing
- Subscribe to DataSunrise Hourly Billing on AWS Marketplace
First, you need to subscribe to the DataSunrise Database and Data Cluster w/Hourly Billing product on the AWS Marketplace. This subscription is necessary to enable the Hourly Billing feature.
- Visit the AWS Marketplace page for DataSunrise Hourly Billing.
- Click on “Subscribe” and follow the prompts. There is no need to deploy immediately; the subscription itself is sufficient.
- Verify Network Connectivity
Ensure that the host where DataSunrise is installed can access the AWS Marketplace Metering endpoint. This is essential for the metering service to function correctly.
Ping the Metering Endpoint:
ping metering.marketplace.ap-southeast-1.amazonaws.com
Test Connection with cURL:
curl https://metering.marketplace.ap-southeast-1.amazonaws.com
- Request a Special License Key
Contact DataSunrise Support to request a special license key for AWS Hourly Billing. This key is required to activate the hourly billing feature within your DataSunrise configuration.
- Update License Keys in DataSunrise
Once you receive the special license key:
- Remove the existing license keys from your DataSunrise setup.
- Replace them with the new AWS Hourly Billing license key provided by DataSunrise Support.
- Prepare the license key file. Put the previously received HB key into the file and save it as appfirewall.reg
- Upload the appfirewall.reg file to the DataSunrise host to transform into a HB/PAYG host. You can use any convenient way for you to perform the task:
- Change the ownership of the file to datasunrise:datasunrise user:group:
- Import the license key to your Dictionary of the setup using AppBackendService IMPORT_LICENSE_FROM_FILE command.
- Set AWS Product code into the env file of DS in case you still receive error messages about AWS Metering client initialization and restart the service to apply the changes (optional):
– upload it using your SSH client tool of preference;
– put it to the S3 bucket and copy to the DS host using AWS CLI S3 commands.
Command example below:
aws s3 cp s3://your/path/to/appfirewall.reg /opt/datasunrise/
sudo chown datasunrise:datasunrise /opt/datasunrise/appfirewall.reg
Workflow:
cd /opt/datasunrise/ ./AppBackendService IMPORT_LICENSE_FROM_FILE=/opt/datasunrise/appfirewall.reg AF_HOME=/opt/datasunrise AF_CONFIG=/opt/datasunrise sudo systemctl restart datasunrise.service
echo AWS_PCODE=e4d3d3b6266ocd12it8gny7g | sudo tee -a /etc/datasunrise.conf sudo systemctl restart datasunrise.service
- Verify IAM Role Permissions
Ensure that the EC2 instance running DataSunrise has the necessary IAM role with the required permissions:
- Attach the IAM policy AWSMarketplaceMeteringFullAccess to the IAM role associated with your EC2 instance.
- Verify that the IAM role includes the aws-marketplace:MeterUsage permission.
Here’s an example of the required policy configuration:
{ "Effect": "Allow", "Action": [ "aws-marketplace:MeterUsage" ], "Resource": "*" }
Additional Considerations
Deploying in a Private Subnet
If DataSunrise is deployed in a private subnet, ensure it can access the AWS Marketplace Metering endpoint. This can be achieved by:
- Attaching an Internet Gateway or NAT Gateway to the route table of the private subnet.
- Using an HTTP Proxy with Internet access to facilitate outbound connections.
Using BYOL License Type
If configuring public access is not feasible due to security policies, consider continuing with the BYOL license type. For BYOL licenses, contact DataSunrise Support for assistance.
Troubleshooting Common Issues
Error: “Can’t check feature in license: AWS Metering service failure!”
This error typically indicates an issue with the AWS metering service connectivity or IAM role permissions. Follow these steps to resolve:
- Check IAM Role. Ensure the EC2 instance has the correct IAM role with the AWSMarketplaceMeteringFullAccess policy attached.
- Verify Network Access. Confirm that the EC2 instance can reach the AWS Marketplace Metering endpoint using the ping and curl commands provided earlier.
- Check Subnet Configuration. If deployed in a private subnet, make sure it has proper routing configurations for outbound access.
Conclusion
Transitioning to Hourly Billing for DataSunrise on AWS can optimize your operational efficiency and cost management. By following this guide, you can seamlessly convert from a Trial or BYOL configuration to an Hourly Billing model. Ensure all network and IAM configurations are correct to avoid common issues and maximize the benefits of hourly billing. For further assistance, don’t hesitate to contact DataSunrise Support.