AWS, Cloud Computing

5 Mins Read

Automating Cloud Security Vulnerability Assessment and Alerts with Amazon Bedrock

Voiced by Amazon Polly

Introduction

As cloud technologies advance at an unprecedented rate, organizations are integrating advanced solutions to enhance their operations and serve their customers better. Often, enterprises rely on traditional, reactive security measures, which may not be enough to protect against vulnerabilities and attacks from third-party sources.

This blog explores how to automate security vulnerability assessments and alerting within your cloud environment using Amazon GuardDuty, Amazon Bedrock, and other AWS serverless technologies. By implementing proactive monitoring, businesses can detect security risks before they escalate and receive timely alerts with actionable recommendations. Organizations can create a more resilient and secure cloud infrastructure through this approach.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Solution Overview

AD

Solution benefits

  • The user-friendly omnichannel support system delivers a complete real-time overview of your cloud security status.
  • Leverage generative AI to dive deep into specific security alerts and vulnerabilities, enabling you to prioritize and respond efficiently.
  • Receive detailed reports with actionable recommendations, allowing you to address issues before they escalate.

Prerequisites

  1. Enable Amazon GuardDuty to generate security findings in your account.
  2. Grant least-privilege AWS IAM permissions for AWS resources such as AWS Step Functions and AWS Lambda to execute the required actions:
  • The AWS IAM role for AWS Step Functions must have policies to invoke the Lambda function and publish messages on the Amazon SNS topic.
  • AWS Lambda function requires the AWSLambdaBasic ExecutionRole to log data and the bedrock:InvokeModel permission.
  • Modify the Amazon SNS topic access policy to restrict publishing to AWS Step Functions only.
  1. Request access to the Anthropic Claude 3 model on Amazon Bedrock.
  2. Enable server-side encryption for the Amazon SNS topic to ensure encrypted message delivery.

Deploy the solution

  1. On the Amazon EventBridge console, create a new rule for Amazon GuardDuty findings notifications.

step1

  1. In the AWS Lambda console, create an AWS Lambda function that accepts the findings as input and invokes the Amazon Bedrock API to retrieve summaries and mitigation steps from the Anthropic Claude 3 model. The following function uses three configuration parameters:
  • modelId is set as claude-3-sonnet-20240229-v1:0
  • findingDetailType is set as GuardDuty finding to filter the payload
  • source is set as guardduty to only evaluate GuardDuty findings

AWS Lambda Code:

It is essential to apply prompt engineering and adhere to best prompting practices to prevent hallucinations or incoherent responses from the LLM. In our solution, we designed the following prompt to generate responses using the Anthropic Claude 3 Sonnet:

 

Prompt = “You are an expert in troubleshooting AWS logs and sharing details with the user via an email draft as stated in <description>. Do NOT provide any preamble. Draft a professional email summary of details as stated in description. Write the recipient as – User in the email and sender in the email should be listed as – Your Friendly Troubleshooter. Skip the preamble and directly start with subject. Also, provide detailed troubleshooting steps in the email draft.” + “<description>” + description + “</description>“

3. On the Amazon SNS console, create an SNS topic to send notifications and add the emails of the subscribers.

step3

4. Create a new state machine on the AWS Step Functions console and add the AWS Lambda and Amazon SNS optimized integration.

You must grant AWS IAM permissions to the AWS Step Functions role to allow it to invoke AWS Lambda and Amazon SNS.

step4

The below code shows how to use the AWS Step Functions optimized integration with AWS Lambda and Amazon SNS:

step4b

5. In the Amazon EventBridge console, set the AWS Step Functions state machine as the target for the previously created EventBridge rule.

step5

Test the solution:

Test the configuration by creating sample findings in the Amazon GuardDuty console. The test emails will be triggered based on the volume of the generated findings.

test

The following screenshot shows an email from Amazon SNS regarding a potential security risk in an Amazon Elastic Container Service (Amazon ECS) cluster based on a sample generation. The email includes a summary of the vulnerability and several mitigation steps to address the issue.

test2

The screenshot below is a sample email notification about a potential Bitcoin IP address communication.

test3

Conclusion

In conclusion, this proactive approach allows users to take swift action and address vulnerabilities before they escalate, significantly reducing the risk of data breaches or security incidents. It helps maintain a secure environment within AWS accounts while promoting a culture of proactive security awareness and responsibility.

With clear, actionable recommendations, users can quickly implement necessary fixes, ensuring no issues are overlooked or lost in the system. This proactive security model strengthens the overall security posture of AWS environments and encourages efficient collaboration and accountability within the organization, leading to a more secure and responsive infrastructure.

Drop a query if you have any questions regarding Amazon Bedrock and we will get back to you quickly.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFront and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.

FAQs

1. What role does Amazon Bedrock play in security assessments?

ANS: – Amazon Bedrock integrates with the Anthropic Claude 3 Sonnet model to process security findings, generating concise summaries and providing actionable troubleshooting steps. This helps organizations prioritize and address security vulnerabilities proactively.

2. How does Amazon EventBridge facilitate the solution?

ANS: – Amazon EventBridge is a central event bus that captures GuardDuty findings and routes them to AWS Step Functions. This triggers AWS Lambda functions to process the findings and sends notifications through Amazon SNS, enabling automated responses to security risks.

WRITTEN BY Aayushi Khandelwal

Aayushi, a dedicated Research Associate pursuing a Bachelor's degree in Computer Science, is passionate about technology and cloud computing. Her fascination with cloud technology led her to a career in AWS Consulting, where she finds satisfaction in helping clients overcome challenges and optimize their cloud infrastructure. Committed to continuous learning, Aayushi stays updated with evolving AWS technologies, aiming to impact the field significantly and contribute to the success of businesses leveraging AWS services.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!