aws

How to call an aws java lambda function from another AWS Java Lambda function when both are in same account, same region

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a java aws lambda function or handler as AHandler that does some stuff e.g. It has been subscribed to SNS events, It parses that SNS event and log relevant data to the database. I have another java aws lambda BHandler, Objective of this BHandler to receive a request from AHandler and provide a response back to AHandler. Because BHandler's objective is to provide a response with some json data. and that would be used by the AHandler. May I see any clear example which tells how we can do such things ? I saw this example call lambda

Pandas & AWS Lambda

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Does anyone have a fully compiled version of pandas that is compatible with AWS Lambda? After searching around for a few hours, I cannot seem to find what I'm looking for and the documentation on this subject is non-existent. I need access to the package in a lambda function however I have been unsuccessful at getting the package to compile properly for usage in a Lambda function. In lieu of the compilation can anyone provide reproducible steps to create the binaries? Unfortunately I have not been able to successfully reproduce any of the

aws lambda function getting access denied when getObject from s3

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting acccess denied error from S3 aws service on my lambda function this is the code // dependencies var async = require('async'); var AWS = require('aws-sdk'); var gm = require('gm').subClass({ imageMagick: true }); // Enable ImageMagick integration. exports.handler = function(event, context) { var srcBucket = event.Records[0].s3.bucket.name; // Object key may have spaces or unicode non-ASCII characters. var key = decodeURIComponent(event.Records[0].s3.object.key.replace(/\+/g, " ")); /* { originalFilename: , versions: [ { size: ,

AWS Credentials for lambda when working with scala not working

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: AWS lambda function does not work when attempting to work with credentials provided using the DefaultCredentialProvider. I need to pass the credentials to S3 for it to run. Code def initializeAwsCredentials (): AWSCredentials = { var credentials : AWSCredentials = null try { credentials = new ProfileCredentialsProvider (). getCredentials } catch { case e : Exception => { throw new AmazonClientException ( "Cannot load the credentials from the credential profiles file. " + "Please make sure that your credentials file is at the

AWS: Cloud Formation: Is it possible to use multiple “DependsOn”?

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Given i have this example template: { "AWSTemplateFormatVersion" : "2010-09-09", "Mappings" : { "RegionMap" : { "us-west-1" : { "AMI" : "ami-655a0a20" }, ... } }, "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { ... }, "DependsOn" : "myDB" }, "myDB" : { "Type" : "AWS::RDS::DBInstance", "Properties" : { ... } }, "myDB2" : { "Type" : "AWS::RDS::DBInstance", "Properties" : { ... } } } } Is it possible to specify multiple DependsOn in any way? Would be great to have somethink like: "DependsOn" : ["myDB", "myDB2"]

AWS Python Lambda with Oracle - OID Generation Failed

匿名 (未验证) 提交于 2019-12-03 01:22:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to connect to an Oracle DB using AWS Lambda Python code. My code is below: import sys, os import cx_Oracle import traceback def main_handler(event, context): # Enter your database connection details here host = "server_ip_or_name" port = 1521 sid = "server_sid" username = "myusername" password = "mypassword" try: dsn = cx_Oracle.makedsn(host, port, sid) print dsn connection = cx_Oracle.Connection("%s/%s@%s" % (username, password, dsn)) cursor = connection.cursor() cursor.execute("select 1 / 0 from dual") except cx_Oracle

How to execute commands on AWS Instance using Boto3

匿名 (未验证) 提交于 2019-12-03 01:22:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can anyone tell me if we can execute Shell Commands using Boto3 on Launched AWS instance. I read at few places about "boto.manage.cmdshell" but it is deprecated in Boto3. Appreciate any help. Regards, Saurabh 回答1: ssm_client = boto3.client('ssm') response = ssm_client.send_command( InstanceIds=['i-03#####'], DocumentName="AWS-RunShellScript", Parameters={'commands': ['start ecs']}, ) command_id = response['Command']['CommandId'] output = ssm_client.get_command_invocation( CommandId=command_id, InstanceId='i-03######', ) print(output) 回答2: No

AWS Lambda: How to store secret to external API?

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm building a monitoring tool based on AWS Lambda. Given a set of metrics, the Lambdas should be able to send SMS using Twilio API. To be able to use the API, Twilio provide an account SID and an auth token. How and where should I store these secrets? I'm currently thinking to use AWS KMS but there might be other better solutions. 回答1: Here is what I've come up with. I'm using AWS KMS to encrypt my secrets into a file that I upload with the code to AWS Lambda. I then decrypt it when I need to use them. Here are the steps to follow

error: the server doesn't have resource type “svc”

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Admins-MacBook-Pro:~ Harshin$ kubectl cluster-info Kubernetes master is running at http://localhost:8080 To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. error: the server doesn't have a resource type "services" i am following this document https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html?refid=gs_card while i am trying to test my configuration in step 11 of configure kubectl for amazon eks apiVersion: v1 clusters: - cluster: server: ... certificate-authority-data: .... name: kubernetes

AWS SDK for PHP: Error retrieving credentials from the instance profile metadata server

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to send SNS messeges to android through web api. Downloaded and installed the SDK from http://aws.amazon.com/developers/getting-started/php/ Got following error while running sample.php: Fatal error: Uncaught exception 'Aws\Common\Exception\InstanceProfileCredentialsException' with message 'Error retrieving credentials from the instance profile metadata server. When you are not running inside of Amazon EC2, you must provide your AWS access key ID and secret access key in the "key" and "secret" options when creating a client or