Discover millions of ebooks, audiobooks, and so much more with a free trial

Only €10,99/month after trial. Cancel anytime.

AWS For Developers For Dummies
AWS For Developers For Dummies
AWS For Developers For Dummies
Ebook616 pages6 hours

AWS For Developers For Dummies

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Everything you need to get running with IaaS for Amazon Web Services

Modern businesses rely on Infrastructure-as-a-Service (IaaS)—a setup in which someone else foots the bill to create application environments—and developers are expected to know how to write both platform-specific and IaaS-supported applications. If you're a developer who writes desktop and web applications but have little-to-no experience with cloud development, this book is an essential tool in getting started in the IaaS environment with Amazon Web Services.

In Amazon Web Services For Developers For Dummies, you'll quickly and easily get up to speed on which language or platform will work best to meet a specific need, how to work with management consoles, ways you'll interact with services at the command line, how to create applications with the AWS API, and so much more.

  • Assess development options to produce the kind of result that's actually needed
  • Use the simplest approach to accomplish any given task
  • Automate tasks using something as simple as the batch processing features offered by most platforms
  • Create example applications using JavaScript, Python, and R
  • Discover how to use the XML files that appear in the management console to fine tune your configuration

Making sense of Amazon Web Services doesn't have to be as difficult as it seems—and this book shows you how.

LanguageEnglish
PublisherWiley
Release dateJul 28, 2017
ISBN9781119371892
AWS For Developers For Dummies
Author

John Paul Mueller

John Paul Mueller is a technical editor and freelance author who has written on topics ranging from database management to heads-down programming, from networking to artificial intelligence. He is the author of Start Here!™ Learn Microsoft Visual C#® 2010.

Read more from John Paul Mueller

Related to AWS For Developers For Dummies

Related ebooks

Enterprise Applications For You

View More

