I am wondering if it's possible to run a cron job using AWS Lambda with input parameters.
Example:
I call my API endpoint: api.example.com/LambdaFunction5?timestamp=1571299919&someOtherVariable=NetworkBytes
As you can see, it's a get request to my API will which takes two parameters, an Epoch timestamp (1 day from now) and another parameter (can be anything). This API call will then make a con job that will be executed on the given timestamp using the other parameter as a variable in the lambda function.
How would I achieve this with AWS Lambda? I know that AWS allows me to schedule lambdas for specific times:
https://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html
But the problem is that I don't want to create a new lambda function every time I want a cron job.
Is it a way to do this so when I call my API endpoint, it will create a cron job based on the time I give and run only once and "delete" itself after that job is run, so I don't end up with a million different functions or CloudWatch rules?