aws rds create-db-instance \
--db-instance-identifier serverless \
--db-instance-class db.t2.micro \
--engine MySQL \
--allocated-storage 5 \
--no-publicly-accessible \
--db-name serverless \
--master-username serverless \
--master-user-password YOUR_PASSWORD_HERE \
--backup-retention-period 1
https://docs.aws.amazon.com/lambda/latest/dg/vpc-rds-create-iam-role.html
Save the ARN
ID for the role
- Navigate to
/setup/rds_config.example.py
and update your credentials. - Rename the file to
rds_config.example.py
- zip the
YOUR_FUNCTION/app.py
andrds_config.py
intoapp.zip
- you can use this command too
cd INTO/SETUP/DIRECTORY && zip -r app.zip app.py rds_config.py pymysql
- you can use this command too
aws lambda create-function \
--region us-east-1 \
--function-name serverless-get-employees \
--zip-file fileb://YOUR_PATH_TO/app.zip \
--role execution-role-arn \
--handler app.handler \
--runtime python3.6 \
--vpc-config SubnetIds=comma-separated-subnet-ids,SecurityGroupIds=default-vpc-security-group-id \
--profile adminuser
aws lambda invoke \
--function-name serverless-get-employees \
--region us-west-1 \
--profile YOUR_USER \
output.txt
aws apigateway create-rest-api \
--name serverless \
--region us-west-1 \
--profile profile
aws apigateway create-resource \
--rest-api-id api-id \
--parent-id root-id \
--path-part employee
aws apigateway put-method \
--rest-api-id api-id \
--resource-id resource-id \
--http-method POST \
--authorization-type NONE
vue init webpack serverless && cd serverless && npm install
npm run build
cd INTO YOUR YOUR/PATH/setup/frontend/setup
npm run build
git add .
git commit -a -m "Adding files."
git push heroku master
required params:
first, last, email
required params:
id, first, last, email
required params:
id
- Data validation in Vue using
vee-validate
- Date validation in lambda
- Refactor Frontend
- Deploy on S3 to solve:
- Cold boot issue with Heroku where the api call will fail silently