Skip to content
Advertisement

Tag: amazon-web-services

MRJob: I’m having a client error while using EMR

I’m a newbie in mrjob and EMR and I’m still trying to figure out how things work. So I’m having this error when I’m running my script: python3 MovieSimilarities.py -r emr –items=ml-100k/u.item ml-100k/u.data > sims2t.txt Here’s the code: Here’s the link to get the data: files.grouplens.org/datasets/movielens/ml-100k.zip I have exported my aws_access_key_id and aws_secret_access_key in my .bashrc and restarted my shell.

Unable to import module ‘lambda_function’: No module named *

I am trying to run a python lambda function that uses additional packages. However whenever I upload the .zip file to the lambda console I get the error: I followed these instructions: https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-dependencies which told me to make sure my packages were in a directory local to my lambda function: I am not using Pillow. This is sample code from

AWS lambda expected intended block error in Python

I am following the below document to connect to Cloudwatch logs to ELK. https://medium.com/@sohit_kumar/streaming-aws-cloudwatch-logs-to-your-own-elk-logging-solution-2bbd32f25100 I get a “expected an indented block” syntax error in python for this line. try: logs = awslogs_handler(s, event) Can someone help me figure this out? Not sure what im missing. Thanks! Answer You need to use something like this: An indent block(contains four whitespaces) are

Serving static files in elastick beanstalk

I’m deploying a python3 flask application in aws elasitc beanstalk (Amazon Linux 2 platform). The folder structure is as follows: In the template files, importing of static resources are defiled as: i.e. JS file: In the EB configurations, I’ve defined the static resources as below But the problem is, these resources are not loading and giving 404. i.e.: https://example.com/static/js/jquery.js cannot

Advertisement