Skip to content

sebastianczech/terraform-aws-free-serverless-modules

Repository files navigation

Terraform modules for provisioning free serverless resource in AWS cloud

Available Features

Currently below AWS services & resources are supported:

  • Lambda with:
    • CloudWatch log group
    • IAM roles and policies
  • DynamoDB
  • SQS queue
  • SNS topic

Prerequisites

  1. Install tools:
  2. Authenticate with IAM user credentials

Usage

  1. Initialize Terraform:
cd examples/basic
terraform init
  1. Prepare file with variables values:
cp example.tfvars terraform.tfvars
vi terraform.tfvars
  1. Apply code for infrastructure:
terraform apply
  1. Execute Lambda:
awscurl --service lambda --region us-east-1 --header 'Content-Type: application/json' --header 'Accept: application/json' --data '{"message": "example_post", "key": "118", "transport": "mail"}' "$(terraform output -raw lambda_url_producer)"

Links