3 ms·
> You will likely find it is difficult or impossible to access the server to take any measures to solve the issue until the CPU credits have accrued. Only if y
by sudosteph 9y ago
> You will likely find it is difficult or impossible to access the server to take any measures to solve the issue until the CPU credits have accrued.
Only if you don't want to enable t2 unlimited -> https://docs.aws.amazon.com/en_us/cli/latest/reference/ec2/modify-instance-credit-specification.html https://docs.aws.amazon.com/en_us/cli/latest/reference/ec2/m...
But really seems like it would be simple enough to rig something up that would:
1. Trigger CloudWatch Alarm on Insufficient T2 Credits
2. Send SNS notification to SNS topic when triggered
3. have lambda function subscribed to enable t2 unlimited
4. have subscribed email or slack alert to be like "hey something's up, we enabled t2 unlimited for now"
Though CW alarms for this are limited to running every 5 min, so could take a bit to notify, or you might need to set your threshold a bit high at first. I usually prefer to configure a CW event rule for this kind of stuff, but I don't see any support for that out of the box.
At least they explain the math pretty decently for predicting the usage: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances-monitoring-cpu-credits.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-insta...
- rtisdale 9y agoGreat points on the T2 Unlimited and an interesting solution for enabling T2 Unlimited and alerting. I was sure to add a note to the article after a few people here mentioned it. Thanks for sharing your thoughts :).
- deleted 9y ago[deleted]
- jweir 9y agoTerraform just released support for the unlimited flag via the 'credit_specification' field https://github.com/terraform-providers/terraform-provider-aws/blob/master/CHANGELOG.md#1160-april-25-2018 https://github.com/terraform-providers/terraform-provider-aw...
- sudosteph 9y agoAnd CloudFormation users can specify it here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-creditspecification.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGui... Good to see it's becoming more common knowledge though.