aws-lambda

AWS Systems Manager Parameter Store: Using StringList as Key Value Pairs in Java (Lambda)

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-10 13:14:53
问题 Im using Api Gateway and AWS Lambda and AWS RDS to build an API. My Lambda Function Code is Java. Currently im using the AWS Systems Manager Parameter Store successfully to connect to my Database. Therefore I created a parameter called "connection" which has the type String and holds my complete connection url. In Lambda functions i can access this parameter successfully this way: GetParameterRequest parameterRequest = new GetParameterRequest().withName("connection").withWithDecryption(false)

Enable CORS in AWS API Gateway with aws-cli

梦想与她 提交于 2021-02-10 07:37:07
问题 I'm currently writing script to programmatically enable CORS once a resource is added to an API Endpoint on AWS API Gateway. After exploring the put-integration-response function for hours. I almost got a breakthrough, but here is an error I'm getting: An error occurred (BadRequestException) when calling the PutIntegrationResponse operation: Invalid mapping expression specified: Validation Result: warnings : [], errors : [No method response exists for method.] Here is the script I'm using to

Remove Uploaded zip file from lambda function

白昼怎懂夜的黑 提交于 2021-02-10 06:21:39
问题 I upload previously created lambda function to my lambda function to get node module. and i got unexpected issue by it. so i wan to remove. uploaded zip file from my AWS lambda function and get previous state 回答1: Just go to your Lambda function and reupload the new zip file 来源: https://stackoverflow.com/questions/57091910/remove-uploaded-zip-file-from-lambda-function

Remove Uploaded zip file from lambda function

纵饮孤独 提交于 2021-02-10 06:20:11
问题 I upload previously created lambda function to my lambda function to get node module. and i got unexpected issue by it. so i wan to remove. uploaded zip file from my AWS lambda function and get previous state 回答1: Just go to your Lambda function and reupload the new zip file 来源: https://stackoverflow.com/questions/57091910/remove-uploaded-zip-file-from-lambda-function

Which AWS services does AWS CloudFormer support?

百般思念 提交于 2021-02-08 15:18:32
问题 AWS CloudFormation offers a default stack named CloudFormer, a template creation tool. CloudFormer creates a CloudFormation template from your current AWS environment, allowing you to click which manually created resources to include in your template. The AWS CloudFormer documentation does not list the AWS services that CloudFormer supports. There is an announcement from 2013 (CloudFormer Now Supports Amazon VPC and More AWS Resources) that lists a subset of supported services, but there is

Is there a way for a Lambda function to be triggered by multiple S3 buckets?

别说谁变了你拦得住时间么 提交于 2021-02-08 15:13:50
问题 I'm trying to create a Lambda function that will be triggered by any change made to any bucket in the S3 console. Is there a way to tie all create events from every bucket in S3 to my Lambda function? It appears that in the creation of a Lambda function, you can only select one S3 bucket. Is there a way to do this programmatically, if not in the Lambda console? 回答1: There is at least one way: you can setup an s3 event notifications, for each bucket you want to monitor, all pointing to a

Is there a way for a Lambda function to be triggered by multiple S3 buckets?

我是研究僧i 提交于 2021-02-08 15:13:26
问题 I'm trying to create a Lambda function that will be triggered by any change made to any bucket in the S3 console. Is there a way to tie all create events from every bucket in S3 to my Lambda function? It appears that in the creation of a Lambda function, you can only select one S3 bucket. Is there a way to do this programmatically, if not in the Lambda console? 回答1: There is at least one way: you can setup an s3 event notifications, for each bucket you want to monitor, all pointing to a

python (boto3) program to delete old snapshots in aws

谁说我不能喝 提交于 2021-02-08 15:00:28
问题 I have already written a program to delete old snapshots.But the problem for me now is if the snapshot is attached with an ami then it doesn't get deleted and the program also stops.It displays the following message : botocore.exceptions.ClientError: An error occurred (InvalidSnapshot.InUse) when calling the DeleteSnapshot operation: The snapshot snap-12345678 is currently in use by ami-12345 I want the program to skip those snapshots alone and continue to delete other snapshots. here is my

AWS Lambda, Python, Numpy and others as Layers

依然范特西╮ 提交于 2021-02-08 14:57:18
问题 I have been going at this for a while trying to get python, numpy and pytz added to AWS Lambda as Layers rather than having to zip and throw it at AWS with my .py file. I was able to follow multiple tutorials and all of them failed. I have resorted to following this guide if I am to go with pandas, numpy or pytz for any functionality (AWS Lambda with Pandas and NumPy - Ruslan Korniichuk - Medium). So this is good but I do not want to have to recreate a zip each time if things change with my

How to share code in serverless with Python properly?

坚强是说给别人听的谎言 提交于 2021-02-08 13:49:15
问题 I'm trying to find the best approach for robust serverless development with Python. The project is divided into multiple services using the serverless framework and versioned in a monorepo. Here's the structure I'd like to have: service_1/ serverless.yml handler.py service_2/ serverless.yml handler.py shared module_a.py module_b.py module_a and module_b comprise shared logic, which should be available for both services. So far I've found 2 approaches: wrap shared code in an installable