daily log 11.11.19

2 minute read

THINGS WE CAN DO:

  1. Continue down the lambda path – this way I can access these endpoints from whatever app I make
  2. Continue down the EC2 path – this way I can easily update the app and push live

LAMBDA PATH

EC2 PATH

RESOURCES: Lambda cold starts


https://stackoverflow.com/questions/27669927/how-do-i-install-python-3-on-an-aws-ec2-instance

sudo yum install python36

AFTERNOON UPDATE:

Well, I tried posting to stack overflow for the first time and wow that was a mistake. Already downvoted!

I’ve tried to shell into my instance

I’ve tried adding my path to my data.py file

I’ve tried this other path adjustment

This answer sounds great – but where do those lines go?

This explains how I can access it from my own computer but I really think I understand this – just somehow cannot transfer that knowledge to my EC2 computer. Which is likely evidence of an aws knowledge gap I’d be so grateful to fill but clearly my own googling isn’t helping. Any help/guidance is so appreciated. Yes, I’ve read the docs. So many times. But clearly it isn’t sticking?

Non stack-overflow answer saying to add to manifest.yml which would also be awesome except I don’t know where/how I’d add this to that file (which is a config.yml for my flask app)

I’d love to be able to use S3 But I don’t actually know where to put that line…

More on S3 – where would I put this line?

To reiterate, it’s not this issue because I CAN find/use all nltk on my local computer

CURRENT STATUS AND WHERE TO GO FROM HERE:

  1. EC2 Flask App (v3-aws-flask running on v3-flask-env)

THINGS TO DO:

  1. Create reddit account
  2. Create matching stack overflow account
  3. Create a new environment on ec2 (done?) add NLTK (done?) put my flask app on it?
  4. Create a CRA that hits my python lambda
  5. Give up and go with heroku

RESOURCES: Similar issue AWS EB FLASK boilerplate

FOR NODE LAMBDA:

Using requests ?

FOR PYTHON LAMBDA:

** AWS Lambda Deployment package Python lambda return html botocore vendored requests – how to requests

TUTORIALS TO TRY IF ALL ELSE FAILS:

Seems v promising Reddit suggestions Python server yay Ebay scraper - using aws and lambda On Ubuntu from reddit 2

python3 -m venv v5-virt
source v5-virt/bin/activate
pip3 install flask

# CREATE ENVIRONMENT
eb init -p python-3.6 flask-tutorial-v5-env --region us-west-2
deactivate

OMG MAYBE WE DON’T NEED A PEM AND WE CAN JUST DO eb ssh

eb ssh

info here

^^^^^^^^^^^^ MOST IMPORTANT ^^^^^^^^^^^^^

How to deploy

Flask AWS

Updated: