alexcasalboni / aws-lambda-power-tuning

AWS Lambda Power Tuning is an open-source tool that can help you visualize and fine-tune the memory/power configuration of Lambda functions. It runs in your own AWS account - powered by AWS Step Functions - and it supports three optimization strategies: cost, speed, and balanced.
Apache License 2.0
5.29k stars 363 forks source link

Terraform deployment #155

Closed andybkay closed 2 years ago

andybkay commented 2 years ago

Hi, while not an issue, I noticed all of the deployment methods are AWS services based. I've created a fork with a terraform deployment method, would this be something you'd be interested in me creating a pull request for?

alexcasalboni commented 2 years ago

Hi @andybkay 👋 Thanks, that'd be awesome 🙏

Unfortunately I'm not a Terraform expert (yet). How would that be different from this approach?

I assume you've converted the SAM/CloudFormation template to a "real" Terraform module? (including all the resources, input parameters, conditions, etc.)

From a user's point of view, what's the advantage wrt the SAR-based approach above?

andybkay commented 2 years ago

Hi Alex,

The approach mentioned still uses CloudFormation. My client required that it use terraform to create the resources directly.

Your assumptions are correct yes, I deconstructed the CloudFormation template and rewrote it in terraform.

The difference from a users point of view is that it bypasses CF altogether. Which some people may prefer.

I need to do a little cleaning up, then I'll create the merge request.

alexcasalboni commented 2 years ago

That makes sense. Thank you, @andybkay!

I'm more than happy to include a Terraform-native deployment alternative.

The only downside I see is that we'll need to keep it up to date with the CloudFormation template, whenever there is a relevant architectural/deployment change. Is there some kind of versioning mechanism in Terraform modules so we can keep it aligned with SAR versions?

andybkay commented 2 years ago

While that's possible, it'd be git that'd handle the versioning, not the terraform module itself. Is there a notification method for changes to particular files in github? I'd be happy to actively support the module.

alexcasalboni commented 2 years ago

Of course, we'll let git handle the versioning 👍

I was referring to the semantic versioning of the app itself 😄 The current version is 4.2.0 (check out the SAM template). Since the two templates might get out of sync (for a few days/weeks?), I liked the idea of explicitly assigning a semantic version to both.

I don't think there is a way to be notified of specific file updates, but I'd be glad to notify you (or simply open a new issue) whenever a Terraform update is required. Would that work?

andybkay commented 2 years ago

That works for me yes 👍 I'll get the module finalised and create a pull request this week hopefully.

alexcasalboni commented 2 years ago

Awesome 🚀