The task description can be found here: github.com/axelra-ag/axelra-interview-challenge-frontend
-
Install AWS CLI
-
Install the AWS SAM CLI -> https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html Don't forget to install Docker, if not yet installed.
-
create an .env file like the following one:
export AWS_PROFILE=default export ARTIFACT_STORE=axelra-interview-challenge-artifact-store export CLOUDFORMATION_NAME=axelra-interview-challenge export ENVIRONMENT=dev export API_HOST=google.com export API_PORT=80 export MONGO_DB="<The mongoDB connection string which you received by Axelra>"
Install node modules with. It will start a recursive install for every subfolder.
AWS microservice currently work best (if not "only") with npm. So use npm instead of yarn to avoid conflicts.
Important: Docker needs to be running.
(Not necessary for the challenge.)
-
Make sure the
.env
file exists:export AWS_PROFILE=default export ARTIFACT_STORE=axelra-interview-challenge-artifact-store export CLOUDFORMATION_NAME=axelra-interview-challenge export ENVIRONMENT=dev export API_HOST=google.com export API_PORT=80 export MONGO_DB="<The mongoDB connection string which you received by Axelra>"
If you haven't specified an AWS profile keep this env variable on 'default'.
-
Create an AWS account if you don't have one yet.
-
Add aws credentials to
~/.aws/credentials
-
Add region and default output to
~/.aws/config
-
Open the AWS console and create an S3 Bucket artifact store. Choose the name
axelra-test-artifact-store
, if you don't want to adjust the .env file above. -
Build and deploy the cloudformation
On MacOS/Linux:
On Windows in Git Bash:
The template is packaged and the Cloudformation Stack is deployed to AWS.
- Lamba functions still need require for importing files (e.g.
const util = require("util")
), do not useimport {util} from "util"