/maintenance-tasks

Primary LanguageSourcePawnApache License 2.0Apache-2.0

Cloud Maintenance Tasks

Introduction

This project aims to povide an automated approach to some of the maintencnace and compliance checks in AWS environments, as set out in the Cloud Environment Maintenance Schedule.

Requirements

In order for the automated dashboards to be displayed, the following items need to be present in your environment:

  1. Steampipe needs to be installed:

    • Installation instructions can be found here.
  2. The Steampipe AWS Plugin needs to be installed.

  3. The Steampipe Kubernetes Plugin needs to be installed.

  4. AWS Credentials need to be set. Instructions can be find here.

    • Export your AWS Profile containing the required permissions (full Read-Only Access is required)
    • E.g. export AWS_PROFILE=my-profile
  5. Set the kube-context to one with sufficient read permissions across the cluster. The kubeconfig file can automatically be updated for an AWS EKS cluster as per instructions here. Full Read-Only permissions are required across the EKS cluster.

    • kubectl config get-contexts
    • kubectl config set context <pre-configured existing context>

Usage

For the Steampipe dashboards:

cd /monthly-tasks/dashboards
steampipe dashboard

Once the steampipe dashboard command has been issued, Steampipe automatically opens a window in your browser for for http://localhost:9194/

For the bash script to get the AMI age in days:

cd scripts
./aws-ami-age-check.sh