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 with default settings in the US East (N. Virginia) Region is approximately $4.10per month in AWS Lambda charges, or less if you have Lambda free tier monthly usage credit. This is independent of the number of Amazon EC2 instances you are running.

The optional custom Configure the solution Amazon CloudWatch metrics will cost an additional $0.90 per month per schedule or scheduled service. By default, 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 service used in this solution.

Instance Scheduler on AWS is designed to run different numbers of AWS Lambda functions 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 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.

Sample cost table

The costs in the following table are based on the following assumptions:

  1. The solution is deployed in US East (N. Virginia) Region.

  2. The solution is managing both EC2 and RDS instances.

  3. The solution is managing instances in an additional account.

  4. The total number of executions per day is 288 runs (Lambda is scheduled to run every five minutes).

  5. The average run time for each Lambda is assumed as eight seconds (this depends upon the number of instances being scheduled).

  6. The memory selected for the AWS Lambda 128 MB.

AWS service Dimensions Cost [USD]
AWS Lambda

288 runs/24 hours

40 seconds per run (8 seconds for each Lambda)

($0.0000021/second/ run)

$1.45
AWS CloudWatch Metrics (enabled)

1 month per schedule or

scheduled service

$0.90
AWS DynamoDB

1,080,000 (Write/ month)

($1.25 per million requests)

$1.25
AWS DynamoDB

1,080,000 (Read/ month)

($0.5 per million requests)

$0.50
AWS DynamoDB

<1GB

(First 25 GB is free)

$0.0
Total: $4.10
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 is lowest.

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

  3. Remove unused schedules from the solution configurations.

  4. Select a frequency which reduces the number of lambda runs per day, for example if the schedules are hours apart, select the frequency with (CloudFormation parameter “Frequency” to 1 hour, by default the solution is set to 5 minutes which means the Lambda will be invoked 288 times in a day, 1 hour will be 24 times in a day.