aws-sdk

How to create presigned URL for aws gateway API

非 Y 不嫁゛ 提交于 2019-12-23 01:03:51
问题 I have seen pre-signed URL for S3 object. Is it possible to create pre-signed URL for API gateway. I have gone through documentation. I am using .NET. I would like to know if there is .NET library available to create pre-signed request for gateway API. ISSUE I have GET API something like this https://xxxxxx.execute-api.us-east-1.amazonaws.com/dev/pets?type=dog&page=1 and our client is going to invoke that API once in a while. The legacy tool that they are using only supports GET . So i wanted

AWS.IAM is not a constructor JavaScript SDK

北城余情 提交于 2019-12-22 17:05:48
问题 I'm using the AWS JavaScript SDK . Both - var s3 = new AWS.S3(); var dynamodb = new AWS.DynamoDB(); Works fine. When I try - var iam = new AWS.IAM(); I am presented with: TypeError: AWS.IAM is not a constructor 回答1: This means that IAM is not part of the SDK that you downloaded. In the current SDK builder, IAM is not enabled by default. Go to this page and add the services that you need and download a new version. SDK Builder 来源: https://stackoverflow.com/questions/47081457/aws-iam-is-not-a

AWS.IAM is not a constructor JavaScript SDK

旧街凉风 提交于 2019-12-22 17:05:04
问题 I'm using the AWS JavaScript SDK . Both - var s3 = new AWS.S3(); var dynamodb = new AWS.DynamoDB(); Works fine. When I try - var iam = new AWS.IAM(); I am presented with: TypeError: AWS.IAM is not a constructor 回答1: This means that IAM is not part of the SDK that you downloaded. In the current SDK builder, IAM is not enabled by default. Go to this page and add the services that you need and download a new version. SDK Builder 来源: https://stackoverflow.com/questions/47081457/aws-iam-is-not-a

How can I invoke an AWS Lambda function from my EC2 instance?

↘锁芯ラ 提交于 2019-12-22 13:00:36
问题 I wrote a lambda function to take over some of the multithreaded code in our web app. Now, I'm looking to manually invoke the lambda function from an ASP.NET controller and then pass the function's return value back to the end-user. I thought about using AWS SQS to invoke the function but I haven't the slightest idea how to grab the return function's return value (the value passed back with context.succeed(returnData); ). Any ideas? 回答1: AWS Lambda now supports synchronous ("RequestResponse")

S3 Bucket AWS You can't grant public access because Block public access settings are turned on for this account

萝らか妹 提交于 2019-12-22 07:59:09
问题 I want to make S3 bucket public to everyone but I get access denied when I do That and it Says You can't grant public access because Block public access settings are turned on for this account. To determine which settings are turned on, check your Block public access settings. When I go to public access settings everything is turned off. I did set IAM User and User has AmazonS3FullAccess policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:*", "Resource": "*" }

S3 Bucket AWS You can't grant public access because Block public access settings are turned on for this account

▼魔方 西西 提交于 2019-12-22 07:59:03
问题 I want to make S3 bucket public to everyone but I get access denied when I do That and it Says You can't grant public access because Block public access settings are turned on for this account. To determine which settings are turned on, check your Block public access settings. When I go to public access settings everything is turned off. I did set IAM User and User has AmazonS3FullAccess policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:*", "Resource": "*" }

boto3 searching unused security groups

让人想犯罪 __ 提交于 2019-12-22 05:53:15
问题 I am using AWS Python SDK Boto3 and I am trying to know which security groups are unused. With boto2 I did it but I do not know how to do the same with boto3. from boto.ec2.connection import EC2Connection from boto.ec2.regioninfo import RegionInfo import boto.sns import sys import logging from security_groups_config import config # Get settings from config.py aws_access_key = config['aws_access_key'] aws_secret_key = config['aws_secret_key'] ec2_region_name = config['ec2_region_name'] ec2

AWS SNS get topic by name

二次信任 提交于 2019-12-22 04:41:13
问题 I started to work with AWS SNS to send push notifications to my app. Today, to get a topic that I want to send push notifications to, I need to load all topics – using SNS client function listTopics() - and check each topic to see if the ARN has the name of the topic that I'm looking for. I think that it's a very inefficient way to get a topic ARN, and I'd like to know if there is a most efficient way to get this information, like a function getTopicByName or something else. If not, I'd like

stream response from nodejs request to s3

房东的猫 提交于 2019-12-22 04:06:41
问题 How do you use request to download contents of a file and directly stream it up to s3 using the aws-sdk for node? The code below gives me Object #<Request> has no method 'read' which makes it seem like request does not return a readable stream... var req = require('request'); var s3 = new AWS.S3({params: {Bucket: myBucket, Key: s3Key}}); var imageStream = req.get(url) .on('response', function (response) { if (200 == response.statusCode) { //imageStream should be read()able by now right? s3

Kinesis stream pending message count

半城伤御伤魂 提交于 2019-12-21 21:25:46
问题 I am trying to use AWS Kinesis stream for one of our data streams. I would like to monitor pending messages on my stream for ops purposes(scale downstream according to backlog), but unable to find any API that gives (approx) pending messages in my stream. This looks strange as messages get expired after 7 days and if the producers and consumers are isolated and can't communicate, how do you know messages are expiring. How do you handle this problem? Thanks! 回答1: There is no such concept as