Questions tagged [aws-sdk]

The software development kit for use with the Amazon Web Services API.

The AWS SDK provides a language/platform-specific interface for API access to AWS services. For CLI access, see or .

Usage Guidance

  • Use the language/platform you're working on. For example, if you're using the Go SDK, tag your question with both . If the tag exists for a specific language, like , or — use it as well.
  • Do not use this tag for AWS CLI questions. Use instead.
  • Do not use this tag for AWS Tools for PowerShell questions. Use instead.

SDKs

An SDK is available in the following languages/platforms:

Links

AWS SDK Code Samples/Examples

6213 questions
190
votes
19 answers

Configuring region in Node.js AWS SDK

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:…
Anejah Daniels
  • 1,901
  • 2
  • 10
  • 4
185
votes
3 answers

Technically what is the difference between s3n, s3a and s3?

I'm aware of the existence of https://wiki.apache.org/hadoop/AmazonS3 and the following words: S3 Native FileSystem (URI scheme: s3n) A native filesystem for reading and writing regular files on S3. The advantage of this filesystem is that you can…
Hello lad
  • 17,344
  • 46
  • 127
  • 200
173
votes
25 answers

The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256

I get an error AWS::S3::Errors::InvalidRequest The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. when I try upload file to S3 bucket in new Frankfurt region. All works properly with US Standard…
Alexey
  • 2,326
  • 5
  • 17
  • 27
143
votes
10 answers

Append data to an S3 object

Let's say that I have a machine that I want to be able to write to a certain log file stored on an S3 bucket. So, the machine needs to have writing abilities to that bucket, but, I don't want it to have the ability to overwrite or delete any files…
Theodore
  • 1,683
  • 2
  • 12
  • 13
138
votes
14 answers

How to get response from S3 getObject in Node.js?

In a Node.js project I am attempting to get data back from S3. When I use getSignedURL, everything works: aws.getSignedUrl('getObject', params, function(err, url){ console.log(url); }); My params are: var params = { Bucket:…
Sara Fuerst
  • 5,688
  • 8
  • 43
  • 86
131
votes
16 answers

How to check if a specified key exists in a given S3 bucket using Java

I would like to check if a key exists in a given bucket using Java. I looked at the API but there aren't any methods that are useful. I tried to use getObject but it threw an exception.
in His Steps
  • 3,075
  • 6
  • 30
  • 38
113
votes
5 answers

Nodejs - Invoke an AWS.Lambda function from within another lambda function

I have the following function which I use to invoke a Lambda function from within my code. However when I try to use it within a Lambda function, I get the following error: AWS lambda undefined 0.27s 3 retries] invoke({ FunctionName:…
hyprstack
  • 4,043
  • 6
  • 46
  • 89
104
votes
25 answers

Swift Xcode Index Freezing or Slow

Maybe this is just me experiencing such an annoying "feature": After upgrading from Xcode 6.0.1 to Xcode 6.1, things changed. Xcode 6.1 is forever indexing the project or compiling source files. The project is not a huge one. It just contains a…
leonard
  • 2,337
  • 4
  • 22
  • 26
99
votes
6 answers

How enable access to AWS STS AssumeRole

I am getting an error when calling to assume role method of STS. It says that the user is not authorized to perform sts:AsumeRole on resource xxx. I did the following: I created a role to access to S3 bucket. I ran a test over policy simulator and…
Vladimir Venegas
  • 3,894
  • 5
  • 25
  • 45
95
votes
11 answers

The role defined for the function cannot be assumed by Lambda

I'm getting the error "The role defined for the function cannot be assumed by Lambda" when I'm trying to create a lambda function with create-function command. aws lambda create-function --region us-west-2 --function-name HelloPython …
Midhun Sudhakar
  • 1,238
  • 2
  • 10
  • 14
87
votes
11 answers

AWS Java SDK - Unable to find a region via the region provider chain

I have gone through the question titled "Setting the AWS region programmatically 1" but it doesn't provide all the answers I need. Q1: I'm getting a SDKClientException-Unable to find a region via the region provider chain. What am I doing wrong? or…
Codistan
  • 1,469
  • 1
  • 13
  • 17
84
votes
10 answers

AWS SDK for PHP: Error retrieving credentials from the instance profile metadata server

I am trying to send SNS messeges to android through web api. Downloaded and installed the SDK from http://aws.amazon.com/developers/getting-started/php/ Got following error while running sample.php: Fatal error: Uncaught exception…
82
votes
5 answers

What's the difference between BatchGetItem and Query in DynamoDB?

I've been going through AWS DynamoDB docs and, for the life of me, cannot figure out what's the core difference between batchGetItem() and Query(). Both retrieve items based on primary keys from tables and indexes. The only difference is in the size…
suv
  • 1,373
  • 1
  • 10
  • 18
81
votes
3 answers

How to use Async and Await with AWS SDK Javascript

I am working with the AWS SDK using the KMS libary. I would like to use async and await instead of callbacks. import AWS, { KMS } from "aws-sdk"; this.kms = new AWS.KMS(); const key = await this.kms.generateDataKey(); However this does not work,…
Kay
  • 17,906
  • 63
  • 162
  • 270
80
votes
8 answers

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

I want to delete a file from Amazon S3 using JavaScript. I have already uploaded the file using JavaScript. How can I delete it?
user3335960
  • 835
  • 1
  • 6
  • 6
1
2 3
99 100