I am currently working on my lambda function (Python) which is triggered using cron expression in CloudWatch Events.
I want to pass some data to the function (ideally in the form of a dictionary) and those values can then be used inside the lambda_handler to do calculations based on the custom input parameters.
I did some research and there are methods using the API gateway but I do not have the liberty to use the API gateway.
Is there a way I can pass custom input parameters to my function?
I am new to AWS Lambda so this question might seem silly to veterans.
Thanks in advance
Edit 1: After trying out the solution provided in the first answer I faced come other issues.
Here's the snippet from the lambda function where im trying to push input data into Postgres database:
s={'upload_date': today,'data':'Test Data','Remark':event["data"]}
log_success = pd.DataFrame(data = [s])
log_success.to_sql(log_table, con, schema = "some_existing_schema", if_exists = "append",index = False, method = "multi")
ERROR:
[ERROR] KeyError: 'data' Traceback (most recent call last): File "/var/task/test.py", line 38, in lambda_handler s={'upload_date': today,''data':'Test Data','Remark':event["data"]}

