Chapter 14

Ten Ways to Create AWS Applications Quickly

IN THIS CHAPTER

check Using the console and sample code

check Learning from videos and webinars

check Solving problems through alternative sources

It’s deadline time and you’ve been struggling to complete your AWS application before the boss arrives to make life interesting. Fortunately, you have this chapter to help you work faster (beating the deadline so that you can just smile as the boss walks by). Of course, you didn’t have to get so close to the deadline in the first place. By using these techniques, you can make AWS application development faster and easier.

Working at the Console

The GUI is slow, the GUI is cumbersome, the GUI is for someone else — someone less experienced with computers than you. Of course, you can keep telling yourself these less-than-truthful memes or you can come to the decision that the GUI really can help you understand AWS better. Sometimes, the fastest way to determine how to perform a task using the Command Line Interface (CLI) or within a program is to determine how the console does it. The console can show you the process that AWS prefers when performing certain tasks. In many cases, going through the process and keeping notes can help you write applications that work much faster than a trial-and-error approach.

Another reason to use the console is to determine what values AWS actually wants. Many of the examples in this book have you go to the console to obtain a required value. For example, trying to find the Amazon Resource Number (ARN) for an object can prove nearly impossible when using CLI or code, but finding it in the console is usually quite easy. Rather than spend an afternoon fiddling with code to retrieve an ARN, you can simply hard code it while working through the specifics of the application. Later you can work through the code required to obtain the ARN you need.

remember The console also provides monitoring, which is possibly the most important of the developer tools it provides. Monitoring can help you detect issues such as code that takes too long to execute. However, monitoring is important because it also tells you when your code isn’t at fault. When developing applications for the cloud, you need to remember that you have an Internet connection to consider, along with AWS. In fact, you have a wealth of failure points to consider that have nothing to do with your code. So instead of spending hours looking for a problem that doesn’t actually exist, you can spend time monitoring the application to determine the true origin of the problem.

Using Example Source Code

Most developers spend a great deal of time looking at other people’s code. It’s sort of like viewing your neighbor’s sheet during a test in school, except this kind of cheating is perfectly legal. In fact, it’s encouraged. Here are a few places you might want to try when looking for an example that completely squashes that problem you’re having:

tip You can also find other sources of example code. For example, places such as SitePoint (https://www.sitepoint.com/) provide interesting articles that include a wealth of example sources you can use. In addition, Amazon provides some living examples, through which you can try the example code using a form and then seeing the underlying source. One such example is the S3 demonstration at https://s3.amazonaws.com/doc/s3-example-code/post/post_sample.html. The biggest problem with the Amazon examples is that you can find them everywhere. You might remember seeing an example at some point, but it’s nearly impossible to determine just where unless you actually remember that it did appear somewhere in the documentation.

Don’t forget to check the documentation for any SDKs or add-on libraries you use. For example, Python developers will definitely want to check the Boto3 documentation at https://boto3.readthedocs.io/en/latest/. These sites often contain separate example application sections that you can use to get started faster.

Combining Trial-and-Error Techniques

This book shows you at least three different ways to accomplish most tasks. It might seem like overkill at first, but sometimes working with AWS doesn’t sink in by using only one technique. The three most common techniques you should use to perform trial-and-error methods when discovering a new way to interact with AWS are

  • Use the consoles
  • Use the CLI
  • Use your own application code

It isn’t random chance that this book relies on Anaconda to perform most programmatic tasks. The combination of Python and Anaconda Notebooks provides an exceptionally friendly environment in which to write code and see what happens. Because the feedback is instantaneous and you can work in a piecemeal fashion, the Notebook environment gives you immediate and detailed feedback. You don’t have to keep going through the write ⇒ debug ⇒ run cycle with Python — you just write code and execute it.

Watching the Videos

Watching a video and then practicing what the video shows you offers you two methods of learning that have nothing to do with the usual trial-and-error coding techniques. A change of pace can help you discover that nuanced technique that you completely missed by using other methods. Every developer has had the experience of someone else checking code to find a really obvious error that the developer should have seen but didn’t. Videos work the same way, giving you a different perspective on the whole configuration and coding process so that an obvious error actually does become obvious.

Videos can also provide a needed break and a change of pace. It’s hardly surprising when you continue to attack a problem using precisely the same methods and continue to fail. There is likely nothing wrong with the method, but you become tired and stop thinking through the process correctly. You need a different viewpoint. With this in mind, here are some places to look for AWS videos that help you get a fresh start on that problem you’re currently trying to solve:

remember You can also find sites that list video collections. For example, you can find an article on the top 100 Amazon videos (at least in the opinion of the author) on the RoboPsychology site at http://meta-guide.com/videography/100-best-amazon-aws-tutorial-videos. The most useful aspect of these articles is that they often supply clues as to the quality and content of the videos so that you don’t have to wade through hundreds of videos to find the one you need.

Attending the Webinars

Webinars involve attending a short course without actually going anywhere. You get the kind of instruction you might get from a seminar but get to be in your usual comfortable seat and drink coffee from your own mug. For many developers, it’s pure heaven because they can replay sections of the webinar as needed and don’t suffer the discomfort of going to an unfamiliar location. Viewing a webinar can help you learn new techniques that are too complex for other sorts of learning, such as videos. Here are some places you can look for AWS webinars to meet your every need:

tip You can also find webinars from other companies online. For example, Cloud Academy (https://cloudacademy.com/webinars/) and OneLogin (https://www.onelogin.com/resources/webinars) both provide AWS-related webinars. However, these webinars require payment or a subscription. The best option is to go with the free resources first and then use the paid resources if the free resources don’t quite tell you everything you need to know.

Discovering Others Efforts

Case studies don’t necessarily provide you with that amazing bit of code you absolutely have to have to complete your application, but they can impart ideas. By the end of most days, developers have mush for brains because they’ve tried every idea — more than once — and sometimes to the point of being absurd. In fact, the last few hours of your workday might not even prove productive, except in improving your skills at Solitaire. That’s why the case studies at https://aws.amazon.com/websites/ are so important. By seeing how other developers deal with problems, you might get some insights into dealing with your own. Even in the worst-case scenario, reading about other people’s successes can help inspire you a lot more than yet another game of Solitaire will.

remember One of the most important features of these case studies is that you see block diagrams of how other developers have used AWS services to create a complete solution. The block diagrams and accompanying discussion can help you see new ways in which to use AWS to create a solution that requires less coding and maintenance to create a reliable application.

Depending on Peer Support

Anyone who works with open source products knows the benefits of using peer support to answer the tough questions. The same principle might not seem to apply to AWS, but it does. You can often get just the right answer from someone who has already been where you are now through an online peer resource. Some of the most popular places to get AWS-specific help are

warning Unfortunately, peer support also comes with a few issues. For example, you don’t really know who is on the other end of the line; it could be a troll whose only happiness is ruining your day. In addition, you can’t always trust that someone is actually from Amazon, even if the email address suggests they are. For that matter, even if they are from Amazon, you don’t know that they’re an expert in the problem that you have. The point is that you need to exercise care when using peer support. Often, the support really does work, but all it takes is one or two instances when it doesn’t to cause you considerable woe in your current development project.

Working with Blogs

Blogs can be helpful because many authors are quite knowledgeable about AWS. A blog can provide you with a process for performing a configuration or some special coding technique to use with Lambda. Blog posts can also tell you about caveats and supply fixes that Amazon sometimes buries on a page that no one visits.

warning Realize, though, that although they can be useful, blogs can also become outdated quite fast because AWS moves at the speed of light. In addition, the author might not have as much knowledge as originally thought. Don’t rely on blog posts that are more than a year or so old because AWS has likely changed in that time. In addition, read the posts carefully to see how much of the information you already know and how well it agrees with your knowledge before using the blog information to go into unknown territory. With all this in mind, here are some blogs that you might try when looking for the ultimate in setup or coding techniques:

Using Alternative Sources

You can sometimes find answers in surprising places, and it pays to look hard sometimes rather than waste days with a problem someone else has already solved. One of the alternative sources you might try is other vendor sites. For example, you can occasionally find useful information on the MSDN forums (https://social.msdn.microsoft.com/Forums/). Not long ago, a thread appeared on MSDN about running the MSDN subscription on AWS (to make accessing it everywhere easier). Odd bits of information like this can be elusive to find, so don’t limit your search to just one location; look everywhere.

Sites such as SlideShare (https://www.slideshare.net/) can also prove excellent resources. For example, when considering the previous MSDN license-hosting question, you can find information on that topic on SlideShare at https://www.slideshare.net/AmazonWebServices/leveraging-amazon-web-services-to-host-msdn-licenses. YouTube (https://www.youtube.com/) also offers a wealth of videos to check out. Some of these videos are listed at https://www.youtube.com/results?search_query=AWS. If everyone learned precisely the same way, you wouldn’t need to check out these other resources, but when you’re in a bind, looking into alternatives really does pay. Perhaps a coding example presented in the traditional way just isn’t enough to solve that horrifying problem that threatens your weekend.

Going Back to Tutorials

This book is one of your main sources of information. However, even as informative as this book is, it can’t contain absolutely every piece of information about AWS in every possible form. A lot of people rely on tutorials to fill in gaps. Even the experts do (sometimes, especially the experts). Tutorials are fast and often present information in ways that you wouldn’t otherwise consider. Of course, you have all the Amazon-specific tutorials to consider as well. Every main service page contains a listing of tutorials to try. In addition, check out the tutorials at these locations:

Amazon likely has other tutorials for you to try, but these locations give you just about everything you could ask for in the way of quick information. Of course, many third parties are also involved with AWS. Here are some of the more interesting sites to try:

tip You can also locate specific topic tutorials, and you shouldn’t discount them as you search. For example, if you really need to learn more about Convolutional Neural Networks (and who doesn’t these days?), check out the tutorial at http://cs231n.github.io/aws-tutorial/. A possibly less esoteric topic is machine learning, which you can find at https://www.analyticsvidhya.com/blog/2016/05/comprehensive-guide-ml-amazon-web-services-aws/. Some tutorials are presented as combination blog posts and tutorials presented as a series, such as the one on Node.js at https://hackernoon.com/tutorial-creating-and-managing-a-node-js-server-on-aws-part-1-d67367ac5171. The point is that you can probably find a tutorial of the right type, presented in the right way, somewhere on the Internet.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset