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
36
votes
2 answers

Access denied to SQS via AWS SDK

I'm currently working on a website developed with Symfony2 and I need to send messages in an Amazon SQS. In order to do that I added to my composer.json: "aws/aws-sdk-php": "2.4.*" Then when I try to create a queue or list queues I've got a 403…
SupaCoco
  • 1,395
  • 2
  • 14
  • 22
35
votes
8 answers

Spring boot startup error for AWS application : There is not EC2 meta data available

I am getting the below error when I am trying to run a Spring boot-AWS application locally : There is not EC2 meta data available, because the application is not running in the EC2 environment. Region detection is only possible if the application is…
souvikc
  • 722
  • 1
  • 7
  • 21
35
votes
3 answers

AWS CLI S3: copying file locally using the terminal : fatal error: An error occurred (404) when calling the HeadObject operation

I'm trying to copy files locally from s3 bucket. I can get the list of files on my bucket: aws s3 ls s3://myBucket/myDirectory/todaysFiles/ But when I try to copy the files locally: aws s3 cp s3://myBucket/myDirectory/todaysFiles/ . I get this…
34
votes
4 answers

How to specify AWS credentials in C# .NET core console program

I am trying to test a .NET core console program to publish a message to SNS. As I had issues trying to get it to work in Lambda, I want to try it in a non-Lambda environment. In Lambda, security is covered by the role, but in a console program, I…
NealWalters
  • 14,090
  • 34
  • 109
  • 199
33
votes
3 answers

TRIM_HORIZON vs LATEST

I can't find in the formal documentation of AWS Kinesis any explicit reference between TRIM_HORIZON and the checkpoint, and also any reference between LATEST and the checkpoint. Can you confirm my theory: TRIM_HORIZON - In case the application-name…
Ida Amit
  • 1,077
  • 1
  • 8
  • 20
33
votes
7 answers

How do I access the group for a Cognito User account?

In AWS Cognito, you can add a user to a group (after first creating a group). A user may belong to one or more groups. With using the JavaScript SDK (https://github.com/aws/amazon-cognito-identity-js), is there a way to read the assigned Groups?…
user1322092
  • 3,389
  • 6
  • 30
  • 47
32
votes
3 answers

Mock a dependency's constructor Jest

I'm a newbie to Jest. I've managed to mock my own stuff, but seem to be stuck mocking a module. Specifically constructors. usage.js const AWS = require("aws-sdk") cw = new AWS.CloudWatch({apiVersion: "2010-08-01"}) ... function myMetrics(params) { …
Oliver Shaw
  • 4,390
  • 4
  • 22
  • 34
32
votes
1 answer

Redirect http:// requests to https:// on AWS API Gateway (using Custom Domains)

I'm using AWS API Gateway with a custom domain. When I try to access https://www.mydomain.com it works perfectly, but when i try http://www.mydomain.com it can't connect. Is there a way to redirect the http -> https with the custom domain in API…
supersan
  • 4,328
  • 1
  • 34
  • 51
32
votes
5 answers

AWS : Invalid identity pool configuration. Check assigned IAM roles for this pool

I have created one user pool & identity pool. I have used javascript sdk. I am able to signup, send confirmation code & confirm user successfully with javascript sdk. But when i try to sign in user with authenticate method & try to get credentials…
32
votes
6 answers

Aws S3 Filter by Tags. Search by tags

We have our bucket with new Aws SDK API on AWS S3. We uploaded and tagged lots of files and folders with tags. How can we filter on key-value tag, or only one of them? I'd like to find all the objects with key = "temp", or key = "temp" and value =…
alagaesia
  • 869
  • 2
  • 10
  • 16
31
votes
4 answers

How to set credentials on AWS SDK on NET Core?

I'm new to AWS SDK and I'm trying to follow the AWS documentation, but gives little to none on what exactly I need to setup. The official docs tell me to add this to the appsettings.json: { "AWS": { "Profile": "local-test-profile", …
Natan
  • 4,216
  • 4
  • 27
  • 45
30
votes
3 answers

AWS lambda - Release /tmp storage after each execution

I have 4 lambda functions which will be invoked at same time (by SNS), the frequence of SNS's event is 5 minutes. Each function process the large mount of data and images(~300MB) so I store them on /tmp folder (500MB limit). At the beginning of …
Ngoan Tran
  • 1,227
  • 1
  • 11
  • 17
30
votes
4 answers

Querying a Global Secondary Index in dynamodb Local

I am creating a table and GSI in DynamoDB, using these parameters, as per the documentation: configId is the primary key of the table, and I am using the publisherId as the primary key for the GSI. (I've removed some unnecessary configuration…
Stelios Savva
  • 712
  • 1
  • 9
  • 28
28
votes
5 answers

S3 Bucket Lambda Event: Unable to validate the following destination configurations

I'm trying to create an S3 bucket and immediately assign a lambda notification event to it. Here's the node test script I wrote: const aws = require('aws-sdk'); const uuidv4 = require('uuid/v4'); aws.config.update({ accessKeyId: 'key', …
Scotty Waggoner
  • 2,167
  • 1
  • 25
  • 35
28
votes
6 answers

How to use “IN” statement in FilterExpression using array - dynamodb

Checked AWS document but did not find any working example. Here is my attempt var params = { TableName: "User", IndexName:"a-b-index", KeyConditionExpression: "Country = :country and #s = :status", …
Nirmal Goswami
  • 644
  • 1
  • 6
  • 17