Skip to main content

How to use AWS – a simple guide for beginners

How to use AWS

Amazon Web Services (AWS) is Amazon’s powerful, market-leading solution for cloud computing. The platform offers a suite of products for businesses: security, cloud backup, machine learning, IoT solutions, and more. In this post, we will explore how to use AWS.

What you need to know

Many entrepreneurs and small businesses may assume that AWS is not for them. Perhaps the pricing will be too prohibitive, or it will require too much technical know-how.

While both of these issues certainly do crop up from time-to-time, the truth is that Amazon’s offerings are extremely wide-reaching and include options at many different price points and levels of complexity. That is to say, that while some products might be off-limits, others are not. Some AWS products are completely free and very simple to get to grips with!

See also: AWS vs Azure vs Google Cloud – Which certification is best for professionals?

AWS includes over 175 different products, some of which don’t even require an AWS account. Whether you’re looking to host a WordPress website, create an in-house business tool, or develop a complex and far-reaching web app, there are options. What you may find, is that you can use AWS to affordably extend the functionality of your own products and services. Alternatively, IT professionals can benefit from learning these skills in order to enhance their resumes and potentially land higher-paying roles.

With that said, AWS is also notorious for its complex pricing and users have been known to get caught out. Make sure to carefully read the small print, and check our guide to AWS Free Tier.

How to use AWS: Getting started

The first step to getting started with AWS is to sign up for an AWS account. You can do this by going to aws.amazon.com and clicking “Create an AWS Account” in the top right.

AWS Account Creation

Credit: Adam Sinicki / Android Authority

You’ll then be asked to provide some basic details about yourself, and to pass an impossible CAPTCHA to prove you’re not a robot.

The next page is scary: you’re asked to provide your credit or debit card details before you can even use the program. As mentioned, should you exceed the AWS Free Tier limits, you will be charged automatically.

Once you’re logged in, you can start playing around with the services on offer. Of course, any guide to how to use AWS is going to be limited in scope seeing as there are so many different products available.

That said, it can still be useful to run through any example of how to use AWS products, so that you can get an idea of how it all works. This is how we learn any seemingly overwhelming new topic: by getting stuck in with a project! So, let’s take a look at one of the most useful features AWS has to offer: AWS Lambda.

How to Use AWS Lambda

Lambda is one of the most integral aspects of AWS that professionals should spend time familiarizing themselves with. This is an “event-driven” and “serverless” compute platform. This means it can handle small bits of code and will only run when needed. Instead of paying a monthly fee to host a web app, you can instead write a small Lambda script and only pay each time you need to use it. This is highly scalable too: from a few requests a day to thousands a second.

You can then trigger this code as needed. Your code might run in response to HTTP requests via Amazon API Gateway, or you could invoke it with API calls from AWS SDKs. Alternatively, they might process events from specific “event sources.” These may include Amazon S3 or DynamoDB for example.

Python for AWS Lambda

The good news is that Lambda uses Python by default. Python is one of the easiest programming languages to get to grips with, as well as one of the most powerful. It also just so happens that we have a number of great Python tutorials on this very site!

See also: Python beginner’s guide – Everything you need to know to get started

If you prefer, you can also write Lambda functions in Java, Node.js, or C#.

A simple example

You can find detailed instructions for each one of the AWS services here. These are helpful but a little out-of-date in many cases.

The below is adapted and updated from one of these examples.

First, open up the AWS Management Console. Find the Lambda console (under Compute). From there, choose “Create a Function” and then “Use a blueprint.”

Hello World Python

Credit: Adam Sinicki / Android Authority

In the Filter Box type:

hello-world-python

Select the blueprint when it appears and hit Configure in the bottom right. Lambda blueprints are examples of code that handle minimal processing. You can use these in order to create quick functions that don’t require a lot of typing on your part.

You’ll now be prompted to configure your function. This can set the amount of compute resources you wish to allocate (e.g. memory), as well as execution timeout, etc.

First enter some basic information about your function: its name and role name. Make sure that “Create a new role from AWS policy templates” is selected.

Configure Lambda Function

Credit: Adam Sinicki / Android Authority

Use the following information:

  • Name: hello-world-python
  • Role name: lambda_basic_execution

You can leave “Policy template” empty.