Reviews for AWS For Developers For Dummies

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    AWS For Developers For Dummies - John Paul Mueller

    Part 1

    Discovering the AWS Development Environment

    IN THIS PART …

    Get started with Amazon Web Services (AWS).

    Create a good AWS development environment.

    Obtain your developer key.

    Understand the AWS free tier.

    Consider the security issues.

    Chapter 1

    Starting Your AWS Adventure

    IN THIS CHAPTER

    check Exploring the AWS cloud

    check Considering Infrastructure as a Service (IaaS)

    check Defining when, why, and how to use AWS

    check Ensuring you have a supported platform

    There was a time when business development meant creating software for a single machine or for a workgroup. The client-server architecture, with its emphasis on both local and centralized servers, came next. Developers eventually started creating applications for the Internet as well, enabling people to do things like work from home without losing contact with the organization’s database. Browser-based applications actually appear on most desktops today, and you might spend much of your nondevelopment time using one.

    As development has moved onward and outward, the tools, techniques, and processes for development have changed as well. Today you deal with the cloud, where the server that holds your application doesn’t even reside on the premises. In many respects, everyone is a remote user today. Of course, organizations have a huge investment in existing hardware and software, so you’re actually more likely to find yourself working in a hybrid environment with one foot on local resources and the other on someone else’s turf. Amazon Web Services (AWS) provides you with a complete development environment, but for many developers, the changes that using AWS require are significant and awkward. This chapter helps you better understand what to expect from AWS and to feel just a little less awkward about the coming changes.

    You may also find yourself drowning in a sea of new abbreviations and acronyms. Of course, you can act like you know what all these terms mean, but they’re actually important terms, and knowing what they mean gives you an edge over everyone else. This chapter also helps you understand terms like Infrastructure as a Service (IaaS) and discover just what this new term means to you as a developer. If you already work on the Internet, you could possibly skip this part of the chapter, but if you’ve spent your career working with desktop applications or a local intranet, you definitely want to find out more.

    Developers often find that the most frustrating part of creating an application is having the right tool. Development is more than knowing the right procedures and the right function calls — it’s a matter of knowing the most efficient manner in which to use them and determining when the tools already in use won’t do the job. This chapter closes with some essential information about the platforms that AWS supports. Reading this material will help you avoid some serious trouble later because you can avoid the most serious platform issues at the outset.

    Defining the AWS Cloud

    As a developer, you need to meet end-user demands with the least amount of effort and in the quickest time. Amazon Web Services (AWS) is a huge array of services that affects consumers, small to medium-sized businesses (SMB), and enterprises. Using AWS, you can do everything from creating applications for remote access to organization data to creating a full-fledged IT department in the cloud. The installed base is immense. You can find case studies of companies like Adobe and Netflix that use AWS at https://aws.amazon.com/solutions/case-studies/. (The page also includes a link to create an account, a topic discussed in Chapter 2.) AWS use isn’t just for private companies, either — even the government makes use of its services.

    The technologies that make all these services possible are simple in conception. Think of a pair of tin cans attached to each other by a string. Amazon holds one tin can and you hold the other. By talking into one tin can, you can hear what is said at the other end. The implementation, however, relies on details that make communication harder than you might initially think. The following sections give you an overview on how the AWS cloud works.

    Understanding service-driven application architectures

    Service-driven application architectures, sometimes known as Service-Oriented Architectures (SOA), come in many forms. No matter how you view them, service-driven application architectures are extensions of the client-server technologies that you may still use when creating localized applications, in that a client makes a request that a server fulfills by performing an action or sending a response.

    The request/response implementation details have changed significantly over the years, however, making modern applications far more reliable, flexible, and less reliant on a specific network configuration. The request and response process can involve multiple levels of granularity, with the term microservice applied to the smallest request and response pairs. Developers often refer to an application that relies on a service-driven application architecture as a composite application because it exists as multiple pieces glued together to form a whole. Service-driven application architectures follow many specific patterns, but in general, they use the following sequence to perform communication tasks:

    Create a request on the client using whatever message technology the server requires.

    Package the request, adding security or other information as needed.

    Send the request using a protocol, such as Simple Object Access Protocol (SOAP), or an architecture, such as REpresentational State Transfer (REST).

    tip No matter what programming language you use, you need to know how to communicate with web services using your programming language of choice. The "Considering the AWS-Supported Platforms" section of this chapter helps you make a good decision about a language choice. You can discover how SOAP works at http://www.w3schools.com/xml/xml:soap.asp and how REST works at http://www.tutorialspoint.com/restful/. Knowledge of both is required when working with AWS as a developer.

    Process the request on the server.

    Perform an action or return data as required by the request.

    When working with data, process the response on the client and present the results to the user (or other recipient).

    remember AWS provides a service-driven application architecture in which you choose a specific service, such as Simple Storage Service (S3), to perform specific tasks, such as to store application data in a remote location. In many cases, you must perform setup steps in addition to simply interacting with the service. For example, if you look at the ten-minute tutorial at http://aws.amazon.com/getting-started/tutorials/backup-files-to-amazon-s3/, you find that you must first create a bucket to store the files you want to upload to Amazon. This additional step makes sense because you have to establish a location from which to retrieve the files later, and you don’t want your files mixed in with files from other people.

    Even though many of the processes you perform with AWS require using an app (so that you have a user interface rather than code to work with), the underlying process is the same. The code provided in the app makes requests and then waits for a response. In some cases, the app must determine the success or failure of an action on the server. Rather than reinvent the wheel, a smart developer will use as many of these apps as possible to perform general configuration tasks. Using the AWS apps places the burden of updating the code on Amazon so that you can focus on custom tasks related to your organization.

    INTERACTIVITY IN THE DEVELOPMENT ENVIRONMENT

    Local applications require a certain level of interactivity between groups. A database administrator (DBA) may perform database setups before you can write code to interact with the data in that database. However, after the required individuals perform basic local setups, you may not interact with them as much as you do while creating your application code. Usually there is a flurry of activity during testing and again during deployment, but developers are often left alone to do their work otherwise because administrators in other areas give them the control needed to perform tasks.

    Things work differently in the cloud. For example, you might find yourself performing some tasks normally associated with other disciplines, such as service configuration. This book helps you through the configuration tasks that developers normally do as part of working with AWS. In addition, you find tips about when you need to work with others to finish tasks. The level of interactivity between disciplines is much higher in the cloud because you have less control over the environment (you’re using someone else’s hardware and underlying software, after all). In addition, the cloud environment can become more complex than the test server setup that you may normally rely on for localized development.

    Understanding process- and function-driven work flows

    In creating apps to help manage underlying services, AWS also defines workflows. A workflow is an organized method of accomplishing tasks. For example, when you want to save a file to AWS using S3, you must first create a bucket to hold the file. Only after you create a bucket can you save a file to AWS. In addition, you can’t retrieve a file from the bucket until you first save a file there, which makes sense because you can’t grab a file out of thin air. In short, a workflow defines a procedure for working with software, and the concept has been around for a long time. (The first workflows appeared in the mid-1970s with simple office automation prototypes at Xerox Parc and the University of Pennsylvania’s Wharton School of Business.)

    Workflows can consist of additional workflows. In addition, workflows manage the interaction between users and underlying services. A process is the aggregation of services managed by workflows into a cohesive whole. The workflows may perform generic tasks, but processes tend to be specific and help users accomplish particular goals. A process-driven workflow is proactive and attempts to circumvent potential problems by

    Spotting failure patterns and acting on them

    Looking for trends that tend to lead to failures

    Locating and extinguishing potential threats

    tip In looking through the tutorials at http://aws.amazon.com/getting-started/tutorials/, you find that they all involve using some type of user interface. The user interface provides the workflow used to manage the underlying services. Each major tutorial step is a workflow that performs a specific task, such as creating a bucket. When you combine these individual workflows into an aggregate, the process can help a user perform tasks such as moving files between the cloud and the user’s system. Creating a cloud file system is an example of a process-driven workflow: The workflow exists to make the process viable. Workflows can become quite complex in large-scale operations, but viewing them helps you understand AWS better. You can find a more detailed discussion of workflows and processes at https://msdn.microsoft.com/library/bb833024.aspx.

    A function is the reactive use of services managed by workflows to address specific problems in real time. Even though it would be nice if process-driven workflows worked all the time, the reality is that even with 99.999 percent reliability, the process will fail at some point, and a function-driven workflow must be in place to address that failure. Although process-driven workflows focus on flexible completion of tasks, function-driven workflows focus on procedurally attenuating the effect of a failure. In short, function-driven workflows address needs. The AWS services and workflows also deal with this issue through the user interface, such as by manually restoring a backup to mitigate a system failure.

    remember As a developer, you find yourself involved in a number of tasks that may appear at first to fall outside the realm of development. Development in the cloud isn’t quite the same as development at the desktop or development of applications using a browser strategy. When working through development tasks with AWS, you find yourself performing these kinds of tasks in order to implement workflows:

    Configuring the native functionality of AWS using wizards, AWS-driven scripts, or direct API calls through code

    Modifying AWS-driven scripts as needed to accomplish specific goals in the least amount of time possible

    Defining new configuration scenarios to meet workflow requirements by modifying underlying AWS configuration files, scripts, and code

    Using AWS-supplied tools, such as lambda functions (see https://aws.amazon.com/lambda/), to perform tasks without resorting to hard coding

    Developing applications that rely on API calls to perform tasks

    Discovering IaaS

    Even though this book frequently refers to virtual environments and services that you can’t physically see, these elements all exist as part of a real computer environment that Amazon hosts on your behalf. You need to understand how these elements work to some extent because they have a physical presence and impact on your personal or business needs. Three technologies enable anyone to create a virtual computer center using AWS:

    Infrastructure as a Service (IaaS): A form of cloud computing that provides virtualized computing resources. You essentially use IaaS to replace physical resources, such as servers, with virtual resources hosted and managed by Amazon.

    Software as a Service (SaaS): A software distribution service that lets you use applications without actually having the applications installed locally. Another term used to describe this service is software on demand. The host, Amazon, maintains the software, provides the required licenses, and does all the other work needed to make the software available.

    Platform as a Service (PaaS): A platform provides a complete solution for running software in an integrated manner on a particular piece of hardware. For example, Windows is a particular kind of platform. The virtual platform provided by PaaS allows a customer to develop, run, and manage applications of all sorts.

    The following sections provide an extended discussion of these three technologies and help you understand how they interact with each other. The point of these sections is that each element performs a different task, yet you need all three to create a complete solution.

    Defining IaaS

    The simplest way to view IaaS is as a means of providing access to virtualized computer resources over an Internet connection. IaaS acts as one of three methods of sharing resources over the Internet, alongside SaaS and PaaS. AWS supports IaaS by providing access to virtualized hardware, software, servers, storage, and other infrastructure components. In short, you can use IaaS to replace every physical element in your computing setup except those required to establish and maintain Internet connectivity and those required to provide nonvirtualized services (such as printing). The advantages of IaaS are many, but here are the ones that most people consider essential:

    The host handles tasks such as system maintenance, backup, and resiliency planning.

    A client can gain immediate access to additional resources when needed and then doesn’t need to worry about getting rid of them when the need has ended.

    Detailed administrative tasks are handled by the host, but the client can manage overall administrative tasks, such as deciding how much capacity to use for a particular task.

    Users have access to desktop virtualization, which means that their desktop appears on whatever device they happen to use at a given moment.

    The use of policy-based services ensures that users must still adhere to company requirements when using computer resources.

    All required updates (software and hardware) occur automatically and without any interaction required by the client.

    warning Keep in mind that there is no free lunch. AWS and other IaaS providers are interested in making a profit. They do so by investing in huge quantities of hardware, software, and management personnel to oversee it all. The benefits of scale help create profit, and many businesses simply can’t create the setups they require for less money. However, you must consider the definite disadvantages of IaaS as well:

    Billing can become complex because some services are billed at different rates and within different time frames. In addition, billing can include resource usage. The client must ensure that the amount on the bill actually matches real-world usage; paying too much for services that the client didn’t actually use can easily happen.

    Systems-management monitoring becomes more difficult. The client loses control over the precise manner in which activities occur.

    A lag often occurs between when a change in service is needed and when the host provides it, so the client can find that even though services are more flexible, they aren’t as responsive.

    Host downtime can affect a large group of people and prove difficult to fix, which means that a particular client may experience downtime at the worst possible time without any means to resolve it.

    Building and testing custom applications can become more difficult. Many experts recommend using in-house equipment for application-development needs to ensure that the environment is both protected and responsive.

    remember IaaS service contracts vary a great deal between vendors. Even though this book focuses on AWS, you need to consider other offerings, including Windows Azure, Google Compute Engine, Rackspace Open Cloud, and IBM SmartCloud Enterprise. In some cases, you might actually find it useful to obtain services from multiple hosts to obtain the best service for a particular need.

    Comparing IaaS to SaaS

    SaaS is all about cloud-based applications. Products like online email and office suites are examples of cloud-based applications. A client typically accesses the application using a local application, such as a browser. The browser runs on local hardware, but the application runs on the host hardware. What a client sees is the application running in the browser as if it is working locally. In most cases, the application runs within a browser without any alteration to the local system. However, some applications do require the addition of plug-ins.

    The difference between IaaS and SaaS is the level of service. When working with IaaS, a client typically requires detailed support that spans entire solutions. A SaaS solution may include only the application. However, it can also include the following:

    Application runtimes

    Data access

    Middleware

    Operating system support

    Virtualization

    Server access

    Data storage

    Networking

    remember SaaS typically keeps the host completely in control and doesn’t offer any sort of monitoring. Even though the host keeps the application updated and ensures data security, the client company administrators typically can’t access SaaS solutions in any meaningful way. (SaaS offers application usage, but not necessarily application configuration, and is therefore not as flexible as other alternatives.) In addition, the client company typically accepts the application as is, without any modifications or customizations. Using client-developed applications is out of the question in this scenario.

    Comparing IaaS to PaaS

    PaaS is more of a development solution than a production environment solution. A development team typically uses PaaS to create custom solutions or modify existing solutions. The development staff has full control over the application and can perform all development-related tasks, such as debugging and testing. As with the SaaS solution, the host normally maintains control over

    Middleware

    Operating system support

    Virtualization

    Server access

    Data storage

    Networking

    In this case, however, the development staff can access the middleware to enhance application development without reinventing the wheel. Writing application code to make the application cloud-ready isn’t necessary because the middleware already contains these features. The development team gains access to cloud-based application features that include the following:

    Scalability

    High availability

    Multitenancy

    SaaS enablement

    remember Administrators can also perform monitoring and management tasks within limits when working with a PaaS (depending on the contract the client has with the host). However, realize that PaaS is oriented toward development needs, so the developer takes precedence when it comes to performing some tasks that an administrator might normally perform. In addition, PaaS relates to development, not production setups, so the host may take care of all administration tasks locally.

    Determining Why You Should Use AWS

    Even though AWS has a lot to offer, you still need to consider how it answers your specific needs. This consideration goes beyond simply determining whether you really want to move to cloud-based services, but also takes into account other offerings that might serve your needs just as well (if not better). Even though this book is about AWS, you should compare AWS with other cloud services. You may choose to use AWS as part of your solution rather than as the only solution. Of course, this means knowing the areas in which AWS excels. The following sections address both of these possibilities: using cloud services other than AWS, or in addition to it.

    Comparing AWS to other cloud services

    You have many ways to compare cloud services. One of the ways in which companies commonly look at services is by the market share they have. A large market share tends to ensure that the cloud service will be around for a long time and that many people find its services both useful and functional. A recent InfoWorld article (http://www.infoworld.com/article/3065842/cloud-computing/beyond-aws-the-clouds-next-stage.html) points out that AWS currently corners 70 to 80 percent of the cloud market. In addition, AWS revenues keep increasing, which lets Amazon continue adding new features while maintaining existing features at peak efficiency.

    tip The cloud services marketplace continues to change at a frantic pace, so you need to keep up-to-date on the various offerings that each provider supplies. In addition, you need to track pricing and other factors that affect your application development process. Your application development needs also change over time, which means that the services you use today may not meet your needs tomorrow. In short, don’t assume that the choices you make are fixed.

    remember Large market share and capital to invest don’t necessarily add up to a cloud service that fulfills your needs. You also need to know that the host can provide the products you need in a form that you can use. The AWS product list appears at http://aws.amazon.com/products/. It includes all the major IaaS, SaaS, and PaaS categories. However, you should compare these products to the major AWS competitors:

    Cisco Metapod (http://www.cisco.com/c/en/us/products/cloud-systems-management/metapod/index.html)

    Google Cloud Platform (https://cloud.google.com/products/)

    Joyent (https://www.joyent.com/)

    Microsoft Azure (https://azure.microsoft.com/)

    Of the competitors listed here, Google Cloud Platform comes closest to offering the same feature set found in AWS. However, in looking at the Google offerings, you should note the prominence of machine learning services that aren’t found in AWS. On the other hand, AWS has more to offer in the way of the Internet of Things (IoT), applications, and mobile services.

    Each of the vendors offering these services is different. For example, Joyent offers a simple setup that may appeal more strongly to an SMB that has only a few needs to address and no desire to become involved in a complex service. Microsoft, on the other hand, has strong SQL database-management support as well as the connection with the Windows platform that businesses may want to maintain. The point is that you must look at each of the vendors to determine who can best meet your needs (although, as previously stated, most people are voting with their dollars on AWS).

    Defining target areas where AWS works best

    In looking at the services that AWS provides, you can see that the emphasis is on enterprise productivity. For example, Google Cloud Platform offers four enhanced machine learning services that you could use for analysis purposes, but AWS offers only one. However, Google Cloud Platform can’t match AWS when it comes to mobile service, which is an area that users most definitely want included for accessing applications. Unless your business is heavily involved in analysis tasks, the offerings that AWS provides are significantly better in many ways. Here are the service categories that AWS offers:

    Compute

    Storage and content delivery

    Database

    Networking

    Analytics

    Enterprise applications

    Mobile services

    IoT

    Developer tools

    Management tools

    Security and identity

    Application services

    Considering the app types that AWS supports best

    Theoretically, you could create just about any kind of application imaginable using AWS. The difference isn’t in what tasks the application would execute or how the application would manage data — these issues are the same as when working at the desktop. What you need to consider is where the application would execute, which means understanding the capabilities of the underlying cloud environment in order to determine which applications that environment will support. You can divide AWS application types into these areas:

    End-user applications that the user accesses directly using a browser.

    End-user applications that currently execute within a browser but are augmented by background calls to AWS.

    End-user applications that currently execute on the desktop but are augmented by background calls to AWS.

    Management applications that interact directly with AWS.

    Web-service applications that react to calls from a remote application.

    Web-service applications that use a polled publish/subscribe model.

    Web-service applications that use a push publish/subscribe model.

    You can come up with other application types. This list gives you an idea of what’s possible. The main point is that you still need to know something about the underlying environment. For example, if you want to create browser-based applications, you might rely on the Elastic Beanstalk service, which provides support for these default platforms:

    Apache Tomcat for Java applications

    Apache HTTP Server for PHP applications

    Apache HTTP Server for Python applications

    Nginx or Apache HTTP Server for Node.js applications

    Passenger or Puma for Ruby applications

    Microsoft IIS 7.5, 8.0, and 8.5 for .NET applications

    Java SE

    Docker

    Go

    remember Consequently, the app types that AWS supports best is partly determined by the service that you use and which features you add to that service. However, just as you can extend Elastic Beanstalk to support other languages, you can also modify how the other services work as well. Extending a service necessarily means being able to run other app types. The bottom line is that you need to consider these issues:

    Determining which service meets your app needs best directly out of the package.

    Defining which service features you need to make the app run as well as, if not better than, the same app when run locally.

    Expanding the service as needed to meet custom requirements.

    Obtaining third-party package support as needed to allow data and other resources access.

    Considering the need to modify application functionality to ensure full service in the cloud environment.

    warning Don’t get the idea, however, that creating an app in the cloud is precisely the same as creating an app on your local system or within a browser environment. The cloud does present challenges (as described throughout the book). For example, when working with the cloud, you must consider latency issues that you might not need to consider when running the app in other environments. After all, you’re still running the app across the Internet. You might also experience outages beyond your control (see the article at http://www.infoworld.com/article/3176098/cloud-computing/aws-outage-proves-one-cloud-isnt-enough.html for details on an 11-hour AWS outage that affected nearly half the Internet). If you have an app that is so critical that it can never go down, you may need to revisit the local data center or rely on multiple cloud products, which means coordinating the feature set of those products, thereby limiting your ability to leverage the flexibility offered by a specific cloud product.

    Considering the AWS-Supported Platforms

    If you haven’t dealt with the cloud yet, you might be tempted to think of platforms as a specific combination of items. For example, when viewing your own local setup, you have a server that runs a specific operating system and has a specific set of hardware resources. The system has a specific Database Management System (DBMS) installed and relies on certain kinds of other software to provide end-user resources. The development platform is specific, too. You use a particular language with a predefined set of libraries to code application in just one way. The cloud doesn’t work this way. When working with the cloud, you have an array of operating systems that can support any of a number of DBMSs and has access to a wide assortment of end-user resource products.

    remember Even the development environment is different. You can code at several different levels, as described in the "Considering the app types that AWS supports best" section, earlier in this chapter. In fact, when using the AWS Lambda service (https://aws.amazon.com/lambda/), you don’t really consider platform or resources in the conventional sense at all. What you’re most interested in is a process for obtaining a particular result given a certain bit of data regardless of the source or output. The environment no longer really matters; what does matter is the process and the result obtained from the process.

    With all these caveats and differences in mind, the question becomes one of determining the best way to use particular services rather than what functionality you have available. The following sections give you a quick overview of how to obtain more information about AWS support for specific platform features, given a particular service.

    Obtaining an overview of the supported platforms

    AWS is all about the services. You can see

    Enjoying the preview?
    Page 1 of 1