Posts

Showing posts from May, 2016

Terraforming Amazon AWS Lambda function and related API Gateway

I've been recently working on terraforming the AWS lambda function and its related API gateway. Using terraform with AWS API gateway is fairly new at this point. If you have no idea what is AWS Lambda function, here is a quick intro: AWS Lambda  is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use  AWS Lambda  to extend other  AWS  services with custom logic, or create your own back-end services that operate at  AWS  scale, performance, and security. The Terraform code that I've come up with is look like below: resource "aws_iam_role" "test_role" { name = "test_role" count = "${var.enable_redirect-lambda}" assume_role_policy = <<POLICY { "Version" : "2012-10-17" , "Statement" : [ { "Sid" : "" , "Effect"