nonlogos
1/11/2017 - 12:46 AM

All things about AWS Apex deploy

All things about AWS Apex deploy

1. create a new user specifically for Apex
  - go to IAM management
  - create a new user called "apex-deploy"
  - click on "generate an access key"
  - get "user security credit" - access key ID, secret access key by downloading them
  - click on the user and go to permissions
  //get lambda policy
  - click on "Attach Policy" and search for "lambda"
  - select "AWSLambdaFullAccess" //bad practice
  // get IAM policy
  - click on "attach policy" again and search for IAM
  - select IAMFullAccess // bad practice
  
2. install aws cli and configure
  - in terminal: sudo pip install awscli --ignore-installed six
  - test with "aws help"
  - "aws configure"
  - enter access keyID and secret access key, region, output..

3. initiate a new Apex project 
  - Get into your directory, then "apex init"
  - put in project name, optional description and stuff
  - this creates a project.json file and a functions folder to put the lambda functions in
  
4. each function needs to be in its own folder with index.js inside that contains the actual function
5. use "apex deploy" to deploy the whole project