Skip to content

✅ GitHub JavaScript Action - Scan for the AWS Services (Lambda / Lambda Layer / Glue / State Machine) used in the repository.

License

Notifications You must be signed in to change notification settings

subhamay-bhattacharyya-gha/scan-aws-services-action

Repository files navigation

Scan AWS Services Action

Commit Activity Last Commit Release Date Repo Size File Count Issues Top Language Commit Activity Monthly Custom Endpoint

📦 Overview

This GitHub Action scans your repository to detect whether specific AWS services are being used. It checks for code or configuration files commonly associated with:

  • AWS Lambda (Python, JavaScript, TypeScript)
  • AWS Glue (Python)
  • Step Functions (ASL JSON)
  • Lambda Layers (Python, JavaScript, TypeScript)

Use this in CI workflows to inform deployment steps, enforce compliance, or audit infrastructure.


✅ Features

  • Detects Lambda code in lambda/src
  • Detects Glue scripts in glue/script
  • Detects Step Functions definitions in state-machine
  • Scans python-layer for Lambda Layer languages
  • Outputs structured JSON with all detected services

📤 Outputs

Name Description
services-used JSON object showing which AWS services were found

Example Output

{
  "lambda-python": true,
  "lambda-js": false,
  "lambda-ts": true,
  "glue-python": true,
  "state-machine": false,
  "python-layer-python": false,
  "python-layer-js": false,
  "python-layer-ts": true
}

🚀 Example Usage

name: Detect AWS Services

on:
  push:
    branches: [main]

jobs:
  detect-services:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Scan AWS Services
        id: scan
        uses: subhamay-bhattacharyya-gha/scan-aws-services-action@main

      - name: Print Output
        run: echo "Detected Services: ${{ steps.scan.outputs.services-used }}"

🛠 Local Development

To test or develop this action locally:

  1. Clone the repo
  2. Run node main.js from the project root
  3. Ensure the expected folders (lambda/src, glue/script, etc.) exist for testing
  4. Review the console output for service detection results

You can also test it inside a GitHub workflow by referencing the action locally:

- name: Test Local Action
  uses: ./  # Use local path for testing

🤝 Contributing

We welcome contributions! You can help by:

  • Reporting bugs
  • Suggesting features
  • Writing docs
  • Submitting PRs

Check out the CONTRIBUTING.md guide to get started. Please also read our Code of Conduct.


🕘 Version History

See CHANGELOG.md for release notes.

Latest versions:

  • v1.0.1: Added pre-commit hooks
  • v1.0.0: Initial release

📄 License

This project is licensed under the MIT License. See LICENSE for details.

About

✅ GitHub JavaScript Action - Scan for the AWS Services (Lambda / Lambda Layer / Glue / State Machine) used in the repository.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published