临时停止 Amazon RDS 数据库实例

Stopping an Amazon RDS DB Instance Temporarily

有没有办法在 AWS 中创建每天自动启动/停止数据库的 cron 作业?

您可以使用 AWS Lambda Scheduled Events to start and stop the RDS Server writing code using AWS SDK for RDS. You can use startDBInstance and stopDBInstance 方法。以下示例显示了如何使用 AWS SDK for NodeJS 停止数据库实例。

var params = {
  DBInstanceIdentifier: 'STRING_VALUE', /* required */
  DBSnapshotIdentifier: 'STRING_VALUE'
};
rds.stopDBInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});