Skip to content

mel-cdn/serverless-python-strawberry-graphql-aws-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Serverless Python GraphQL on AWS Lambda

πŸ“– Overview

This repository demonstrates deploying a Strawberry GraphQL application to AWS Lambda using serverless architecture.

✨ Highlights

  • Strawberry GraphQL Python GraphQL application
  • AWS Amazon Web Services (AWS)

πŸš€ Getting Started

Prerequisites

Ensure the following tools are installed:


Installation

On your terminal, run the following commands:

# Clone repository
git clone git@github.com:mel-cdn/serverless-python-strawberry-graphql-aws-lambda.git
cd serverless-python-strawberry-graphql-aws-lambda

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r src/requirements.txt

# Run locally
./run-local-service.sh

# Access on your browser
http://localhost:8000/

🌍 Deployment

Using AWS SAM

# Verify SAM installation
sam --version

# Export your AWS profile
export AWS_PROFILE="your-aws-profile-name"

# Build
sam build

# Deploy
sam deploy --guided

# Check the deployed API
aws apigatewayv2 get-apis
{
  ...,
  "ApiEndpoint": "https://<your-api-id>.execute-api.ap-southeast-1.amazonaws.com",
  ...,
}

About

This repository demonstrates deploying a Strawberry GraphQL application to AWS Lambda using serverless architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published