Ends in
00
days
00
hrs
00
mins
00
secs
ENROLL NOW

🎁 Get 20% Off - Christmas Big Sale on All Practice Exams, Video Courses, and eBooks!

Securing LLMs with Guardrails for Amazon Bedrock

Home » AWS » Securing LLMs with Guardrails for Amazon Bedrock

Securing LLMs with Guardrails for Amazon Bedrock

One of the pillars of the AWS Well-Architected Framework is security. It is a foundational concept when running your workloads in the cloud to think about privacy, access limits, compliance with regulatory requirements, and data protection; and this includes Amazon Bedrock.

Along with several AI announcements during the keynote of AWS CEO, Adam Selipsky during AWS re:Invent 2023 was Guardrails for Amazon Bedrock. As AI technology evolves and becomes more mature, it makes sense to also reinvent the way usage is handled by security safeguards. Guardrails for Amazon Bedrock allow security policies to be applied across foundational models, to fulfill application requirements and implement responsible AI policies.

Securing LLMs with Guardrails for Amazon Bedrock

Responsible AI in Amazon Bedrock

Generative AI is one of the technologies that has seen accelerated growth in the past few years. More and more companies are utilizing its capabilities for various use cases and are driving research and innovation. This adoption increases the potential for misuse. 

Responsible AI is a concept that was brought about by the exploration of opportunities for AI applications while maintaining accountability and governance to its ethical use. There is more and more responsibility to define guidelines and comply with regulations.

Securing LLMs with Guardrails for Amazon Bedrock

Amazon Bedrock has always been secure. It keeps data secure in private with various promises: none of the customer’s data is used to train an underlying model, all data is encrypted whether in transit or at rest, data remains within your VPC, and supports compliance standards including GDPR and HIPAA.

Guardrails are high-level rules that provide governance for your AWS environment and have been available for some time in other AWS services, including AWS Control Tower and Amazon SageMaker. To further support security and the responsible AI concept, Guardrails for Amazon Bedrock has also recently been added. Guardrails for Amazon Bedrock put limits to the information the large language models (LLMs) can return, including fine-tuned ones.

Creating a Guardrail

Tutorials dojo strip

The Guardrails feature is currently in Preview mode and may not be available on all AWS accounts yet. It should be accessible under a new section, Safeguards, in the management console.

Securing LLMs with Guardrails for Amazon Bedrock

Creating a guardrail will open a wizard that will allow the user to configure safeguards for Amazon Bedrock.

Securing LLMs with Guardrails for Amazon Bedrock

Key features of Guardrails for Amazon Bedrock where policies can be defined are listed below:

Denied Topics

You can implement policies to restrictions on topics by adding to a denied list. Using natural language description, you can define the prohibited topics within an application. You can also provide example phrases (up to 5 per topic) to further classify the denied topic. This will classify an input or a response as restricted and provide predefined responses if it passes the Guardrail check.

Securing LLMs with Guardrails for Amazon Bedrock

Implement Content Filters

Content filters can be turned on for both prompts and responses. You can configure thresholds (none, low, medium, high) to content filters for various categories (hate, insults, sexual, and violence).

Securing LLMs with Guardrails for Amazon Bedrock

Define Blocked Messaging

Guardrails for Amazon Bedrock also allows pre-defined messaging for both prompts and responses. This will allow the user to create canned responses specific to your application.

Securing LLMs with Guardrails for Amazon Bedrock

Redact PII for User Privacy (coming soon)

Guardrails for Amazon Bedrock allow detection of Personally Identifiable Information (PII) in prompts and responses and can be rejected (from inputs) or redacted (from responses). This feature allows companies to easily apply governance to the usage of AI in terms of limiting data exposure.

Final Notes

The work being done on securing AI technology is becoming more and more important as it continues to develop. Always be reminded about the foundations of system architecture and how security is one of the pillars to keep in mind for every project. Amazon Bedrock Guardrails is currently released in limited preview and may not be available in all AWS accounts yet.

References:

AWS re:Invent 2023 – CEO Keynote with Adam Selipsky

https://aws.amazon.com/machine-learning/responsible-ai/policy/

https://aws.amazon.com/blogs/aws/guardrails-for-amazon-bedrock-helps-implement-safeguards-customized-to-your-use-cases-and-responsible-ai-policies-preview/

Get 20% Off – Christmas Big Sale on All Practice Exams, Video Courses, and eBooks!

Tutorials Dojo portal

Learn AWS with our PlayCloud Hands-On Labs

Tutorials Dojo Exam Study Guide eBooks

tutorials dojo study guide eBook

FREE AWS Exam Readiness Digital Courses

FREE AWS, Azure, GCP Practice Test Samplers

Subscribe to our YouTube Channel

Tutorials Dojo YouTube Channel

Follow Us On Linkedin

Recent Posts

Written by: Kaye Alvarado

Kaye is a DevOps Engineer and the offshore lead of the API and Integration Management Team at Asurion. She is an AWS Community Builder, and a core member of AWSUG BuildHers+. She holds multiple AWS certifications, and volunteers to mentor others on DevOps skills training, and certification review sessions both inside and outside the company. On her free time, she creates comic strips about funny encounters in IT titled GIRLWHOCODES.

AWS, Azure, and GCP Certifications are consistently among the top-paying IT certifications in the world, considering that most companies have now shifted to the cloud. Earn over $150,000 per year with an AWS, Azure, or GCP certification!

Follow us on LinkedIn, YouTube, Facebook, or join our Slack study group. More importantly, answer as many practice exams as you can to help increase your chances of passing your certification exams on your first try!

View Our AWS, Azure, and GCP Exam Reviewers Check out our FREE courses

Our Community

~98%
passing rate
Around 95-98% of our students pass the AWS Certification exams after training with our courses.
200k+
students
Over 200k enrollees choose Tutorials Dojo in preparing for their AWS Certification exams.
~4.8
ratings
Our courses are highly rated by our enrollees from all over the world.

What our students say about us?