The role is the “IAM role.” IAM stands for “Identity and Access Management,” and is a framework for policies and practices to ensure the smooth management of digital identities. Don’t you just love it when an acronym works out? An IAM role then is an IAM identity with specific permissions, but that isn’t associated with any one individual. Roles can be used to share access to resources or to allow apps and software to access products (without needing to embed AWS keys). In this case, the IAM role will provide the permissions that AWS Lambda needs to run the function for you.

The Lambda function

You can see the Lambda function code at the bottom of the screen. It should look fairly familiar to anyone that has used Python before. Learning Python is a useful step if you wish to learn how to use AWS Lambda.

import json

print('Loading function')

def lambda_handler(event, context):
  #print("Received event: " + json.dumps(event, indent=2))
  print("value1 = " + event['key1'])
  print("value2 = " + event['key2'])
  print("value3 = " + event['key3'])
  return event['key1']  # Echo back the first key value

#raise Exception('Something went wrong')

First, we import the JSON module. JSON is used to send data securely over the web. This works in “value/attribute” pairs and, as you can see here, we’re printing these and returning the first one from our function. “Return” is essentially how we pass data out of our function to other apps.

See also: How to use Python modules

You can learn a bit more about JSON by reading our guide to using Web APIs in Android.

Now hit “Create function.” You’ll see the function code in an editor, as well as your environment with your project and all its files. You should only have one thing here: hello-world-python > lambda_function.py.

How to use AWS Lambda Configuration Settings

Credit: Adam Sinicki / Android Authority

As you scroll down the page, you can see the memory, timeout, and VPC settings, among other things. You can leave all these things as they are until you learn how to use AWS Lambda for more complex tasks.

See also: How to open CSV files in Python – store and retrieve large data sets

Testing our Lambda function

That’s our function all set up! The question now is how do we get it to run or do anything useful with it.

As you can see, you have the option to “add triggers” in the Designer. Here you can select events that will cause your code to run. Instead, though, we’re going to use a “Test Event” to check that everything is working. So, click the drop-down many and select “Configure test events.”

Hello World Event

Credit: Adam Sinicki / Android Authority

The event template should be prepopulated with “hello-world.” Choose any name you like for the Event name, such as “HelloWorldEvent.” Change the “value1” string to say “Hello World!”

Click “Create”. Back in the console, click “Test.”

How to use AWS Lambda Function Success

Credit: Adam Sinicki / Android Authority

If everything went well, you’ll see the message: “Execution result: succeeded (logs)” You can expand this by clicking “Details.”

Here, you’ll see the string that was returned from the function: “Hello world!” You can also find more information here, such as the duration and max memory used. The log output shows what we printed along with other information we could use to debug the function.

See also: How to call a function in Python

So, that’s how to use AWS Lambda! While this was just a little tester, there are countless other things we could do with a function like this. That might mean performing complex algorithms and providing the output, transforming data we feed in via JSON, or just updating us about the status of another app or tool.

Of course, there is much more to learning how to use AWS! This is just one of the 175+ different products available.

How to use AWS Amazon Chime

To demonstrate just how varied AWS products are, let’s take a look at Amazon Chime. Rather than a development tool with complex pricing and unlimited uses, Amazon Chime is a simple app that anyone can use for free. It just so happens to fall under the umbrella of AWS.

Amazon Chime is a simple conferencing app that anyone can use for free.

Download the app from the Google Play Store or App Store. You can use Amazon Chime without an AWS account (you’ll need your Amazon login details). It will give you access to basic features like chat, voice calls, and meetings. However, you will need to upgrade if you want access to pay-as-you-go features such as Business Calling.

That’s it: just download an app and you’re already using AWS! I probably wouldn’t put “AWS” on your resume just yet though…

Learning more

Amazon provides a number of useful tutorials for those looking to learn how to use AWS products. For example, the “Full-Stack Developer” learning path walks users through the process of building a web app with both a front-end design built using HTML, CSS, etc. and a back-end that handles algorithms and data to provide an interactive experience.

This process takes 30 minutes, but it’s worth noting that some elements are out of date. The guide also assumes a certain amount of prior knowledge. Nobody can learn HTML, CSS, Python, and server management in 30 minutes!

AWS tutorials

