Monitoring

Monitoring Attini deployments

To get notifications from the Attini Framework you can subscribe to the AWS SNS Topic attini-deployment-status.

This topic will get a notifications from different stages in an Attini Deployment:

  1. InitDeploy triggered

  2. DeploymentPlan starts

  3. DeploymentPlan ends

  4. When a CloudFormation stack deployment is triggered

  5. When a CloudFormation stack deployment is finished.

All messages will have the following message attributes that can be used for more precise subscriptions: 1. status 2. type 3. environment 4. distributionName

These notification will be an AWS SNS message with the following structure:

{
  "Type" : "Notification",
  "MessageId" : "String",
  "TopicArn" : "String",
  "Message" : "{encoded json sting with attini data}",
  "Timestamp" : "yyyy-MM-ddTHH:mm:ss.SSSZ",
  "SignatureVersion" : "1",
  "Signature" : "String",
  "SigningCertURL" : "String",
  "UnsubscribeURL" : "String"
}

When encoded json string with attini data is decoded it will have the structure bellow:

Data from InitDeploy

{
  "type": "InitDeploy",
  "distributionId": "String",
  "distributionName": "String",
  "initStackName": "String",
  "distributionId": "String",
  "environment": "String"
  "tags": {
    "key": "value",
  }
}

Data from DeploymentPlan start

{
  "type": "DeploymentPlanStart",
  "deploymentOriginData": {
    "distributionTags": {
      "key": "value",
  },
  "distributionId": "String",
  "environment": "String",
  "deploymentPlanCount": "Number",
  "distributionName": "String",
  "deploymentSource": {
    "deploymentSourcePrefix": "String",
    "deploymentSourceBucket": "String"
  },
  "stackName": "String",
  "deploymentName": "String",
  "objectIdentifier": "String",
  "deploymentTime": "Number"
  },
  "executionArn": "String",
  "region": "String"
}

Data from DeploymentPlan end

{
  "type": "DeploymentPlanEnd",
  "deploymentPlanStepsCount": "Number",
  "environment": "String",
  "executionArn": "String",
  "distributionsName": "String",
  "distributionId": "String",
  "region": "String",
  "status": "SUCCEEDED | FAILED | TIMED_OUT | ABORTED"
}

Data from CloudFormation deployment start and finish

{
  "type": "DeployCfn",
  "environment": "String",
  "executionArn": "String",
  "distributionsName": "String",
  "distributionId": "String",
  "eventId": "String",
  "stepName": "String",
  "stackName": "String",
  "region": "String",
  "error": "String",
  "status": "SUCCEEDED | FAILED | STARTED"
}

Monitoring Attini AWS components

Most AWS Resources that Attini is built on have standard metrics which you get for free and you can monitor them however you see fit.

Attini is build on AWS Serverless services so if you want to monitor the Attini components you can find these metrics in the CloudWatch Console.

Most of the Attini is built with components that makes operational issues very unlikely, for example Attini should never reach any capacity limits on S3, SNS or DynamoDB (and if the services have other issues, Attini is configured with retries). If the framework would start to experience any operational issues (service limits/errors caused by the underlying AWS Services), you can catch any unexpected failed deployments by Monitoring Attini deployments.