How can I run a quick script in AWS Lambda without the hassle?

0
11
Asked By CraftyNinja42 On

I'm working in a secured environment where my CI/CD can't test the infrastructure we deploy. I know that deploying a Lambda function or using AWS Synthetics are options, but they feel way too complicated and slow for what I need! Is there a way to run a "one-off" script in Lambda similar to how you might use npx or uxv? Something that can set itself up and tear itself down afterwards?

4 Answers

Answered By DevGuru88 On

What exactly are you trying to test? If it's about checking interactions with AWS APIs, regular development environments should do the trick. But if you need to see how your Lambda performs with specific inputs and outputs, regular unit testing might be best. Or, if you're okay with it, LocalStack can simulate a VPC for you too.

Answered By CodeWizard77 On

Are you possibly looking for Lambda layers? They can help with managing dependencies more easily if you're running scripts in Lambda.

Answered By LambdaLover22 On

Aren't Lambdas pretty much what you're describing? They're designed for running one-off scripts whenever you need to, setting up and tearing down automatically. You could just run a Python script directly in Lambda, and it’s one of the most flexible approaches!

Answered By ScriptSorcerer99 On

You might want to check out LocalStack. It lets you emulate AWS services locally, so you won’t have to actually deploy any Lambdas to test your scripts.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.