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

5390 questions
147
votes
21 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
  • 1,996
  • 4
  • 15
  • 23
145
votes
14 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,451
  • 2
  • 8
  • 3
143
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
  • 13,374
  • 29
  • 103
  • 174
103
votes
7 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,213
  • 2
  • 10
  • 10
101
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,237
  • 4
  • 17
  • 26
95
votes
7 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 Tibbetts
  • 4,408
  • 6
  • 35
  • 69
93
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
  • 2,535
  • 5
  • 25
  • 37
80
votes
4 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
  • 3,137
  • 2
  • 36
  • 70
71
votes
2 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
  • 11,044
  • 31
  • 100
  • 173
68
votes
9 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…
64
votes
6 answers

AmazonS3Client(credentials) is deprecated

I'm trying to read the files available on Amazon S3, as the question explains the problem. I couldn't find an alternative call for the deprecated constructor. Here's the code: private String AccessKeyID = "xxxxxxxxxxxxxxxxxxxx"; private String…
Asif Ali
  • 1,272
  • 2
  • 9
  • 27
61
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
  • 852
  • 2
  • 8
  • 12
55
votes
7 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
  • 859
  • 1
  • 8
  • 12
52
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,043
  • 1
  • 8
  • 18
50
votes
2 answers

AWS lambda invoke not calling another lambda function - Node.js

After giving all the rights to invoke function. My Lambda function is not able to invoke another function . Every time I am getting timeout having 30 seconds timeout issue. It looks like lambda is not able to get another lambda function My lambdas…
Arpit Vaishnav
  • 4,487
  • 6
  • 34
  • 52
1
2 3
99 100