Cost - Instance Scheduler on AWS

Cost

You are responsible for the cost of the AWS services used while running Instance Scheduler on AWS. As of the latest revision, the cost for running this solution in small deployment of two accounts and two Regions is approximately $5.00 per month. See sample cost tables below for a more detailed breakdown.

Instance Scheduler on AWS is designed to invoke AWS Lambda functions multiple times per run cycle. For example, if the solution is being used to manage both EC2 and RDS instances in one Region for two accounts (one account where the solution is deployed and the other account is a cross account), the solution will run five Lambda functions. One for the initial start of the process to handle CloudWatch Events, which is invoked based on the selected frequency (default: five minutes), and each service, account, and Region will be handled by an individual Lambda run (2 accounts x 2 services x 1 Region).

The optional custom Amazon CloudWatch metrics will cost an additional $0.60 - $1.20 per month for each metrics-enabled schedule ($0.60 per service the schedule operates in). To save costs, this feature can be enabled on a per-schedule basis.

This solution uses on-demand scaling for its Amazon DynamoDB tables to provide sufficient read and write capacity.

See the pricing webpage for each AWS services in this solution.

The cost of the solution per run will depend on the number of instances being tagged and managed by the solution. As the number of EC2 and RDS instances increases, the Lambda run time also increases proportionately.

We recommend creating a budget through AWS Cost Explorer to help manage costs. Prices are subject to change. For full details, refer to the pricing webpage for each AWS service used in this solution.

Pricing examples (monthly)

Small deployment

This pricing example is based on these assumptions:

  • Two accounts, two Regions, scheduling both EC2 and RDS

  • 100 schedules

  • One schedule with metrics enabled

  • Scheduling interval: 5 minutes

  • AWS Lambda function size: 128 MB

  • Average Lambda function runtime: 8 seconds

AWS service Dimensions Monthly Cost [USD]
AWS Lambda
  • 288 scheduling runs per day

  • 1+8 Lambdas per run

  • 8 second average Lambda function runtime

  • ($0.0000021/second)

  • ($0.0000002/Lambda function call)

~ $1.40
AWS CloudWatch Metrics (optional)
  • 1 metrics-enabled schedules * 2 services

  • ($0.60/month)

  • ~ 200,000 PutMetric calls/month

  • ($0.01/1000)

~ $2.00
AWS DynamoDB
  • ~ 70,000 WRU/month ($1.25 per million)

  • ~ 250,000 RRU/month ($0.5 per million)

  • negligible storage costs (<$0.01)

~ $0.15
AWS Key Managed Service
  • 1 KMS key ($1/month)

  • ~ 140,000 api requests/month ($0.30/10000)

~ $1.45
Total: $5.00

Medium deployment

This pricing example is based on these assumptions:

  • 50 accounts, four Regions, scheduling both EC2 and RDS

  • 100 schedules

  • 10 schedules with metrics enabled

  • Scheduling interval: 5 minutes

  • AWS Lambda function size: 128 MB

  • Average Lambda function runtime: 8 seconds

AWS service Dimensions Monthly Cost [USD]
AWS Lambda
  • 288 scheduling runs per day

  • 1+400 Lambdas per run

  • 8 second average Lambda function runtime

  • ($0.0000021/second)

  • ($0.0000002/Lambda function call)

~ $59.00
AWS CloudWatch Metrics (optional)
  • 10 metrics-enabled schedules * 2 services

  • ($0.60/month)

  • ~ 3.5m PutMetric calls/month

  • ($0.01/1000)

~ $47.00
AWS DynamoDB
  • ~ 3.5m WRU/month ($1.25 per million)

  • ~ 4m RRU/month ($0.5 per million)

  • negligible storage costs (<$0.01)

~ $6.00
AWS Key Managed Service
  • 1 KMS key ($1/month)

  • ~ 7m api requests/month ($0.30/10000)

~ $22.00
Total: $134.00

Large deployment

This pricing example is based on these assumptions:

  • 120 accounts, six Regions, scheduling both EC2 and RDS

  • 100 schedules

  • 15 schedules with metrics available

  • Scheduling interval: 5 minutes

  • AWS Lambda function size: 128 MB

  • Average Lambda function runtime: 8 seconds

AWS service Dimensions Monthly Cost [USD]
AWS Lambda
  • 288 scheduling runs per day

  • 1+1400 Lambdas per run

  • 8 second average Lambda function runtime

  • ($0.0000021/second)

  • ($0.0000002/Lambda function call)

~ $212.00
AWS CloudWatch Metrics (optional)
  • 15 metrics-enabled schedules * 2 services

  • ($0.60/month)

  • ~ 12.5m PutMetric calls/month

  • ($0.01/1000)

~ $143.00
AWS DynamoDB
  • ~ 12.5m WRU/month ($1.25 per million)

  • ~ 13m RRU/month ($0.5 per million)

  • negligible storage costs (<$0.01)

~ $19.00
AWS Key Managed Service

1 KMS key ($1/month)

~ 25m api requests/month ($0.30/10000)

~ $76.00
Total: $450.00
Note

The cost of the solution will increase if the number of accounts and Regions are increased. Prices are subject to change. For full details, refer to the pricing webpage for each AWS service you will be using in this solution.

To ensure the solution is efficiently configured, consider the following:

  1. Deploy the solution in a region where the cost of the lambda function is lowest.

  2. Do not change the memory of the lambda function (CloudFormation parameter Memory unless absolutely required) this will increase the cost of the solution significantly.

  3. Remove unused schedules from the solution configurations.

  4. Limit metrics to only those schedules that will provide useful insight.

  5. Select a frequency which reduces the number of Lambda function runs per day. For example, if the schedules are hours apart, set the frequency (Frequency CloudFormation parameter) to one-hour increments. By default, the solution is set to five minutes which means the Lambda function will be invoked 288 times a day, whereas a one-hour frequency will run 24 times a day.