Greetings! Welcome to TSH Academy workshops. This repository contains the code necessary for following along with the presentation. If by any chance you get lost, we have prepared separate branches with every task, so you can verify your solution or start over.
The goal of today's workshop is to learn what Step Function are and how they work. We're going to show you how to define state machines and develop business flows by orchestrating Lambda functions into both simple and complex processes.
During the workshop, we are going to show you how to effectively work with Serverless Framework and use it to deploy CloudFormation stack. We're going to present some methods of development and how it differs from container based development.
To follow along with the presentation please make sure to have installed:
- brew
- node.js (>= 14.16.1, < 15.0.0)
- npm (>= 6.14.12)
- git
- AWS CLI
- AWS Toolkit
- VS Code
Resources:
- Brew - https://brew.sh/
- AWS CLI - docs https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
- AWS CLI - Brew https://formulae.brew.sh/formula/awscli
- Node.js - Brew https://formulae.brew.sh/formula/node
- VS Code - https://code.visualstudio.com/
- AWS Toolkit for VS Code - https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/setup-toolkit.html
- checkout onto branch
task/1
:git checkout task/1
- install dependencies by running
npm install
- after you've received a
studentXX.csv
from us (if you haven't, scream out loud!) use its contents to:- configure a new profile for executing AWS CLI commands by running
aws configure --profile tsh-workshops
and entering the following it the prompt:- AWS Access Key ID:
<the Access key ID>
- AWS Secret Access Key:
<the "Secret access key">
- Default region name:
eu-west-1
- Default output format: the default
None
is fine, just pressEnter
- AWS Access Key ID:
- set environment variables:
- run
cp .env.dist .env
- fill in
STUDENT_NAME
:STUDENT_NAME=<the "User name" from the credentials file>
- fill in
ACCOUNT_ID
:ACCOUNT_ID=<the 12-digit number at the start of "Console login link" in the credentials file>
- please, leave the other variables as they are, so we can easily identify your resources after you've deployed them on AWS :)
- run
- deploy the whole application stack by running
npx sls deploy --aws-profile=tsh-workshops
.
- configure a new profile for executing AWS CLI commands by running
When deployed successfully, you will see the deployed step function in AWS Console:
- Log in, using the
User name
andPassword
we sent you. - You will then be asked to change your password upon your first login.
- In the list of AWS services, find Step Functions and look for one with your username in it.
With the environment set up, you can proceed to your first task!
This project is licensed under the terms of the MIT license.