#!/bin/bash # Check if AWS CLI is installed if ! command -v aws &> /dev/null then echo "AWS CLI not found. Please install and configure the AWS CLI." exit 1 fi # List all CodeBuild projects echo "Fetching list of CodeBuild projects..." projects=$(aws codebuild list-projects --query "projects" --output text) if [ -z "$projects" ]; then echo "No CodeBuild projects found." exit 0 fi # Display the project names echo "CodeBuild Projects:" for project in $projects; do echo "- $project" done