Skip to content

mateusschoffen/dotflow-cloud

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Lambda

Files: Dockerfile, handler.py, template.yaml, samconfig.toml

Prerequisites

  • AWS CLI configured (aws configure)
  • AWS SAM CLI (brew install aws-sam-cli)
  • Docker

Deploy

# Create ECR repository (first time only)
aws ecr create-repository --repository-name <project_name> --region us-east-1

sam build
sam deploy

SAM builds the Docker image, pushes to ECR, and creates the Lambda function.

Invoke

sam remote invoke

View logs

sam logs --stack-name <project_name> --tail

Important

  • Do not rename handler.py or the handler() function — the Dockerfile CMD is handler.handler
  • Do not rename workflow.py or the main() function — handler.py imports it
  • The samconfig.toml has the stack name, region, and ECR repository pre-configured from cookiecutter
  • To change the schedule or add triggers, edit template.yaml (see lambda-scheduled template)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%