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
34
votes
9 answers

"Could not load credentials from any providers" while using dynamodb locally in Node

im setting up a dynamodb locally to test with my Node app. To set it up i just plain out copied the code from here and adjusted it for my needs. This is the code: var AWS = require("aws-sdk"); var config = ({ "apiVersion": "2012-08-10", …
34
votes
4 answers

DynamoDB : SET list_append not working using aws sdk

I need to append a string to a string set in a dynamodb table using the corresponding key. This is the Update expression I use to do updateItem : var params = { "TableName" : tableName, "Key": { "ID": { S: "20000" } …
void
  • 2,403
  • 6
  • 28
  • 53
33
votes
8 answers

AWS Amplify, how to check if user is logged in?

I've been using the aws-amplify library with ionic and was wondering how I would check if a user is logged in? I'm coming from a firebase background so this is quite different. This is so that I can grant access to certain pages based on the user's…
NeXtMaN_786
  • 661
  • 2
  • 12
  • 23
33
votes
1 answer

Query on non-key attribute

It appears that dynamodb's query method must include the partition key as part of the filter. How can a query be performed if you do not know the partition key? For example, you have a User table with the attribute userid set as the partition key.…
KJ Price
  • 5,774
  • 3
  • 21
  • 34
32
votes
6 answers

How to get Task ID from within ECS container?

Hello I am interested in retrieving the Task ID from within inside a running container which lives inside of a EC2 host machine. AWS ECS documentation states there is an environment variable ECS_CONTAINER_METADATA_FILE with the location of this data…
code
  • 5,294
  • 16
  • 62
  • 113
31
votes
10 answers

AWS S3 Generating Signed Urls ''AccessDenied''

I am using NodeJs to upload files to AWS S3. I want the client to be able to download the files securely. So I am trying to generate signed URLs, that expire after one usage. My code looks like this: Uploading const s3bucket = new AWS.S3({ …
Florian Ludewig
  • 4,338
  • 11
  • 71
  • 137
31
votes
8 answers

Cannot read credentials from /.aws/credentials - PHP script call AWS-SDK

I've looked at every answer on here and it seems my problem is a little different or there hasn't been a proper solution. I'm doing the following in my PHP file: use Aws\Route53\Route53Client; $client = Route53Client::factory(array( 'profile'…
Justin H
  • 371
  • 1
  • 3
  • 7
29
votes
4 answers

How to redirect after confirm amazon cognito using confirmation URL?

I want to redirect to a specific url after the user confirmation in amazon cognito. When a user sign up he will get confirmation mail with a verification link as…
Richardson. M
  • 852
  • 2
  • 17
  • 28
29
votes
5 answers

Buffer implementing io.WriterAt in go

I'm using the aws-sdk to download a file from an s3 bucket. The S3 download function want's something that implements io.WriterAt however bytes.Buffer doesn't implement that. Right now I'm creating a file which implements io.WriterAt but I'd like…
Onestay
  • 458
  • 1
  • 5
  • 12
29
votes
3 answers

S3 Policy to Allow Lambda

I have the following policy on an S3 bucket created with the AWS policy generator to allow a lambda, running with a specific role, access to the files in the bucket. However, when I execute the Lambda, I get 403 permission denied: "errorMessage":…
FiguringThisOut
  • 810
  • 2
  • 9
  • 18
29
votes
5 answers

Attempting to decrypt ciphertext within a Lambda function using KMS results in timeout

When decrypting ciphertext from the command line using the AWS CLI, the ciphertext gets decrypted without issues: $ aws kms decrypt --ciphertext-blob fileb://encrypted-secrets --output text --query Plaintext --region us-east-1 | base64 --decode >…
29
votes
1 answer

Reading multiple files from S3 in Spark by date period

Description I have an application, which sends data to AWS Kinesis Firehose and this writes the data into my S3 bucket. Firehose uses "yyyy/MM/dd/HH" format to write the files. Like in this sample S3 path: s3://mybucket/2016/07/29/12 Now I have a…
V. Samma
  • 2,558
  • 8
  • 30
  • 34
29
votes
9 answers

Sinon.Stub in Node with AWS-SDK

I am trying to write some test coverage for an app that uses the aws-sdk NPM module that pushes things up to a SQS queue, but I am unsure how to mock things correctly. Here is my test so far: var request = require('superagent'), expect =…
dennismonsewicz
  • 25,132
  • 33
  • 116
  • 189
28
votes
1 answer

How to synchronously upload files to S3 using aws-sdk?

I'm attempting to upload files to my S3 bucket and then return out of my upload function. The problem is that I'm returning out of the function before the upload returns the stored data. I've attempted to use async/await with s3.upload, but I don't…
colemars
  • 979
  • 3
  • 12
  • 25
28
votes
2 answers

Authorization when sending a text message using AmazonSNSClient

The official aws documentation on how to send a Textmessage with the aws SDK in java is pretty straightforward. However, when sending a message like shown in the example at the bottom, I'm getting the error User: arn:aws:iam::xxx:user/sms-testing is…
pulse00
  • 1,294
  • 1
  • 16
  • 25