Questions tagged [aws-sdk]

1

votes
1

answer
172

Views

AWS CloudWatch GetMetricsData: “Sum” misses points on periods without values

I am querying GetMetricsData from AWS CloudWatch: { StartTime: lastWeek , EndTime: today, MetricDataQueries: [ { Id: 'invocations', Label: 'Invocations', MetricStat: { Metric: { Dimensions: [ { Name: 'FunctionName', Value: /* FunctionName */, }, ], MetricName: 'Invocations', Namespace: 'AWS/Lambda'...
Matthieu Napoli
1

votes
1

answer
173

Views

How to set RegionEndPoint for AWS AmazonSQSClient in C# on the App Config file

I have declared a RegionEndpoint on my app config like this And on my program i'm tryna call this AWSRegion private static string RegionEndPoint = ConfigurationManager.AppSettings['AWSRegion']; So when i declare my SQSClient i get an error that, Cannot convert from string to RegionEndPoint var SQS...
Kid_Nick
1

votes
1

answer
136

Views

How to make AWS REST API return a JSON instead of XML

In AWS I invoke the call ListQueues on sqs.us-east-2.amazonaws.com (by calling directly to the REST API) The response is always an XML, and searching in the AWS documentation I couldn't find how to get a JSON. Any ideas?
Eden
0

votes
1

answer
11

Views

AWS ALB returns 502 Bad Gateway when return audio buffer from Lambda in nodejs

I have a lambda function which does returns audio buffer in response, when I invoke lambda from code it works fine but when I Call lambda behind ALB ,I get error 502 Bad Gateway. // Lambda function handler 'use strict'; module.exports.handler = async (event, context) => { // ALB expects following re...
Dharam
1

votes
1

answer
86

Views

Upload Image into S3 bucket using Api Gateway, Lambda funnction

I'm trying to upload the image (base64) from the postman, I can see when I hit the Serverless API, something has been added in S3 bucket but not image, I'm using nodejs Lambda function, I tried so many solutions but that didn't work out. Please suggest me where I'm wrong: const AWS = require('aws-sd...
Nasreen Ustad
0

votes
0

answer
4

Views

Which functionality is more efficient/faster in AWS SDK doesObjectExist() or copyObject()?

I have been using both these methods in a utility to copy around 5000+ documents/s3Objects from one bucket to another bucket. While doing so I am checking before copying the s3Object (using copyObject() method) whether that object already exists in the destination bucket or not (using doesObjectExis...
Maddys
1

votes
0

answer
9

Views

putBotAlias not working in AWS LexModelBuildingService node.js

I've been trying to replace the existing LexBot Alias(named LATEST) with a newly created bot version. Now, according to aws documentation When you want to update a bot alias, set the checksum field to the checksum of the most recent revision of the $LATEST version. I can see the Alias LATEST is usin...
Salim Shamim
0

votes
0

answer
3

Views

AWS SNS send short message to phone number. message always contains [AWS] suffix. How to remove it?

I send message: Hello world! . But I got the message: Hello world! [AWS] on my phone. How to remove [AWS] suffix.
ran.sun
1

votes
3

answer
625

Views

Calling getItem() on DynamoDB object from AWS Lambda, why doesn't my callback execute?

I'm trying to get an item from my DynamoDB database. The way my code is presently written, I fail to retrieve any data from DynamoDB. I must be doing something wrong, because as far as I can tell from my test, my callback is not being called. I spent all day on this yesterday and have been tinkering...
Kevin Glick
1

votes
2

answer
501

Views

Amazon Lambda list running functions

How can I check the running Lambda functions running using the aws cli? It seems that there is no a command to check it: aws lambda XXXX I have several scripts running, and I'd like to monitor the situation. It is enough to show how many functions are running. Thank you
J.R.
0

votes
0

answer
75

Views

AWS Amplify Connect does not return data

I have a very simple GraphQL server, which returns 'Hello World' if queried with { hello } I have configured Amplify with the GraphQL endpoint and region and verified that the connection works with this snippet: **THIS IS WORKING** import {API, graphqlOperation} from 'aws-amplify' const ListEvents =...
Attaque
1

votes
2

answer
592

Views

aws lambda didn't convert json request to POJO

I have a lambda function: package org.smarter.note; import com.amazonaws.services.lambda.runtime.Context; import com.amazonaws.services.lambda.runtime.LambdaLogger; import com.amazonaws.services.lambda.runtime.RequestHandler; public class AddNoteRequestHandler implements RequestHandler { private Not...
Jakim
1

votes
1

answer
290

Views

sending mail using Amazon SES and display stats of mail using Laravel 5.4

I want to setup SES for sending mails in bulk using Laravel 5.4 and I want to see it's stats like soft bounce, hard bounce, clicks, opens, etc information and display this information in my admin panel. I read some docs of amazon and it's not up to mark so can anyone please help me to get nice tutor...
user3886556
1

votes
0

answer
615

Views

Not able to catch error from AWS sdk [S3]

Im trying to download a file from S3 which doesn't exist on S3. I expect a error in this scenario and im also getting that error from aws-sdk i.e. **/vagrant/node_modules/aws-sdk/lib/request.js:31 throw err; ^ NoSuchKey: The specified key does not exist.** But the issue is, im not able to catch this...
iAviator
1

votes
1

answer
244

Views

DynamoDBVersion Attribute with Conditional Update

I am using the .NET object persistence model with DynamoDB, and am making use of the built in optimistic locking using the DynamoDBVersion attribute. [DynamoDBTable('items')] public class MyItem { [DynamoDBHashKey] public string Id { get; set; } [DynamoDBVersion] public int? Version { get; set; } }...
Matt Cole
1

votes
0

answer
133

Views

AWS MQTT Server Authentication with CA Certificate

I am trying to establish mutual X.509 certificate authentication between the MQTT client and AWS IoT. On the X.509 Certificates and AWS IoT page, it is mentioned that one can reference the CA root certificate in your device code when you connect to AWS IoT. For more information, see the AWS IoT Devi...
ralfe
1

votes
0

answer
73

Views

How to describe specific attributes of EC2 instances in AWS?

For example, I want to describe only 4 attributes of my EC2 instances. Like a SQL projection. This is how I'm describing my EC2 instances: var settings = { apiVersion: '2017-01-01', region: process.env.AWS_REGION }; var ec2 = new AWS.EC2(settings); var params = { DryRun: false, Filters: [] }; param...
Ele
1

votes
1

answer
1.4k

Views

AWS: SNS sending SMS message to multiple phone numbers

From my mobile app, I'd like to send the following message to multiple phone numbers: 'John Doe invited you to a meeting. Download meeting material http://alink.com' This message will be Transactional I have a Node.js running on an EC2. I am a mobile app developer and new to AWS. In my SNS conso...
user1107173
1

votes
0

answer
328

Views

aws-sdk “Could not find API configuration s3-2006-03-01”

I'm writing this service that writes files to s3, and I sporadically come across this MODULE_NOT_FOUND error. The message is 'Could not find API configuration s3-2006-03-01'. It seems to happen in clusters (multiple calls to this function will all error, then another request later won't error), and...
jdubjdub
1

votes
1

answer
277

Views

how to download all files with matching key from S3, using aws-sdk module in Node?

say in S3 bucket s3://my-bucket-name I had the following files: file1.txt file2.txt file3.txt abc.txt one.txt If I wanted to download files matching regex file*.txt, is it achievable through aws-sdk node module? If not what is something I can do?
ampersands
1

votes
0

answer
237

Views

SignatureDoesNotMatch for presigned-url with get_object

Pretty simple stuff (I thought). I'm attempting to create a pre-signed url that I can then use to download a file. The IAM user these keys correspond to have fullS3Acess until I can figure out why this signature isn't working. def presigned_url document = Document.find(params[:id]) signer = get_pre...
Msencenb
1

votes
1

answer
629

Views

AccessDenied: Not authorized to perform rds:DescribeDBInstances

I'd like to programmatically list my RDS database instances and cluster snapshots, so I've attached the following IAM policy directly to one of my users: { 'Version': '2012-10-17', 'Statement': [ { 'Sid': 'ReadProdSnapshotsAndInstances', 'Effect': 'Allow', 'Action': [ 'rds:DescribeDBInstances', 'rds...
Rob Johansen
1

votes
0

answer
59

Views

How to Get DynamoDB particular table data change and send silent push to all users to receive data from that table in AWS?

I am working on iOS app and used swift version. i have used DynamoDB table to store category data. If admin add/delete/update data in DynamoDB then i want to send silent push to all app users so i will fetch category table data and update. Is there any other way to get that anything changed in table...
user3202457
1

votes
0

answer
154

Views

AWS-SDK-Go Can't delete object

I want to delete the key(bucket/userID/fileName) using AWS-SDK-Go. But this code doesn't delete the userID key. config := model.NewConfig() sess, _ := session.NewSession(&aws.Config{ Region: aws.String(config.AWSS3Region)}, ) svc := s3.New(sess) input := &s3.DeleteObjectInput{ Bucket: aws.String(con...
rluisr
1

votes
2

answer
902

Views

How to delete S3 object in AWS-SDK-Go?

I want to delete bucket/userID. But there are many files under bucket/userID I have to implement to delete bucket/userID, need using ListObjects then DeleteObjects. The function ListObjects returns result.Contents is []*s3.Object But DeleteObjects needs []*s3.ObjectIdentifier. I can't convert []*s3...
rluisr
1

votes
0

answer
35

Views

How to filter aws log using metric filter DescribeMetricFiltersResult using java

Hi I am trying to get aws metric filter logs on the basis of group name but I am keep getting this error ailed to satisfy constraint: Member must satisfy regular expression pattern: [.-_/#A-Za-z0-9]+ Code Snippet:- AWSLogs log; String group-name='xyz' DescribeMetricFiltersRequest describeMetricFilt...
demo661
1

votes
0

answer
44

Views

What's the preferred way to get a specific tag from an instance?

I'm tagging EBS snapshots based on the Name of the instance-id from which the vol-id is attached. import boto3 client = boto3.client('ec2') def lambda_handler(event, context): source_volume = event['detail']['source'] source_volume_id = 'vol-' + source_volume.split('vol-', 1)[1] volume_detail = clie...
MrDuk
1

votes
2

answer
275

Views

Results of S3 function call are being cached by my Lambda function

I have a lambda function that uses S3.listObjects to return a directory listing. The listing is sometimes (not always!) out of date - it doesn't contain recently uploaded objects and has old modification dates for the objects that it does have. When I run the identical code locally it always works f...
Kwoxford
1

votes
1

answer
124

Views

AWS IOT SDK- how to implement the Promise

I am working on AWS IoT, trying to create API to update Shadow things. What I have done (in ClaudiaJS) refer to https://github.com/aws/aws-iot-device-sdk-js var awsIot = require('aws-iot-device-sdk'); api.post(PREFIX + '/iot/test/{property}', function (request) { var property = request.pathParams....
Phong Vu
1

votes
0

answer
71

Views

What is the maximum outbound connections I can create from AWS Lambda?

I am looking at the documentation on Lamba Limits which says: Number of file descriptors 1,024 I am wondering if this is per invoking lambda or total across all lambdas? I am processing a very large number of items from a kinesis stream and I am calling a web endpoint and it I seem to be hitting...
justin.m.chase
1

votes
1

answer
313

Views

How to give parameters for AWS Lambda functions from an android application?

I worked on chat bot android application using amazon lex, for that i have created lambda functions using java project jar. That java project have handler method it will call my REST API. The Rest API request needs some parameters (like username , email id), so how can i pass that id's from android...
1

votes
1

answer
78

Views

Why does AWS JS SDK S3::Bucket#upload use unexpected Access-Control-Request-Method

I am seeing a strange problem where CORS requests (OPTIONS, specifically) to AWS S3 intermittently fail (~1/3 tries) with a 403 response code and the following error message: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://s3.amazonaws.com/some-...
pdoherty926
1

votes
0

answer
62

Views

Setting IAM role for Lambda after login with Cognito on iOS

I'm getting a trouble when trying to connect AWSCognito to AWSLambda to pass an Auth role into it. My application has serverless architecture based on CognitoUserPool's, Lambda and IAM. So I have one configuration for all these things like the following: let credentialsProvider = AWSCognitoCredentia...
wolltone
1

votes
2

answer
297

Views

Android Amazon Rekognition Text Detection doesn't work with bytes but does with S3 Objects

I'm trying to detect text in a photo taken with the Camera, but with no luck. The code I'm using is: AWSCredentials credentials = new AWSCredentials() { @Override public String getAWSAccessKeyId() { return 'some access key id'; } @Override public String getAWSSecretKey() { return 'some secret key';...
az4dan
1

votes
1

answer
3.8k

Views

import boto3 error on Mac OS

I'm trying to install boto3 on my mac (high sierra 10.13.3) and tried to follow : https://github.com/boto/boto3. I had already installed python 3 using homebrew before, but when I tried to see pip --version, I get error. So, I did 1) modify .bash_profile to add alias pip=pip3 2) verify $ pip --versi...
Suvro Choudhury
1

votes
0

answer
132

Views

How to publish to iot stream from lambda

I keep having a timeout in my lambda function when I try to call the iotData publish function. Code below. It always times out without error. This function works from the sam local command line. I imagine this is a permissions error with lambda. The strange thing is I've given permissions for IoT, K...
fritz
1

votes
1

answer
267

Views

AWS Cognito - Can I use the migration trigger in a Custom auth flow

I am investigating the recently released migration trigger for cognito user pools. To enable the trigger you need to set the AuthFlow type in the InitiateAuthRequest to be 'USER_PASSWORD_AUTH' see here: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-import-using-lambda....
dpix
1

votes
0

answer
15

Views

GetObject() not working after runtime update from Nodejs6.1 to Nodejs8.1

I am using AWS Lambda with NodeJS runtime and I recently received a notification from AWS telling that they will stop maintaining lambdas running on node.js 6.10 runtime. Basically, I am trying to get objects from S3 and create a stream from these objects in order to extract the data from a xlsx fi...
C00kieMonsta
1

votes
2

answer
102

Views

How Amazon-Pay-IPN signature verification differ from AWS-SNS signature verification?

I am new to aws-services and amazon-pay-services. I am trying to add Instant payment notification(IPN) for amazon-pay service. I was going through IPN-doc, It's mentioned that We need to verify the signature of IPN-body similar to aws-sns-sign-verify So I am little confused here. As per the document...
Amit
1

votes
0

answer
241

Views

Amazon Cognito: PreSignUp_SignUp Lambda Trigger Event

How do I access the user attributes and username of a user created by adminCreateUser API inside of Lambda Function. I know the event sample for normal signup is: { 'version': 1, 'triggerSource': 'PreSignUp_SignUp', 'region': '', 'userPoolId': '', 'userName': '', 'callerContext': { 'awsSdk': '', 'cl...
Manoj Acharya

View additional questions