Skip to main content

little-sister-aws

The aws check type for little-sister: one or more AWS accounts on the status tree, with a node per account and a node per aspect beneath it.

  • Needs little-sister ≥ 0.3.12 (a floor, never a pin), and boto3.
  • Registers one check type: aws.
/<path>                     what is watched
  /<path>/live              one node per account, its own assumed session
    /<path>/live/cloudwatch   alarms
    /<path>/live/ec2          instances, grouped by their Name tag
    /<path>/live/lambda       functions
    /<path>/live/codepipeline pipelines
    /<path>/live/batch        job queues and the jobs in them
  /<path>/backup
    …

Account first, aspect second, because the account is what an operator acts on as a group: "staging is down for the migration" is one maintenance pin on one node, where a flat list of alarms would be one pin per alarm. Each account's node also absorbs its own bad news — a role that cannot be assumed reddens that account and leaves the others reporting.

Install

dependencies = [
    "little-sister==<the version you pin>",
    "little-sister-aws==<this version>",
]

and one import in the deployment's wsgi.py, before little_sister.app:

import little_sister_aws  # noqa: F401  (registers the `aws` type)

Configure

One check config, one accounts: list. examples/aws.yaml is the whole shape with a comment per knob; the short version:

type: aws
path: /team/aws
frequency: 60s
timeout: 120s

regions: [eu-central-1]          # the default every account inherits

accounts:
  - name: live
    role_arn: arn:aws:iam::000000000000:role/application/monitoring-role
  - name: backup
    regions: [eu-west-1]         # replaces the default, does not add to it

cloudwatch: {}                   # every aspect has an `enabled:` and its own knobs
batch:
  enabled: false                 # off: no node, and no API call

Credentials. By default the ambient AWS credential chain — an instance profile, a task role, an SSO session, the AWS_* variables — and each account's role_arn is assumed from it. profile: names an ~/.aws/config profile to assume from and composes with role_arn; static keys are an optional secrets: block of little-sister secret references, and are mutually exclusive with profile.

Switching an aspect off. Each aspect block opens with enabled:. Off, the aspect emits no node and makes no API call, which is what a role whose policy does not carry that service needs. An aspect that says nothing is on; every aspect off is refused at startup; and the check's card names what is off, because an absent node otherwise reads exactly like a broken check.

The IAM policy

One role per account, and it has to cover every aspect that is switched on, in every region the account is watched in:

Aspect Actions
cloudwatch cloudwatch:DescribeAlarms
ec2 ec2:DescribeInstances
lambda lambda:ListFunctions, cloudwatch:GetMetricData, logs:DescribeLogStreams, logs:GetLogEvents
codepipeline codepipeline:ListPipelines, codepipeline:ListPipelineExecutions
batch batch:DescribeJobQueues, batch:ListJobs

The deployment's own identity needs sts:AssumeRole on each role, and sts:GetCallerIdentity is spent once per profile-only account.

Documentation

  • docs/adr/0001-the-aws-check-type.md — why one type with aspects rather than one type per service, why the tree is account first, and why this package uses boto3 where the rest of the family uses stdlib urllib.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

little_sister_aws-0.1.0.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

little_sister_aws-0.1.0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file little_sister_aws-0.1.0.tar.gz.

File metadata

  • Download URL: little_sister_aws-0.1.0.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for little_sister_aws-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5568717a1493fc4a3a09a0e48276818cf6813a7324f817f5d3530ebba2bc0b4
MD5 c98949a6b815009c49bcfe65e14bb098
BLAKE2b-256 907f971f65175dd74a0bcdec523d5b460d787c422b9ab93556c33e1095e3a93e

See more details on using hashes here.

File details

Details for the file little_sister_aws-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: little_sister_aws-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for little_sister_aws-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d644ba5c1ba816ea71377647a8103f5a36c818b593f46524d545c90ddd4ba02e
MD5 8dfac5bb80d0528ad29c86acc3c9e153
BLAKE2b-256 ab6104295b7b21cc4850a62858d4c404a7bb2628c3aa628c847c22316123845a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page