aws-sdk

AWS SSM parameter store not fetching all key/values

爱⌒轻易说出口 提交于 2019-12-24 03:37:08
问题 Could someone let me know why the below code only fetching few entries from the parameter store ? GetParametersByPathRequest getParametersByPathRequest = new GetParametersByPathRequest(); getParametersByPathRequest.withPath("/").setRecursive(true); getParametersByPathRequest.setWithDecryption(true); GetParametersByPathResult result = client.getParametersByPath(getParametersByPathRequest); result.getParameters().forEach(parameter -> { System.out.println(parameter.getName() + " - > " +

AWS C++ S3 SDK PutObjectRequest unable to connect to endpoint

橙三吉。 提交于 2019-12-24 01:53:23
问题 In working with the AWS C++ SDK I ran into an issue where trying to execute a PutObjectRequest complains that it is "unable to connect to endpoint" when uploaded more than ~400KB. Aws::Client::ClientConfiguration clientConfig; clientConfig.scheme = Aws::Http::Scheme::HTTPS; clientConfig.region = Aws::Region::US_EAST_1; Aws::S3::S3Client s3Client(clientConfig); Aws::S3::Model::PutObjectRequest putObjectRequest; putObjectRequest.SetBucket("mybucket"); putObjectRequest.SetKey("mykey"); typedef

s3 streaming with etags (node)

人走茶凉 提交于 2019-12-24 01:41:27
问题 We are streaming content from S3 in node using createReadStream() in aws-sdk. We would like to add etag support. If we add the 'If-None-Match' header from the client, s3 throws NotModified as an error that I can't seem to handle. retrieveFile = function(req, res) { var s3 = new AWS.S3(); var params = { Bucket: bucket, key: key }; if (req.get('If-None-Match')) { params.IfNoneMatch = req.get('If-None-Match'); } return s3.getObject(params).on('httpHeaders', function(statusCode, headers) { if

Create an EC2 instance for a VPC not allowed

我是研究僧i 提交于 2019-12-24 00:26:18
问题 Is it possible to define VPCId for an EC2 instance template as a property? I am trying to do is something like, "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "SecurityGroups": [ { "Ref": "AWSSecurityGroups" } ], "KeyName" : { "Ref" : "KeyName" }, "InstanceType" : { "Ref" : "InstanceType" }, "Tags" : [ { "Key" : "Name", "Value" : "Softnas-CF" }], "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}, "VpcId" : { "Ref" : "VPCId" }

How to use ECS credentials with AWS JS SDK

若如初见. 提交于 2019-12-24 00:22:17
问题 I'm trying to access a S3 Bucket using the AWS JS SDK but without success. I got a task definition that uses a task role called Foo . This task role as an attached policy to access to the S3 Bucket: { "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject" ], "Resource": "arn:aws:s3:::foo-bucket" } ] } It says in the AWS Documentation about loading credentials from IAM roles for EC2 that I should configure my instance to use IAM roles

How to make calls to elasticsearch apis through NodeJS?

放肆的年华 提交于 2019-12-23 19:59:46
问题 I have been tasked with making a POST api call to elastic search api, https://search-test-search-fqa4l6ubylznt7is4d5yxlmbxy.us-west-2.es.amazonaws.com/klove-ddb/recipe/_search I don't have any previous experience with making api calls to AWS services. So, I tried this - axios.post('https://search-test-search-fqa4l6ubylznt7is4d5yxlmbxy.us-west-2.es.amazonaws.com/klove-ddb/recipe/_search') .then(res => res.data) .then(res => console.log(res)); But I was getting {"Message":"User: anonymous is

AWSCognito Missing region in config error

邮差的信 提交于 2019-12-23 17:24:42
问题 I'm using the aws-sdk javascript in my back-end and I can use AWS fine but when I try to use the getOpenIdTokenForDeveloperIdentity method I get a "Missing region in config error" as a response. var config = new AWS.Config({ accessKeyId: "MYACCESSKEY", secretAccessKey: "MYSECRETYKEY", region: 'us-east-1' }); var params = { IdentityPoolId: 'MYIDENTITYPOOLID', /* required */ Logins: { /* required */ "login.my.myapp": 'string', /* anotherKey: ... */ }, IdentityId: null, TokenDuration: 0 };

How to generate AWS S3 pre-signed URL using signature version 4

邮差的信 提交于 2019-12-23 17:19:27
问题 I am generating a pre-signed URL in a C# .NET Core 2.0 API controller class using the AWSSDK.S3 (3.3.31.11). The resulting URL is intended to be used by a client side Angular application to upload a file to an S3 bucket that is encrypted using SSE-KMS. Although the S3Client reports that the SignatureMethod is "HmacSHA256" and SignatureVersion is "4", when I try to upload a file using the pre-signed URL I get an error indicating "Requests specifying Server Side Encryption with AWS KMS managed

How to run AWS SDK Opsworks Commands in AWS Lambda?

允我心安 提交于 2019-12-23 16:59:38
问题 I've got a very simple lambda function trying to use the AWS SDK to call opsworks.describeInstances. The code executes locally fine, however inside lambda, it times out with no error or feedback. var AWS = require('aws-sdk'); var opsworks = new AWS.OpsWorks({ apiVersion: 'latest', region: "us-east-1" }); exports.handler = function(event, context, callback) { var params = { LayerId: 'idoflayer' }; opsworks.describeInstances(params, function(err, data) { if (err) { return callback(err); }

How to load external js library in Jmeter?

自闭症网瘾萝莉.ら 提交于 2019-12-23 16:19:09
问题 I have the following code in a jsr223 sampler: var key = "key"; var dateStamp = "20160329T134359Z"; var regionName = "us-east-1"; var serviceName = "execute-api"; var kDate= Crypto.HMAC(Crypto.SHA256, dateStamp, "AWS4" + key, { asBytes: true}) var kRegion= Crypto.HMAC(Crypto.SHA256, regionName, kDate, { asBytes: true }); var kService=Crypto.HMAC(Crypto.SHA256, serviceName, kRegion, { asBytes: true }); var kSigning= Crypto.HMAC(Crypto.SHA256, "aws4_request", kService, { asBytes: true }); vars