python - AWS Lambda function with lots of scheduled events -


i’ve created dynamodb table populated hostnames want ping using aws lambda. every time new entry added dynamodb table, want new scheduled job added lambda function specified hostname. example, if have 100 hostnames in dynamodb table, have 100 scheduled jobs @ various intervals executing lambda function. there way execute this?

aws lambda functions can triggered many different event sources, including direct invocation via api call , schedule within amazon cloudwatch events.

it appears goal is:

  • at regular time period
  • for each entry in given dynamodb table
  • execute lambda function

rather creating 100 schedules 100 entries, create single entry:

  • when schedule fires...
  • run lambda function reads table
  • for each entry in table, call new lambda function, passing in desired hostname retrieved database

this way, require one schedule automatically fire off other tasks based upon number of entries in database table.

please note there default limit of 100 concurrent lambda functions. so, if function takes 0.5 seconds run, 200 functions run per second.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -