In my previous posts, I covered how to write tests for Lambdas, run them on LocalStack and addressed the issue I encountered while working on LocalStack. Now, in this post, I will show you how to set up a GitHub Action job to run tests on LocalStack before deploying Lambdas to production. At Qxf2, we place high importance on CI/CD, […]
Test Lambda before deployment on CI using LocalStack
LocalStack Issue: Security token included in the request is invalid
While I was engaged in creating tests for our URL Filter Lambda at Qxf2, I encountered a problem related to an invalid security token. You can access the code for our URL Filter on GitHub through the following link here. If you encounter an error message stating “The security token included in the request is invalid” while using LocalStack, it […]
Testing AWS Lambda locally using LocalStack and pytest
Testing loosely coupled microservices requires the use of diverse testing tools. Unlike monoliths, it is challenging to have a complete copy of the production system (System Under Test) for integration testing. Often, developers are hesitant to make changes in the pipeline due to uncertainty about potential downstream impacts. In such cases, it is valuable for developers to test integration components […]
Set up a CI/CD pipeline to run lambda tests using AWS cloud service emulator named LocalStack
Recently, I have explored LocalStack AWS local stack to test cloud application locally. You can test the lambda in the AWS lambda console or Moto i.e. mocking. However running tests against LocalStack, would be good as this would not incur any cost of using AWS Services. LocalStack can be used for running any AWS service locally as well as on […]