1

I want to make a GET call to a specific endpoint in my Lambda, every 12 hours.

What AWS service can I use for that?

I have tried Amazon EventBridge, however, I cannot find a way to call a specific endpoint in my lambda (is there a way?).

I have also tried Route53 Health Check (where I can specify an endpoint and that's great), but, the call intervals cannot be set to 12 hours, plus, I need to provide 3 health checker regions (I only need 1).

Any ideas?

1 Answer 1

1

One way this can be done in AWS is by following these steps.

  1. Create your target Lambda Function. Lets call it Lambda1.

  2. Setup an API Gateway endpoint that is configured as a GET that invokes Lambda1. Now Lamba1 can be invoked using a GET request. If you do not know how to setup an API Gateway, see the instructions in this doc. See the topic Configure Amazon API Gateway to invoke the Lambda function: https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javav2/usecases/creating_lambda_apigateway

  3. Now you can invoke the Lambda by sending a GET request. I would look at creating a second Lambda function that sends a GET Request to invoke Lambda1. You can schedule this using CRON expressions every 12 hours. In your Lambda app logic, you can process the data returned by Lambda1 to meet your business requirements.

UPDATE You can invoke the 2nd Lambda that invokes Lambda1 by configuring a CRON Expression. For information how to do this -- see:

Creating scheduled events to invoke Lambda functions

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you. The problem still remains though... what AWS system do I use to call the second Lambda every 12 hours?
See update for more info

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.