Questions tagged [amazon-javascript-sdk]

Amazon JavaScript sdk let's you use Amazon web services directly from the client side browser without having to write a server layer that was traditionally used to consume AWS. This SDK allows you to bypass scaling the server layer.

Amazon javascript sdk let's you use Amazon web services directly from the client side browser without having to write a server layer that was traditionally used to consume AWS. This SDK allows you to bypass scaling the server layer.

27 questions
21
votes
10 answers

AWS Cognito Invalid identity pool configuration

I am using the AWS Javascript API and trying to get the assigned cognito id: AWS.config.credentials.get(function(err) { if (!err) { console.log("Cognito Identity Id: " + AWS.config.credentials.identityId); } }); Why does this result…
drfence
  • 1,487
  • 2
  • 17
  • 29
12
votes
2 answers

AWS Lambda attached to S3 ObjectCreated event returns "NoSuchKey: The specified key does not exist:

I am uploading a file from Android device to S3 bucket via this code TransferUtility trasnferManager = new TransferUtility(s3, context); trasnferManager.upload(..,..,..); After that I have a lambda trigger attached to S3:ObjectCreated event. When…
bpavlov
  • 1,080
  • 12
  • 32
6
votes
1 answer

Check if File Exists on AWS S3 Using Browser JavaScript SDK?

I recently changed the naming convention for a file in my job folders. Since I need to support both the new naming convention and the old naming convention when a user tries to download the specific file, I need to check if the new naming standard…
Lloyd Banks
  • 35,740
  • 58
  • 156
  • 248
5
votes
1 answer

User Pool and Federated Identity

I am trying to use the AWS Javascript sdk to provide login capabilities to a web app. I have a Cognito User Pool set up and have accounts registering, verifying and logging in correctly. Identities are being created in the identity pool, but I…
Hal
  • 1,229
  • 11
  • 26
4
votes
1 answer

AWS S3 Javascript SDK Resend Request Failure

I am using AWS S3 Javascript sdk to upload files to my S3 bucket via my browser. I had no problem fetching files or uploading small and even huge files with the multi-part upload normally. The issue I faced was while uploading a huge file and lost…
2
votes
1 answer

How do I write an item to a DynamoDb with the AWS DynamoDB DocumentClient?

I'm having trouble with the AWS DynamoDb JS SDK v2.4.9. I want to use the DocumentClient class as opposed to the lower level DynamoDb class, but can't get it working. This works: function testPutItem( callback ) { var tableName = 'todos'; …
pitachip
  • 965
  • 3
  • 7
  • 24
2
votes
0 answers

Amazon S3 javascript sdk for Browser throwing 403 error

I am using Amazon s3 javascript sdk for one of my applications. I am getting the following error: XMLHttpRequest cannot load https://s3.amazonaws.com/. Response for preflight has invalid HTTP status code 403 I see that the preflight requests are…
UnderWood
  • 803
  • 3
  • 12
  • 23
1
vote
0 answers

CognitoIdentityCredentials is not authorized to perform ssm:GetParameter on resource: using @aws-sdk v3

I am trying to get parameters in AWS Parameter Store using @aws-sdk v3 with cognito unauthenticated identity pool like this: import { SSMClient, GetParameterCommand } from "@aws-sdk/client-ssm"; import { fromCognitoIdentityPool } from…
1
vote
0 answers

how set AWS global sdk configuration in Vue?

I'm building a Vue SPA, that connects with some AWS services in the backend, and I need to globally configure the AWS SDK using a region and some credentials provided via STS. The problem is that after I call AWS.config.update inside my…
1
vote
1 answer

AWS Lambda s3.putObject throws Access Denied when setting ACL field

Update: Found the answer, thanks. I'm setting up a lambda that periodically fetches some data, does some processing and saves a file to s3. This is the function: exports.handler = async function(event, context) { const data = await…
1
vote
1 answer

execute-api with Cognito federated identities from Cognito user pools

I want to execute APIs hosted on AWS API gateway using identity I created from Cognito federated identities with Cognito user pool as provider. Basically option 2 in this blog here Secure API Access with Amazon Cognito Federated Identities, Amazon…
1
vote
1 answer

Access-control-allow-origin on aws javascript sdk getSignedUrl operation?

Is it possible to set access-control-allow-origin on getSignedUrl operation for a S3 object? I have been looking out for a list of available params from the aws documentation but it's unclear. Update: Suppose I have an object "test-file.jpg" in a…
1
vote
2 answers

Email cannot be auto verified, when user is not being auto confirmed

So I use lambda pre signup tigger in Cognito to do custom email. When I try to set autoVerifyEmail=true I get the fowllowing error: Phone or email cannot be auto verified, when user is not being auto confirmed. so what's the point of this lambda…
1
vote
3 answers

How to list AWS S3 buckets using amazon-javascript-sdk?

I need to get a list of buckets having the client accessKeyId and secretAccessKey. From the docs I understood that I have to update de configurations of AWS, create a new S3 object, then call on it the listBuckets() function with the callback. So,…
0
votes
1 answer

Upload file to s3 in front-end with JavaScript AWS SDK on django

I have a djnago app and I want to upload files in the front end to by pass heroku timeout. I can’t get my code to work.