aws

Unable to use any 3rd party module with AWS Lambdas

匿名 (未验证) 提交于 2019-12-03 02:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on a lambda that makes use of modules (async, request, etc) Unable to import module 'index': Error at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/var/task/index.js:1:63) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) Sample code: var

How to setup django-compressor on heroku, offline compression to S3

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I followed every QA suggestions found on SO and in different blogs, Everything works ok on my dev machine and nothing works on heroku. here are my settings: DEFAULT_FILE_STORAGE = 'arena.utils.MediaRootS3BotoStorage' # media files # storage AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID') AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME') AWS_PRELOAD_METADATA = True # necessary to fix manage.py collectstatic command to only upload changed files instead of

Using aws-sdk with angular2

匿名 (未验证) 提交于 2019-12-03 02:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to get my Angular2 app to allow me to read and write to an s3 bucket on my AWS account. In AngularJS (and most other things) we used the aws-sdk so I'm assuming that the same thing will be able to be done for Angular2 also. The problem I'm having though is getting the aws-sdk to import correctly into my project. I've installed it via npm install aws-sdk I've tried to import it using import * as AWS from 'aws-sdk/dist/aws-sdk', import * as AWS from 'aws-sdk', import AWS from 'aws-sdk' import AWS from 'aws-sdk/dist/aws-sdk' but it

AWS API Gateway: limit requests from a single IP

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Does AWS API Gateway allows limiting a number of requests from a single IP? I'm building a public API and would like to prevent it from being abused by establishing a limit on a number of times the API can be called from a single IP address (like 100 requests per minute). Thanks, 回答1: AWS API Gateway does not offer the functionality that you are looking for but there is a workaround. What you can do is Integrate AWS API gateway with AWS Cloud Front and use AWS Web Application Firewall Rules to limit the API call from a Specific IP address.

Pandas in AWS lambda gives numpy error

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been trying to run my code in AWS Lambda which imports pandas. So here is what I've done. I have a python file which contains a simple code as follows(This file has the lambda handler) import json print('Loading function') import pandas as pd def lambda_handler(event, context): return "Welcome to Pandas usage in AWS Lambda" I have zipped this python file along with numpy, pandas and pytz libraries as a deployment package (Did all these in Amazon EC2 linux machine) Then uploaded the package into S3 Created a lambda function(runtime

AWS S3: The bucket you are attempting to access must be addressed using the specified endpoint

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to delete uploaded image files with the AWS-SDK-Core Ruby Gem. I have the following code: require 'aws-sdk-core' def pull_picture(picture) Aws.config = { :access_key_id => ENV["AWS_ACCESS_KEY_ID"], :secret_access_key => ENV["AWS_SECRET_ACCESS_KEY"], :region => 'us-west-2' } s3 = Aws::S3::Client.new test = s3.get_object( :bucket => ENV["AWS_S3_BUCKET"], :key => picture.image_url.split('/')[-2], ) end However, I am getting the following error: The bucket you are attempting to access must be addressed using the specified endpoint.

Enable Lambda function to an S3 bucket using cloudformation

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: We are creating an S3 bucket using a CloudFormation template. I would like to associate (Add an event to S3 bucket) a Lambda function whenever a file is added to the S3 bucket. How is it possible through CloudFormation templates. What are the properties which needs to be used in CloudFormation. 回答1: Here's a complete, self-contained CloudFormation template that demonstrates how to trigger a Lambda function whenever a file is added to an S3 bucket: Description : Upload an object to an S3 bucket , triggering a Lambda event ,

EC2 API Error validating access credential

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I installed the ec2 api following the amazon guide. I setted up the access id and secret as environment variable. Here it is my profile: export AWS_ACCESS_KEY=XXXXX export AWS_SECRET_KEY=XXXXXX export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre export EC2_HOME=/usr/local/ec2/ec2-api-tools-1.7.1.0 export PATH=$PATH:$EC2_HOME/bin Everythings looks configured as asked, but i can't connect to aws. Here the output of the command ec2-describe-regions in verbose mode: Client.AuthFailure: AWS was not able to validate the provided access

AWS Missing credentials when i try send something to my S3 Bucket (Node.js)

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hei! I'm having this issue since yesterday, and I'm having trouble for find a solution. I'm trying to send somethings to my S3 bucket, but this message appear in my console when i try: { [CredentialsError: Missing credentials in config] message: 'Missing credentials in config', code: 'CredentialsError', errno: 'Unknown system errno 64', syscall: 'connect', time: Thu Oct 09 2014 14:03:56 GMT-0300 (BRT), originalError: { message: 'Could not load credentials from any providers', code: 'CredentialsError', errno: 'Unknown system errno 64',

Connect to MySQL on AWS from local machine

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to set up a dev environment on my local machine that accesses a MySQL DB on AWS, but I keep getting a "Can't connect" message. mysql_connect('xxx.xxx.xxx.xxx:3306', 'USERNAME', 'PASSWORD'); I also commented out the bind-address in the my.cnf file, and granted permissions to the IP address that is connecting. Anyone ever successfully get this working? 回答1: I suppose this is firewalled by Amazon, try using a SSH tunnel: http://blogs.oracle.com/divyen/entry/connecting_mysql_server_on_amazon Note: Do not open MySQL to the public