Credit: Adam Sinicki / Android Authority

The “Hobbyist Builder” learning path meanwhile shows you how to create and host a WordPress website, letting Amazon handle cloud management. You’ll be using Amazon Lightsail, which is a service that offers Virtual servers, storage, databases, and networking. You can sign up for Amazon Lightsail without worrying about the complex pricing of AWS. This makes it a great alternative to web hosting from the likes of Bluehost. As well as offering built-in features like WordPress and Magento (which is fairly standard for any hosting service these days), you’ll also get access to development stacks such as LAMP, MEAN, and Node.js. This solution is great for those that don’t consider themselves full-stack developers but would like to get started with some basic web app development.

Or you could try something more complex, such as the Data Scientist learning path. This will teach you to develop, train, and deploy ML models through Amazon SageMaker. Again, the key to learning how to use AWS is to know precisely what you want to achieve before you dive in.

AWS certification courses

We recommend that beginners take an online course first in order to provide the necessary background information. This is the easiest place to start and will provide a comprehensive education in your chosen AWS products. Many courses also prepare you for AWS certification, which can significantly enhance your career.

Check out our guide to the best AWS courses for professionals to find a selection of heavily discounted courses. Our top recommendation is the comprehensive 2020 Ultimate AWS Certification Training Bundle. This package contains everything you need to know and is available to Android Authority readers for just $59.99. That’s a $214.01 discount, so act quickly!

This is the fastest and most efficient way to learn how to use AWS. Hopefully, this post will have given you an idea of the basics and just what you can do with this immensely powerful selection of tools. So, what are you waiting for?



source https://www.androidauthority.com/how-to-use-aws-1168883/

Comments

Popular posts from this blog

5 tips to Voice Speech Recognition in Android Marshmallow

Android Marshmallow landed on our Android devices. The opportunity for us to offer a small compilation of tricks to try immediately. The latest version of the Google OS starts (very gently, unhurriedly) to be offered on other devices as Nexus. You will find on Android TM, in the coming weeks, a compilation of the best tips for Android 6.0 Marshmallow. It starts slowly with a video featuring the 10 essential tips & tricks of this new version of the little green robot OS. To continue, we offer a selection of five "tricks" on the management of the battery on Android 6.0 Marshmallow. To enjoy longer your newly updated mobile. Follow the guide. then continue with 5 tips to tame the super-assistant Google Now on Tap. Here you will find 5 "tips" to manage in the best way your applications. We then discuss the quick tips to navigate more easily on this version of the Google OS. We enchanters with features focused on safety and the protection of personal data. We co...

Energy Android TV Play turns your TV into a Smart TV

ENERGY SISTEM Android Energy TV Play, you have a smart TV with Android operating system allows you to convert any traditional TV has announced the launch of a new product. Energy Android TV Play can be connected to the TV to enjoy f the size of a flash drive, a smart phone, a tablet and a computer unconsolidated is a lightweight device. System 1.6 GHz, DDR3 1GB of RAM and a dual-core processor can be expanded using external USB devices, which is the internal memory of 8 GB. It also integrates WiFi and a USB port for connecting external devices. One of its outstanding features, it is easily connected to the TV screen by screen cast application to display the contents of any terminal, making any phone or tablet is synchronized with iOS or Android. All ENERGY SISTEM products one click In addition, through streaming media service applications, images, video or other multimedia content, and game play is the ability to share. With integrated WiFi, the device you want from t...

How to run Python apps on any platform

Credit: Adam Sinicki / Android Authority Want to know how to run Python? It sounds simple, but it can actually be tricky to figure this out. In this post, we’ll discuss how to test your Python code, as well as how to run Python in other contexts: online for example, or as a packaged app. Sometimes, the thing holding you back from learning to code can be extremely simple. I remember wanting to learn to program when I was younger – or learning to take what I’d learned from BASIC on the ZX Spectrum and apply that to a modern environment. My problem? I didn’t know “where” to program. Once I understood C# or Java, where would I enter the code and how would I run it? And whenever I asked someone, they would look at me blankly. What kind of a question is that? Thing is, I had never needed an IDE or an interpreter before. Machines like the ZX Spectrum and Tatung Einstein (any other Einstein users out there?) simply booted up with a prompt to code into! Many people have a similar iss...