Questions tagged [aws-sdk]

0

votes
0

answer
4

Views

How to access parameter from aws parameter store using function in lambda

I'm trying to pull a parameter value from the Parameter Store using the following code: let ssm = new AWS.SecretsManager(); emailParam = { Path: '/myPath/Service/DestinationEmail'}; destinationEmail = ssm.getParametersByPath(emailParam, function(err, data){ if(err){ console.log(err, err.stack); } e...
rlcrews
0

votes
0

answer
4

Views

aws multipart fileupload using java sdk

I am working on Highlevel multipart fileupload on aws sdk using java.But i need few clarification on below points .please help me!! 1 : What happens if there was network failure during uploading file parts?How do we re-upload ? will re-upload start from the beginning or will it get resume? 2 : Wh...
pradeep kathare
1

votes
2

answer
1.5k

Views

How to access API from AWS API Gateway with PHP SDK 3

Can anyone help figure out how to use AWS Signature, AWS Credentials and PHP SDK 3 to access an API Gateway API? It seems like AWS Signature does not actually attach headers to a Guzzle request. Here is my code:
pzzd
1

votes
2

answer
406

Views

Using batchWriteItem in dynamodb

I have two tables in my dynamo db one is candidate table and the other one is user table I want to use batchWriteItem in dynamo db in order to add the data in the table. The query which I have formatted is as follows var user = { userid: usrid, role: 'candidate', password: vucrypt.encryptpass(pass)...
Arun VM
0

votes
0

answer
8

Views

AWS SDK PHP - How to load multiple files with one link? How to create a zip file?

AWS PHP SDK I have a bucket, and there are folders with the following files: folder1 -- photo1 -- photo2 -- photo3 -- photo4 folder2 -- pic1 -- pic2 -- pic3 -- pic4 How can I create a download link for these files: photo1, photo4, pic2? Don't download files on a separate link. One more que...
1

votes
2

answer
696

Views

how to get s3 bucket size via aws-sdk (javascript or node)

I tried to find/get s3 bucket information using javascript/nodejs aws-sdk, but I didnt find such apis. How to get s3 bucket size / information via aws-sdk (javascript or node) api.
sk16
1

votes
1

answer
510

Views

How can I set a timeout in SNS publish method?

I'm using the AWS SNS service in my PHP application to send messages to a queue. If internet connection is down, the application should keep running without writing the messages. But the method that publish messages on the queue has a very long timeout, it makes the application unusable without inte...
1

votes
1

answer
2k

Views

AWS S3 get object using URL

I have a collection of URLs that may or may not belong to a particular bucket. These are not public. I'm using the nodejs aws-sdk to get them. However, the getObject function needs params Bucket and Key separately, which are already in my URL. Is there any way I can use the URL? I tried extracting t...
1

votes
2

answer
164

Views

adding aliased lambda function in cognito pool trigger drop down selection

I have created a lambda function, published a version of it and pointed that version to an alias. ARN for my lambda function: "ARN - arn:aws:lambda:aws_region:aws_id:function:function_name:production". So in cognito pool triggers, I need to assign this lambda function into "Custom message" section,...
Raj
1

votes
1

answer
207

Views

Get ARN string from s3Object

How would I be able to get Arn String from a s3object I could probably do this myself, but want to use if some methods already exists to do this.
Sumit Singh
1

votes
1

answer
129

Views

browser caching shrine s3 private attachments

I have just created a private bucket on s3, to contain user profile pictures. With a public bucket, all of the images are properly cached (previous paperclip config with same settings). I have the following shrine initializer: s3_options = { access_key_id: ENV['AWS_ACCESS_KEY_ID'], secret_access_ke...
user1213904
1

votes
1

answer
340

Views

Package Amazon.Lambda.Tools 3.0.1 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1).

I have installed dotnet tool. install --global Amazon.Lambda.Tools --version 3.0.1 and trying to use in the .net core project 2.1. I am getting this error on setting the project file. but I am getting this error. Package Amazon.Lambda.Tools 3.0.1 is not compatible with netcoreapp2.1 (.NETCoreApp,...
Tamoj
1

votes
1

answer
94

Views

A background URLSession with identifier already exists

I have an S3Service which is a singleton that manages all the S3 related uploads and downloads. When I upload the first image it works fine but if I try to upload an Image consecutively It gives me this warning and the completion block never gets called. A background URLSession with identifier com.a...
Agent Smith
1

votes
2

answer
97

Views

AWS Lambda timeout when another (long) Lambda is invoked

ers I am using Step Functions that link together multiple Lambdas. In one of these lambdas I invoke another lambda. Both lambdas have 15 min timeout. However, after some mins the primary lambda that invokes the secondary lambda times out (the secondary lambda happily continues its work). Error com.a...
helloworld
3

votes
0

answer
13

Views

S3 copy_object between regions in ruby

How to coppy files between buckets in diffrent regions in AWS S3 using ruby aws-sdk-s3 gem? Buckets are in regions: 'eu-central-1' (target_bucket) and 'eu-west-1' (source_bucket). I want to make copy of s3://source_bucket/name_base.checksum to s3://target_bucket/source_bucket/name_base.checksum Erro...
Daaniell
1

votes
1

answer
1.1k

Views

execute put item request - AWS DynamoDB ios SDK

Looked all over SO and through Amazon's docs as well, but couldn't find any solid documentation on how to make a put request using iOS SDK, specifically using Swift. I gather that I need to instantiate an AWSDynamoDBClient first (https://aws.amazon.com/articles/7439603059327617) but don't see that...
bkopp
1

votes
1

answer
4.4k

Views

Saving file to S3 using aws-sdk-go

I'm having a bit of trouble saving a file in golang with the AWS S3 go sdk (https://github.com/awslabs/aws-sdk-go). This is what I have: import ( "fmt" "bytes" "github.com/awslabs/aws-sdk-go/aws" "github.com/awslabs/aws-sdk-go/aws/awsutil" "github.com/awslabs/aws-sdk-go/service/s3" ) func main() {...
John
1

votes
2

answer
416

Views

Is there a cli command to add a database to an existing AWS/RDS instance

I am using AWS RDS database service to run mysql database service. I have read that there is no limit with Mysql in the number of databases contained in a single RDS instance. I can then use mysql -u -p -h -e "create database additional_dbname" My question is the following : Is there a cleaner way...
kha
1

votes
1

answer
2.3k

Views

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

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) produc...
zeros-and-ones
1

votes
1

answer
251

Views

Amazon SQS queue send/receive unexpected behaviour with Java SDK - what am I doing wrong?

I'm trying to interface some Java code with an SQS queue I've made on AWS. I've begun by writing a test to get the behaviour I want (i.e. writing and receiving messages) and it seems to be behaving very strangely. Here's my test code: @Test public void testMessagesAreSentToQueue() { sqs.sendMessage...
semiserious
1

votes
2

answer
1.4k

Views

Read partial video file using range from aws s3 bucket in node

Below code working fine to read file by range var path = 'assets/video/'+req.body.key; var stat = fs.statSync(path); var total = stat.size; var range = req.headers.range; var parts = range.replace(/bytes=/, "").split("-"); var partialstart = parts[0]; var partialend = parts[1]; var start = parseInt(...
user3386877
1

votes
1

answer
2.3k

Views

Changing file name while uploading to AWS S3 bucket

I am trying to upload a csv file to S3 bucket. The code runs successfully but when I check the bucket, the file with Access Key as its name is uploaded. I have to rename the file manually to check its content. Is there a way where I could rename the file programmatically only or may be the file name...
roger_that
1

votes
2

answer
5.2k

Views

AWS::S3::Errors::NoSuchKey No Such Key

I have a Rails 4 app with Paperclip running on Heroku. I recently started encountering a problem that is preventing me from updating any models with attached images. For example, any time I make a change through my site's CMS system to my Company model, the changes are not saved. I've tried changing...
Daniel Bonnell
1

votes
1

answer
871

Views

Downloading S3 Files with Rails App

I'm currently trying to understand the ins and outs of amazon's S3 webservices. The task of today is to successfully download an uploaded image (called an asset in my app). I've been loosely following the guidelines in this tutorial in an effort to perform a direct download from the amazon server...
neanderslob
1

votes
2

answer
421

Views

Enable an SNS Event Source on lambda with javascript SDK

I'm trying to create an SNS event source on a lambda using the Javascript AWS SDK. I have the following snippet: var permissionParams = { FunctionName: "MyFunction", Action: "lambda:Invoke", Principal: "sns.amazonaws.com", StatementId: "snsinvoke", SourceArn: "MyArn" }; lambda.addPermission(permissi...
Joshua Peterson
1

votes
3

answer
492

Views

Sending SMS using Amazon Web Services's SES

Is it possible to send sms using AWS's SES service. I am trying to implement this functionality using Java.
Yahiya
1

votes
1

answer
213

Views

Is there an equivalent to NoSuchKeyException in AWS SDK for PHP v3?

AWS SDK v2 used to have a specific NoSuchKeyException, which is gone in v3. This was the way then to catch a non-existing key error: try { $s3Client->getObject([ 'Bucket' => $bucket, 'Key' => $key ]); } catch (NoSuchKeyException $e) { // ... } The only exception thrown now is S3Exception, which d...
Benjamin
1

votes
1

answer
436

Views

AWS S3 - ListObjects returns incomplete directory listings

I using ListObject function without any delimiters, and as result I have something which look like: /BF /BF/FTP /BF/MUSIC/LIBRARY/AUDITION/BEAKING%20EARLY.MP3 /BF/VIDEO/ /BF/VIDEO/Example /BF/VIDEO/Example/test.mp4 The problem in the music folder. Why ListObjects doesn't return S3Object with key: "/...
neustart47
1

votes
1

answer
2.1k

Views

AWS S3 copy object source key and destination key

I am writing JAVA code to copy object within AWS S3. CopyObjectRequest copyObjRequest = new CopyObjectRequest(srcbucket, srcKey, destbucket, destKey); s3Client.copyObject(copyObjRequest); What is source key and destination key? I read a lot in theory but no where it is mentioned that f...
Ajay
1

votes
1

answer
793

Views

How to get root path “/” Resource from AWS Api Gateway?

I've been trying to retrieve the Resource with the path "/" (the root) from AWS Api Gateway using the Nodejs AWS SDK. I know the naïve solution would be to do it this way: var AWS = require('aws-sdk'); var __ = require('lodash'); var Promise = require('bluebird'); var resources = []; var apiGatew...
macareno.marco
1

votes
2

answer
199

Views

How can I migrate DNS records from my service provider to amazon route 53?

I want to transfer my all my DNS records from my service provider to amazon route 53. Currently i have almost 2500 records with my current DNS server. My service provider have provided me a zone file from bind server. Is there any script to add all these record in a single go to route 53 ?
Ajinkya_Joshi
1

votes
1

answer
39

Views

AWS API to Check if Image is used by AutoScalingGroup

I was wondering if there's anyway to check if an EC2 Image is being used by an AutoScalingGroup via the AWS SDK?
Darren
1

votes
1

answer
136

Views

How do I delete all “children” of an object in my bucket?

Assume the following files exist in my bucket on S3 mybucket/folder1/folder2/myfile.txt mybucket/folder1/folder2/myfile2.txt mybucket/folder1/folder4/myfile3.txt What I would like to do is delete all files that live under mybucket/folder1/folder2/ without actually knowing exactly what files are ther...
Sinaesthetic
1

votes
1

answer
323

Views

Determine if aws-sdk is has global credentials configured

From the information provided in the AWS SDK config guide there are multiple ways to configure the SDK: Loaded from IAM roles for Amazon EC2 (if running on EC2), Loaded from the shared credentials file (~/.aws/credentials), Loaded from environment variables, Loaded from a JSON file on disk, Hardcode...
developerjack
1

votes
1

answer
3.5k

Views

DynamoDB UpdateException: Type mismatch for attribute to update

I have the following record in DynamoDB: { "BusinessNo": { "N": "12345" }, "Metadata": { "M": { "MimeType": { "S": "audio/wav" }, "FileName": { "S": "00032329.wav" }, "CustomC": { "S": "baz" }, "CustomA": { "S": "foo" }, "CustomB": { "S": "bar" }, "Size": { "S": "3992020323" } } }, "Id": { "S": "f0d...
Mark J Miller
1

votes
1

answer
1.2k

Views

AWS - import JSON file to load Dynamo table

I have a json file that I want to use to load my Dynamo table in AWS. In the AWS console, there is only an option to create one record at a time. Not good: ) Essentially my .JSON file is an array of objects which hold the data for each column in the table ie: { "Column1": "Column1 Value", "Column...
29er
0

votes
0

answer
4

Views

NetworkingError (EPIPE) while uploading big files into S3 bucket

I am trying to uploading a large size video file into an S3 bucket. It works when I am uploading an Image (small size files), but I am getting the following error when I uploaded large video files into an S3 bucket. (NetworkingError) Error Message: Upload part error: { Error: write EPIPE at WriteWra...
Arun
2

votes
0

answer
220

Views

How enable force global bucket access in aws s3 sdk java 2.0?

Here is a link to the documentation for java 3 sdk version 1. Does version 2.0 has something similar or they removed such option?
Cherry
1

votes
1

answer
979

Views

S3 download pdf - REST API

I am trying to serve one of my PDF stored on S3 using Spring Boot Rest API. Following is my code : byte[] targetArray = null; InputStream is = null; S3Object object = s3Client .getObject(new GetObjectRequest("S3_BUCKET_NAME", "prefixUrl")); InputStream objectData = object.getObjectContent(); Buffere...
0

votes
0

answer
7

Views

Headers already sent in aws-sdk-php

In below function of described file I am getting error as Headers already sent in /vendor/aws/aws-sdk-php/src/TraceMiddleware.php $this->config = $config + [ 'logfn' => function ($value) { echo $value; } ]; Can I change from echo to return? I am using php7.2 and yii2 framework
Vatsal Patel

View additional questions