Continuous AWS Security Assessments with Prowler and Security Hub

Scenario

Your assignment: You’ve been tasked with regularly scanning your organization’s AWS accounts to make sure they are following security best practices, prepared for thorough audits, and that they have continuous monitoring. Your organization wants you to use AWS-native solutions whenever possible, but you can also use open source software if it will provide additional benefits.

Your solution: Enabling Prowler to run serverless on a regular basis through CodeBuild, then storing results in S3 and pushing findings to Security Hub.

Solution Diagram
Solution Diagram1. Enable Prowler integration in Security Hub to accept findings. 2. Configure Prowler to run in CodeBuild. 3. Prowler executes. 4. Prowler stores results in S3. 5. Prowler sends findings to Security Hub. 6. View the findings and address them in the Security Hub dashboard. 7. Repeat on a regular schedule. Prowler branches to S3 reports and Security Hub findings. EventBridge Scheduler returns to CodeBuild. Optional: set up QuickSight Visualizations.AWS · Account 111Security Hub · integrationCodeBuild · ProwlerAmazon S3 · reportsSecurity Hub · findingsEventBridge Scheduler · repeat1Enable Prowlerintegration in SecurityHub to accept findings2Configure Prowler to runin CodeBuild3Prowler executes4Prowler stores resultsin S35Prowler sends findingsto Security Hub6View the findings andaddress them in theSecurity Hub dashboard7Repeat on a regularscheduleSecurity HubCodeBuild runs ProwlerProwlerbuildspec.ymlversion: 0.2phases: install: runtime-versions: python: 3.11 commands: - echo "Installing Prowler and dependencies..." - pip3 install prowler - prowler -v build: commands: - echo "Running a single account scan." - echo "Running Prowler as prowler $PROWLER_OPTIONS --role arn:$AWS_PARTITION:iam::$AWS_ACCOUNT_ID:role/service-role/$PROWLER_ROLE" - prowler $PROWLER_OPTIONS || true post_build: commands: - echo "Uploading reports to S3..."Amazon S3Security HubFindings by calculated severity:CRITICALHIGHMEDIUMLOWINFOEventBridge SchedulerRepeat scansRun x number ofscans in y periodof timeOriginal QuickSight visualization exampleOptionalSet up QuickSightVisualizations
Solution Diagram

Drag the background to pan. Use the controls to zoom or fit the full diagram. Press Escape to close.

Use this cheat sheet with AI

Copy a ready-to-use prompt into your preferred AI assistant.

Preview prompt