- Kubernetes for Serverless Applications
- Russ McKendrick
- 412字
- 2021-07-02 19:16:42
Prerequisites
First of all, you need an AWS account. If you don't have an account, you can sign up for an account at https://aws.amazon.com/:

While clicking on the Create a Free Account and then following the onscreen instructions will give you 12 months' free access to several services, you will still need to provide credit or debit card details and it is possible that you could incur costs.
For more information on the AWS free tier, please see https://aws.amazon.com/free/. This page lets you know which instance sizes and services are covered by the 12 months of free service, as well as letting you know about non-expiring offers on other services, which include AWS Lambda.
Once you have your AWS account, you should create a user using the AWS Identity and Access Management (IAM) service. This user can have administrator privileges and you should use that user to access both the AWS Console and the API.
For more details on creating an IAM user, see the following pages:
- Getting started with IAM: http://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started.html
- IAM best practices: http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
Using your AWS root account to launch services and access the API is not recommended; if the credentials fall into the wrong hands you can lose all access to your account. Using an IAM rather than your root account, which you should also lock down using multi-factor authentication, means that you will always have access to your AWS account.
The final prerequisite is that you need access to the AWS command-line client, where I will be using macOS, but the client is also available for Linux and Windows. For information on how to install and configure the AWS command-line client, please see:
- Installing the AWS CLI: http://docs.aws.amazon.com/cli/latest/userguide/installing.html
- Configuring the AWS CLI: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
When configuring the AWS CLI, make sure you configure the default region as the one you will be accessing in the AWS web console, as there is nothing more confusing than running a command using the CLI and then not seeing the results in the web console.
Once installed, you can test that you can access AWS Lambda from the command-line client by running:
$ aws lambda list-functions
This should return an empty list of functions like the one shown in the following screenshot:

Now that we have an account set up, created, and logged in using a non-root user, and we have the AWS CLI installed and configured, we can look at launching our first serverless function.