Fortune Teller Using AWS Lambda

Fortune Teller Using AWS Lambda

1. Access the AWS Management Console and sign in using your credentials

2. Navigate to the Lambda service using the search bar.

3.Create a lambda function with the below configurations

Article content

4. Now lambda function is created.

5. Configure a test event.

6. Test the sample lambda function using the test event created.

7. Now replace the sample lambda function code with the below python code

Article content

 

8.Deploy the new python code and test the code.

9.On testing the new python code, you should get the status code 200.

10. Now navigate to AWS Amazon API Gateway.

11.Choose an API type i.e HTTP API. And click on build of HTTP API.

12.Configure the API with the following details

Article content


Article content


Article content


Article content


Article content


Article content

13. Now click on create.

14.The API Gateway with required configurations is created successfully.

15.Configure the integrations as the following.

Article content


Article content

16.Create the parameter mapping as below

Article content



Article content


17. Now create the parameter mapping.

Article content

18.Navigate to API gateway that is created.

19. Click on invoke URL.

20. You get the below screen.

Article content

21.Try posing the questions in the navigation as shown

Article content

22. You get the values “yes”, ”no”, ”maybe”.

23. You can change questions in the URL to get different answers.

Article content

Thus, the Fortune Teller is created to provide varied responses to different questions posed.



To view or add a comment, sign in

More articles by Madhuri Tadepalli

Explore content categories