Skip to content

Latest commit

 

History

History
126 lines (74 loc) · 4.75 KB

File metadata and controls

126 lines (74 loc) · 4.75 KB

Set Up

In this section we will spend sometime setting up our environments before getting started.

  1. Clone this repo
  2. Sign in to your AWS Account
  3. Install the AWS CLI and auth via the command line
  4. Install serverless globally
  5. Open this project in the code editor of your choice
  6. Join DevopsRepresent slack workspace


Clone this repo

Clone this repo. You're going to make it your own and make edits. It's yours to keep and play around.

Choose a directory where you'd like to clone this repo to (it could even just be your desktop)

Run the following in your command line

git clone git@github.com:DevOps-Represent/simple-lambda-alert-notification.git

If you don't have a github account, please download the zip by going to the github link, clicking on the green Code dropdown button and selecting the Download ZIP link.



Sign in to your AWS Account

If you don't already have one, you'll have to set up a personal AWS account. If you don't have one, having an AWS account is key if you intend on continuing your AWS learning journey after this workshop.

  • If you DO have an account, log in (preferably not as root and you've set up a user via IAM that has permissions to deploy resources).

    • Create an IAM user or use the root user.
    • Set up a access key ID and secret by following instructions HERE. Keep this access key and secret handy. We will need that while calling the secure API.
      • Login with the new IAM user or use the root user
      • In the navigation bar on the upper right, choose your user name, and then choose My Security Credentials.
      • Expand the Access keys (access key ID and secret access key) section.
      • To create an access key, choose Create New Access Key.
  • If you DONT have an account, go HERE to create one, you'll need a credit card - Don't worry no cost will be incurred during this workshop (~$1 will be taken out of your account on initial sign-up but this will be automatically refunded by AWS).



Install the AWS CLI and auth via the command line

As we're running commands via the command line that will allow you to deploy AWS resources, you need to authenticate to your personal AWS via the command line.

Here's install instructions for all operating systems: How to install the AWS CLI 2

Here's the instructions on how to authenticate via your command line:


NOTE you'll need to get some details from the AWS web console that'll need to be copy and pasted for this to work AWS instructions on how to configure your command line

It'll look something like this:

aws configure

If you have multiple AWS accounts, configure with a profile name aws configure --profile <profile-name>

Then following the prompts you need to provide:

  • AWS Access Key ID
  • AWS Secret Access Key
  • Default region name (for Australia, choose ap-southeast-2)
  • Default output format (you can just choose nothing)


Install node, npm and yarn

  • Run node -v to check if you have node installed.
  • Run npm -v to check if you have npm installed.
  • Run yarn -v to check if you have yarn installed.

if you have everything installed then go to the Install serverless globally, otherwise keep reading through.


Install serverless globally

We are deploying the lambda using serverless. To install serverless via npm simply run npm install -g serverless.



Code editor

We are going to make a new lambda and create alarms. To do this, it's best to use a code editor.

There's lots of free versions, here's a few to pick from if you don't already have one:

Here is an even longer list.



Join DevopsRepresent slack workspace

We'll be sending you a link to your email.