Skip to content

Token based authentication to prevent LLM misuse and denial of service attacks.

Notifications You must be signed in to change notification settings

bensonmacharia/aws-bedrock-sam-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-bedrock-sam-app

This project contains source code and supporting files for a serverless application that you can deploy with the SAM CLI. We build and deploy a Large Language Model (LLM) application on AWS Lambda, leveraging the power of AWS BedRock. We also explore the capabilities of AWS Secrets Manager in storing, retrieving, and managing secrets within AWS to allow generation of secure JWT tokens to protect the LLM API from misuse.

The application uses several AWS resources, including:-

  • Lambda functions
  • API Gateway
  • Amazon Dynamo DB
  • AWS Bedrock
  • Secrets Manager.

These resources are defined in the template.yaml file in this project.

Deploy application

To build and deploy the application for the first time, run the following commands:

$ git clone https://github.com/bensonmacharia/aws-bedrock-sam-app.git
$ cd aws-bedrock-sam-app
$ sam validate
$ sam build
$ sam deploy --guided

We need to first validate and build the source of your application. We then package and deploy the application to AWS, with a series of prompts.

Cleanup

To delete the application that you created, use the AWS CLI. Run the following:

sam delete --stack-name aws-bedrock-sam-app

Writeup

About

Token based authentication to prevent LLM misuse and denial of service attacks.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages