Description
I made this post is to summarize my learning about security set up Foundational Models of AWS Bedrock. I was living almost one month before where i started thinking in security in AI so now i am training for AIF-CO1 certification. I was surprise about guardrails so i decided to make an experiment to filter gender bias.

Well some phrases can be tricky like:
Emotional & Behavioral Stereotypes:
- “X are too emotional and dramatic.”
- “X are passive and submissive.”
- “X is too aggressive/bossy for a Y(she/he).”
Requirements
- AWS account.
- AWS User Bedrock.
- AWS policies for guardrails and Bedrock. link how to set up: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-examples.html
Steps
- Choose a model and try it in the Open Playground. In my case i am using meta.llama3-8b-instruct-v1:0.
Amazon Bedrock > Model Catalog > Llama 3 8B Instruct
Then you will see the chat which you can interact

- Then, create a script to test the model to check the correct access with the user.
|
|

- Add the guardrails in the model invocation.
|
|
note: i am using the function converse.

Conclusion
Take your time when implementing LLMs, as there can be pitfalls. It’s important to set them up securely to ensure others can use them safely.
Tip I wasted my tome to invoke my Guardrail becausde it has the default version 1 so i had to create a version of my guardrail.
IMPORTANT
I’m currently focused on my studies while actively looking for job opportunities to apply my skills and gain experience. 🥺
Offtopic
Lastly, if you have a dog, please remember to take good care of them.🐶