Okay, time to talk about Terraform.
You've manually deployed a Lambda. It worked, but it was a lot of clicking, copying, and pasting. That doesn't scale.
Terraform fixes this.
Terraform is a tool that lets you describe your infrastructure in code.
You write files like this:
resource "aws_lambda_function" "my_function" {
function_name = "my-ruby-lambda"
...
}
Then you run terraform apply, and Terraform talks to AWS on your behalf to create the Lambda function automatically.
You can:
Think of it like writing a Rails migration, but for your AWS infrastructure.
Here's the workflow:
.tf files to describe what you want.terraform init (once) to set up Terraform.terraform plan to see what it would do.terraform apply to actually make the changes.Behind the scenes:
aws) to talk to cloud APIs