Skip to content

eleva/serverless-weather-strands-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧵 Serverless Weather Strands Agent

This is a simple serverless agent that uses weather and location APIs to get the weather information for a given location. It is built with Strands Agents SDK using http_request tool and AWS Bedrock with Amazon Nova Micro model integration.

⚙️ Prerequisites

⚙️ Setup

Run the following commands to set up the project:

npm install

🧪 Test the function locally

Use the Serverless Framework to invoke the function locally. You can use the --data flag to pass a JSON object with the prompt field containing your query.

sls invoke local -f weather --data '{"prompt": "What is the weather in Seattle?"}'

You can also use the region field (with option "US" or "IT") to specify the region for the weather query:

sls invoke local -f weather --data '{"prompt": "What is the weather in Pavia?", "region": "IT"}'

🚀 Deploy on AWS

Make sure you have configured your AWS credentials and have the necessary permissions to deploy Lambda functions.

You can read more about configuring AWS credentials in the AWS CLI documentation or use the aws configure command to set them up interactively.

You can also use serverless framework to set up your AWS credentials by running:

sls config credentials --provider aws --key YOUR_AWS_ACCESS_KEY_ID --secret YOUR_AWS_SECRET_ACCESS_KEY

Then, run the following command to deploy the function to AWS:

sls deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages