aws

The AWS Access Key Id does not exist in our records

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I created a new Access Key and configured that in the AWS CLI with aws configure . It created the .ini file in ~/.aws/config . When I run aws s3 ls it gives: A client error (InvalidAccessKeyId) occurred when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records. AmazonS3FullAccess policy is also attached to the user. How to fix this? 回答1: It might be happening that you have the old keys exported via env variables (bash_profile) and since the env variables have higher precedence over credential

从S3中拷贝或同步文件

送分小仙女□ 提交于 2019-12-03 02:12:02
/*--> */ /*--> */ 从S3 中拷贝以.kml 结尾的文件到本地的/data/videos/test 目录 aws s3 cp s3://***** /data/videos/test ---recursive --exclude "*" --include '*.kml' 同步文件 aws s3 sync s3://***** --exclude '*' --include '2017-09-22*' 来源: https://www.cnblogs.com/mianbaoshu/p/11770817.html

AWS物联网解决方案之:如何将设备安全地接入AWS IoT

瘦欲@ 提交于 2019-12-03 02:08:32
1 简介 AWS IoT解决方案是一个全托管的云平台,使互联设备可以轻松安全地与云应用程序及其他设备交互。AWS IoT可以支持数十亿太设备和数万亿条消息,并且可以对这些消息进行处理并将其安全可靠地路由至AWS终端节点和其他设备。AWS IoT平台支持您将设备连接到AWS服务和其他设备,保证数据和交互的安全,处理设备数据并对其执行操作,以及支持应用程序与即便处于离线状态的设备进行交互。 使用AWS IoT的第一步是将设备连接到AWS IoT Core服务。AWS IoT支持多种接入协议,身份认证方法和授权策略。 2 AWS IoT支持的协议 设备要接入AWS IoT,首先要使用AWS IoT支持的协议来跟IoT平台交互。 2.1 HTTP协议 http协议是互联网中最为常见的协议。http协议支持后面提到的所有认证和授权方式。但是在物联网的场景中,它也有协议开销比较大等确定,另外http只有请求响应的模式不支持物联网场景中非常重要的订阅模式,不能支持下行命令的下发。 2.2 MQTT协议 MQTT协议是物联网场景中使用最为广泛的协议,具有协议开销小,支持发布订阅等所有模式的有点。 2.3 MQTT over WEBSOCKET MQTT over websocket是基于websocket上的MQTT协议,使用443端口,在网络环境可达性上比MQTT更有优势,但是也相对复杂一些。

Can bash script be written inside a AWS Lambda function

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can I write a bash script inside a Lambda function? I read in the aws docs that it can execute code written in Python, NodeJS and Java 8. It is mentioned in some documents that it might be possible to use Bash but there is no concrete evidence supporting it or any example 回答1: Something that might help, I'm using Node to call the bash script. I uploaded the script and the nodejs file in a zip to lambda, using the following code as the handler. exports.myHandler = function(event, context, callback) { const execFile = require('child_process')

Send emails from AWS EC2 instance (SES mandatory?)

匿名 (未验证) 提交于 2019-12-03 01:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I write this post just to see if I can get some clarifications regarding email sending concepts in an AWS EC2 instance. This is related with this other post Rails does not send emails on AWS When I deploy to my production environment (AWS EC2 instance). This functionality is not working. You can see the error details in the post I provided above. The error is related with some smtp connection refused . So, I have read some other posts but Im confused. Is it mandatory to use the AWS SES service in order to send emails from EC2

How to deploy structured Flask app on AWS elastic beanstalk

匿名 (未验证) 提交于 2019-12-03 01:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: After successfully deploying a test app using the steps outlined here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_flask.html I tried to deploy my actual flask application which has the following structure: myApp/ runServer.py requirements.txt myApp/ __init__.py helpers.py clean.sh static/ myApp.css handlers/ __init__.py views.py templates/ layout.html viewOne.html viewTwo.html Where views.py contains my url mappings. I have tried initializing the eb instance in the root directory as well as within the myApp

Configuring region in Node.js AWS SDK

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can someone explain how to fix a missing config error with Node.js? I've followed all the examples from the aws doc page but I still get this error no matter what. { [ConfigError: Missing region in config] message: 'Missing region in config', code: 'ConfigError', time: Wed Jun 24 2015 21:39:58 GMT-0400 (EDT) }>{ thumbnail: { fieldname: 'thumbnail', originalname: 'testDoc.pdf', name: 'testDoc.pdf', encoding: '7bit', mimetype: 'application/pdf', path: 'uploads/testDoc.pdf', extension: 'pdf', size: 24, truncated: false, buffer: null } } POST /

AWS S3 Java SDK - Access Denied

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to access a bucket and all its object using AWS SDK but while running the code i am getting an error as Exception in thread "main" com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: X), S3 Extended Request ID: Y= Kindly suggest, where i am lacking and why access denied error is occurring although i have taken all following permission to the bucket: s3:GetObject s3:GetObjectVersion s3:GetObjectAcl s3:GetBucketAcl s3:GetBucketCORS s3

How to upload image to AWS S3 in PHP from memory?

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So I currently have an upload system working using AWS S3 to upload images. Here's the code: //Upload image to S3 $s3 = Aws\S3\S3Client::factory(array('key' => /*mykey*/, 'secret' => /*myskey*/,)); try { $s3->putObject(array( 'Bucket' => "bucketname", 'Key' => $file_name, 'Body' => fopen(/*filelocation*/, 'r+') )); } catch(Exception $e) { //Error } This image can be a jpeg or png, and I want to convert it to a png before uploading. To do this I use: //This is simplified, please don't warn about transparency, etc. $image =

MQTT in AWS Lambda function for Alexa Javascript

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Please help, I need to use mqtt protocol in lambda function to send some data to a broker. I use simple code to test it : mqtt = require ( 'mqtt' ); var client = mqtt . connect ( 'mqtt://test.mosquitto.org' ); client . on ( 'connect' , function () { client . subscribe ( 'presence' ); client . publish ( 'presence' , 'Hello mqtt' ); }); client . on ( 'message' , function ( topic , message ) { // message is Buffer console . log ( message . toString ()); client . end (); }); But I get an error "Cannot find module 'mqtt'", how can I