aws-sdk

AWS Lambda response in Java for Cognito

我只是一个虾纸丫 提交于 2020-01-14 05:45:26
问题 How can I write an "AWS Lambda response" in Java so that Cognito is happy? Something like this is passed to the lambda function { "version": number, "triggerSource": "string", "region": AWSRegion, "userPoolId": "string", "callerContext": { "awsSdkVersion": "string", "clientId": "string" }, "request": { "userAttributes": { "string": "string", .... } }, "response": {} } Now I need to make the response in Java.. and send back to Cognito. At the moment Cognito throws an

Configuring AWS S3 Client in .NET Core

别等时光非礼了梦想. 提交于 2020-01-13 18:11:30
问题 I'm following this guide on configuring the AWS SDK in .NET Core to upload a file to an S3 bucket. My app.settings.json file contains this: { "AWS": { "Region": "us-west-1", "AccessKey": "access_key", "SecretKey": "secret_key" } ... } Here is my StartUp class: public class Startup { public IContainer ApplicationContainer { get; private set; } public IConfiguration Configuration { get; } public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env

Configuring AWS S3 Client in .NET Core

孤者浪人 提交于 2020-01-13 18:11:10
问题 I'm following this guide on configuring the AWS SDK in .NET Core to upload a file to an S3 bucket. My app.settings.json file contains this: { "AWS": { "Region": "us-west-1", "AccessKey": "access_key", "SecretKey": "secret_key" } ... } Here is my StartUp class: public class Startup { public IContainer ApplicationContainer { get; private set; } public IConfiguration Configuration { get; } public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env

Configuring AWS S3 Client in .NET Core

ε祈祈猫儿з 提交于 2020-01-13 18:11:05
问题 I'm following this guide on configuring the AWS SDK in .NET Core to upload a file to an S3 bucket. My app.settings.json file contains this: { "AWS": { "Region": "us-west-1", "AccessKey": "access_key", "SecretKey": "secret_key" } ... } Here is my StartUp class: public class Startup { public IContainer ApplicationContainer { get; private set; } public IConfiguration Configuration { get; } public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env

Laravel 5.1 AWS SDK proper credentials setup: exception 'Aws\Exception\CredentialsException'

独自空忆成欢 提交于 2020-01-13 06:31:12
问题 I am working on a Laravel 5.1 App Using this package: "aws/aws-sdk-php-laravel": "~3.0" I am trying to properly setup a local environment and a production environment. I keep getting this error when trying to send mail on production server: (My .env file is gitignored and only exists locally) production.ERROR: exception 'Aws\Exception\CredentialsException' with message 'Error retrieving credentials from the instance profile metadata server. Ran php artisan vendor:publish My .env file look

How many bits of integer data can be stored in a DynamoDB attribute of type Number?

别来无恙 提交于 2020-01-13 06:12:49
问题 DynamoDB's Number type supports 38 digits of decimal precision. This is not big enough to store a 128-bit integer which would require 39 digits. The max value is 340,282,366,920,938,463,463,374,607,431,768,211,455 for unsigned 128-bit ints or 170,141,183,460,469,231,731,687,303,715,884,105,727 for signed 128-bit ints. These are both 39-digit numbers. If I can't store 128 bits, then how many bits of integer data can I store in a Number ? 回答1: DynamoDB attribute of type Number can store 126-bit

How do I delete an object on AWS S3 using Javascript?

点点圈 提交于 2020-01-11 19:58:17
问题 I want to delete a file from Amazon S3 using Javascript. I have already uploaded the file using Javascript. Any ideas? 回答1: You can use the JS method from S3: var AWS = require('aws-sdk'); AWS.config.loadFromPath('./credentials-ehl.json'); var s3 = new AWS.S3(); var params = { Bucket: 'your bucket', Key: 'your object' }; s3.deleteObject(params, function(err, data) { if (err) console.log(err, err.stack); // error else console.log(); // deleted }); Be aware that S3 never returns it the object

How do I delete an object on AWS S3 using Javascript?

不羁岁月 提交于 2020-01-11 19:58:13
问题 I want to delete a file from Amazon S3 using Javascript. I have already uploaded the file using Javascript. Any ideas? 回答1: You can use the JS method from S3: var AWS = require('aws-sdk'); AWS.config.loadFromPath('./credentials-ehl.json'); var s3 = new AWS.S3(); var params = { Bucket: 'your bucket', Key: 'your object' }; s3.deleteObject(params, function(err, data) { if (err) console.log(err, err.stack); // error else console.log(); // deleted }); Be aware that S3 never returns it the object

untarring files to S3 fails, not sure why

a 夏天 提交于 2020-01-11 04:03:09
问题 (new information below) I am trying to set up a lambda function that reacts to uploaded tgz files by uncompressing them and writing the results back to S3. The unzip and untar work fine, but uploading to S3 fails: /Users/russell/lambda/gzip/node_modules/aws-sdk/lib/s3/managed_upload.js:350 var buf = self.body.read(self.partSize - self.partBuffer.length) || ^ TypeError: undefined is not a function at ManagedUpload.fillStream (/Users/russell/lambda/gzip/node_modules/aws-sdk/lib/s3/managed

Amazon S3: How to get a list of folders in the bucket?

て烟熏妆下的殇ゞ 提交于 2020-01-10 19:41:09
问题 All that I found, it's this method GET Bucket But I can't understand how can I get only a list of folders in the current folder. Which prefix and delimiter I need to use? Is that possible at all? 回答1: For the sake of example, assume I have a bucket in the USEast1 region called MyBucketName , with the following keys: temp/ temp/foobar.txt temp/txt/ temp/txt/test1.txt temp/txt/test2.txt temp2/ Working with folders can be confusing because S3 does not natively support a hierarchy structure --