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
44
votes
4 answers

Sending email via AWS SES within AWS Lambda function

I have created a very basic simple function on AWS Lambda which will be used to accept form submissions. Part of the function will be to send an email to a particular person, pretty simple. I am trying to use AWS SES in order to do this. I have…
Darren
  • 795
  • 1
  • 6
  • 10
43
votes
5 answers

Upload files to a specific folder in the bucket with AWS SDK

I'm uploading images to AWS S3 with the developer toolkit for node: const aws = require('aws-sdk'); const s3Bucket = process.env.S3_BUCKET; const s3 = new aws.S3({ signatureVersion: 'v4', region: process.env.S3_REGION, …
Evanss
  • 23,390
  • 94
  • 282
  • 505
42
votes
5 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,686
  • 5
  • 30
  • 48
41
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
  • 5,671
  • 3
  • 45
  • 64
41
votes
13 answers

Serverless Framework with AWS Lambda error "Cannot find module"

I'm trying to use the Serverless Framework to create a Lambda function that uses open weather NPM module. However, I'm getting the following exception, but my node_modules contain the specific library. I have managed to run the sample,…
41
votes
1 answer

What does 'cpu' parameter mean in aws container service?

I'm going to register a new task in container service for t2.medium. I saw examples where cpu parameter is equal to 0. I'm trying to find out what is it and how many I need to put here for one task. All that i was able to find according this…
Denys Medvediev
  • 1,160
  • 3
  • 16
  • 32
41
votes
8 answers

Upload entire directory tree to S3 using AWS sdk in node js

I currently upload single objects to S3 using like so: var options = { Bucket: bucket, Key: s3Path, Body: body, ACL: s3FilePermissions }; S3.putObject(options, function (err, data) { //console.log(data); }); But…
LifeQuery
  • 3,202
  • 1
  • 26
  • 35
40
votes
5 answers

Is boto3 client thread-safe

Is boto3 low level client for S3 thread-safe? Documentation is not explicit about it. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#client A similar issue is discussed in Github…
Andrey Novosad
  • 401
  • 1
  • 4
  • 5
40
votes
4 answers

GET list of objects located under a specific S3 folder

I am trying to GET a list of objects located under a specific folder in an S3 bucket using a query-string which takes the foldername as the parameter and list all objects which match that specific folder using Node JS aws-sdk For example:…
appy
  • 559
  • 1
  • 8
  • 14
40
votes
10 answers

Why is my access denied on s3 (using the aws-sdk for Node.js)?

I'm trying to read an existing file from my s3 bucket, but I keep getting "Access Denied" with no explanation or instructions on what to do about it. Here is the code I am using: 'use strict' var AWS = require('aws-sdk') const options = { …
Shawn
  • 10,931
  • 18
  • 81
  • 126
40
votes
7 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
  • 812
  • 1
  • 10
  • 30
39
votes
6 answers

AmazonS3: Getting warning: S3AbortableInputStream:Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection

Here's the warning that I am getting: S3AbortableInputStream:Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection. This is likely an error and may result in sub-optimal behavior. Request only the bytes you need via a…
Chirag Sejpal
  • 877
  • 2
  • 9
  • 17
39
votes
4 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,507
  • 1
  • 13
  • 17
39
votes
9 answers

AWS API Gateway : Execution failed due to configuration error: No match for output mapping and no default output mapping configured

In AWS API Gateway, I have a GET method that invokes a lambda function. When I test the method in the API Gateway dashboard, the lambda function executes successfully but API Gateway is not mapping the context.success() call to a 200 result despite…
Zigglzworth
  • 6,645
  • 9
  • 68
  • 107
37
votes
4 answers

Custom attribute not passed into ID_TOKEN created by AWS Cognito

I am not able to get custom attribute in ID_TOKEN returned from AWS Cognito after successful user login. Steps I tried : 1.Created user pool 2.Created app client and checked the custom attribute(customattrib1,customattrib2) User Pool screen : Check…