From the course: Cloud Native Projects: AWS Serverless
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Solution: Python - Amazon Web Services (AWS) Tutorial
From the course: Cloud Native Projects: AWS Serverless
Solution: Python
(electronic jingle) - [Instructor] And now it's time for me to show you my solution to this challenge exercise. Now I am going to walk you through the actual uploading steps that I took when I actually tested this program so that you can match it to what you did. So you'll see at this point, I have deleted the Python module that I created, and I just have that original demo version and that's on purpose. Again, I want to show you what goes on, and you cannot actually create a module, again, that's already been created. Okay, so here's how I implemented my Python function. I imported json and randon, I created the actual handler. I set the count equal to the event count. I set heads equal to zero and then tails equal to zero. Then I went through a range function, just another for loop within Python and I created a random integer with zero or one as my seed values, and then I flipped. So if I flipped it and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.