GithubHelp home page GithubHelp logo

prasanlakhani / aws_tag_automation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 72 KB

This aws lamda will disable & re enable the tag at scheduled time, provided as Json file

Python 75.92% HCL 22.73% Shell 1.35%

aws_tag_automation's Introduction

aws_tag_automation

This aws lamda will disable & re enable the tag at scheduled time, provided as Json file

Tag Automation

Tag Automation is a tool designed to automate tagging operations based on JSON configurations. Users can upload a JSON file to an S3 bucket, triggering a Lambda function. This Lambda function, in turn, creates schedulers based on the specified start and stop times in the JSON file. Cleanup schedulers are also created to delete all the scheduled events one hour after activity is comepleted.

JSON Configuration Example

{
  "Version": "1.0",
  "Name": "A517965",
  "UID": "778feb",
  "Tag": "Eviden_Manage",
  "Tag_On": "true1",
  "Tag_Off": "false1",
  "Timezone_UTC": "+5:30",
  "Event_Start_date": "2024-01-05",
  "Event_Start_time": "17:00:00",
  "Event_Stop_date": "2024-01-05",
  "Event_Stop_time": "17:30:00",
  "Flag": "start",
  "Region": "your-region",
  "Comments": "XXXX",
  "Hosts": ["Test"]
}

Getting Started

To use Tag Automation, follow these steps:

  • Define Variables: Declare variables in the variables.tf file, which will be used for Lambda function execution. Variables include:

    • s3storage: S3 bucket to store the JSON file. #Should be Unique
    • lambdaname: Lambda function name.
    • iamrole: IAM role name.
    • regionname: AWS region for deployment.
    • account: AWS account ID.
  • Upload JSON Configuration: Upload the JSON configuration file to the specified S3 bucket.

  • Trigger Lambda Function: Lambda function is triggered automatically by S3 upload.

  • Scheduler Creation: The Lambda function creates schedulers based on the JSON configuration.

  • Cleanup Schedulers: Cleanup schedulers are created to delete all scheduled events one hour after the specified stop time.

Variables in Lambda Function which needs to be declared if deploying manually

  • s3storage: S3 bucket to store the JSON file.
  • lambdaname: Lambda function name.
  • iamrole: IAM role name.
  • regionname: AWS region for deployment.
  • account: AWS account ID.

aws_tag_automation's People

Contributors

prasanlakhani avatar

Watchers

 avatar

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.