はじめに DI部のおおたきです。今回AWS Lambdaを使ってRDSの削除スクリプトを書いてみました。 pythonコードは初めて書いてみましたので、色々突っ込みどころがあるかもしれませんがご了承ください! 作成したLambdaはCloudWatchでruleを作成して決まった時間に実行するようにしました。 ロールを作成する Lambdaを実行するにはロールが必要になりますので、最初にロールを作成します。 Management ConsoleのIAMからRolesから「Create new role」をクリックします。 「AWS Service Role」から「AWS Lambda」を選択します。 次に「Attach Policy」で「AmazonRDSFullAccess」を選択しロールを作成します。 Lambda関数を作成する CloudWatchの設定 Management Con