Code Monkey home page Code Monkey logo

aws-kms-deletion-notification's Introduction

© 2023 Amazon Web Services, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution 4.0 International License.

Monitor AWS KMS keys disable and scheduled deletion

Summary

Deleting an AWS KMS key is destructive and potentially dangerous. It deletes the key material and all metadata associated with the KMS key and is irreversible. After a KMS key is deleted, you can no longer decrypt the data that was encrypted under that KMS key, which means that data becomes unrecoverable.

This pattern explain the steps to monitor Amazon KMS key status by combining the features of AWS EventBridge and SNS notification that notifies you when a KMS key status is changed to disable and pending deletion.Post reciving the notification, you can reconsider your decision to delete it or enable the disabled KMS.key

Prerequisites

An active AWS account with an AWS Identity and Access Management (IAM) user

Understanding of the following AWS services: 

  • Amazon EventBridge

  • EventBridge Input Transformer

  • AWS KMS

  • Amazon Simple Notification Service (Amazon SNS)

Target architecture

Architecture Diagram

  • Deletion of an AWS KMS key is scheduled or KMS key got disabled by any user.

  • The scheduled-deletion event is evaluated by an EventBridge rule.

  • The EventBridge rule engages the Amazon SNS topic.

  • An email notification is send to the user or group for further action.

Tools

  • Amazon EventBridge rules - A rule matches incoming events and sends them to targets for processing. A single rule can send an event to multiple targets, which then run in parallel. Rules are based either on an event pattern or a schedule.

  • AWS CloudFormation – AWS CloudFormation is an infrastructure as code (IaC) service that allows you to easily model, provision, and manage AWS and third-party resources.

  • [AWS KMS] – AWS Key Management Service (AWS KMS) is a managed service for creating and controlling AWS KMS keys, the encryption keys used to encrypt your data.

  • [Amazon SNS] – Amazon Simple Notification Service (Amazon SNS) is a managed service that provides message delivery from publishers to subscribers (also known as producers and consumers). Publishers communicate asynchronously with subscribers by sending messages to a topic, which is a logical access point and communication channel. 

Steps to Deploy

  1. Clone this repository to local workstation
  2. Deploy Alerting-KMS-Events.yaml to the account where you want the deploye the solution.

aws-kms-deletion-notification's People

Contributors

amazon-auto avatar shubham-amaz avatar vvnair-amzn avatar

Watchers

 avatar

Forkers

arun-cloudsec

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.