amazon-vpc

Setting up a NAT gateway with VPC using Serverless framework

风格不统一 提交于 2019-12-10 13:40:20
问题 I'm trying to use the serverless framework to create a Lambda function that can access an Elasticache cluster, as well as call out to the internet. I've got as far as configuring serverless.yml to create the Lambda function, create the Elasticache cluster (memcached engine), and finally to create a VPC and place both the Lambda function and Elasticache cluster within it (otherwise, they cannot communicate). I understand that things within a VPC do not have access to the internet, and from

Terraform throws “groupName cannot be used with the parameter subnet” or “VPC security groups may not be used for a non-VPC launch”

妖精的绣舞 提交于 2019-12-10 01:06:52
问题 When trying to figure out how to configure a aws_instance with AWS VPC the following errors occur: * Error launching source instance: InvalidParameterCombination: The parameter groupName cannot be used with the parameter subnet status code: 400, request id: [] or * Error launching source instance: InvalidParameterCombination: VPC security groups may not be used for a non-VPC launch status code: 400, request id: [] 回答1: This is due to how a security group is associated with an instance.

Limit access to lambda or api gateway to a specific vpc

不问归期 提交于 2019-12-09 13:32:42
问题 is it possible to make an api gateway or lambda function accessible only by a specific vpc. I searched in amazon doc, but I didn't find anything about this subject. Thank you in advance 回答1: Unfortunately, you won't be able to do that (See update below). s3 is the service which provides that kind of control access through Bucket policies . What you can do is grant permissions to your callers (Lambda invoker and API caller) . Take a look at these resources: Control Access to an API with IAM

Lambda function within VPC doesn't have access to public Internet

筅森魡賤 提交于 2019-12-09 05:50:59
问题 I am trying to make an outbound API request to a third-party service from within a Lambda function, but the function always times out without any error. This previously happened when trying to perform a s3.putObject operation within a different function (still within the same VPC / subnets), and I managed to get around that by adding an Endpoint with a service name com.amazonaws.us-east-1.s3 and connecting it to the route table that is associated with the VPC that this Lambda function resides

Create and Secure AWS EB Application with multiple Environments

只愿长相守 提交于 2019-12-08 09:52:30
Now I've developed an application that works on top a set of services that are collecting and elaborating data collected from the Internet (app_one, app_two, app_three) and then I have a core App that merges and visualizes that information (app_core). This project is based on top of AWS Elastic Beanstalk, having for each App its own git. To handle the connection between Apps I've (insecurely) mapped each service with a subdomain. What I would like to do I will love to move development of this project inside a VPC and secure the interfaces between the REST Flask Apps (one,two,three) and the

Create and Secure AWS EB Application with multiple Environments

左心房为你撑大大i 提交于 2019-12-08 05:13:12
问题 Now I've developed an application that works on top a set of services that are collecting and elaborating data collected from the Internet (app_one, app_two, app_three) and then I have a core App that merges and visualizes that information (app_core). This project is based on top of AWS Elastic Beanstalk, having for each App its own git. To handle the connection between Apps I've (insecurely) mapped each service with a subdomain. What I would like to do I will love to move development of this

Is it possible to launch an RDS instance without a VPC?

故事扮演 提交于 2019-12-07 09:50:45
问题 I'm trying to insert records into a Postgres database in RDS from a Lambda function. My Node.js lambda function works correctly when run locally, but the database connection times out when run in AWS. I've read several articles and tutorials which suggest that AWS Lambda functions cannot access RDS instances that are within a VPC. For example: http://ashiina.github.io/2015/01/amazon-lambda-first-impression/ Unfortunately; it seems I am unable to create an RDS instance that exists outside of a

AWS Lambda times out connecting to RedShift

ぐ巨炮叔叔 提交于 2019-12-07 07:44:25
问题 My Redshift cluster is in a private VPC. I've written the following AWS Lamba in Node.js which should connect to Redshift (dressed down for this question): 'use strict'; console.log('Loading function'); const pg = require('pg'); exports.handler = (event, context, callback) => { var client = new pg.Client({ user: 'myuser', database: 'mydatabase', password: 'mypassword', port: 5439, host: 'myhost.eu-west-1.redshift.amazonaws.com' }); // connect to our database console.log('Connecting...');

What is the smallest subnet one can create on AWS in the VPC?

我是研究僧i 提交于 2019-12-07 01:31:02
问题 I want to limit the number of instances that can run in a subnet to the smallest number of instances possible. This in combination with an IAM role will allow me to limit how many instances a user can create on my AWS account (see https://forums.aws.amazon.com/thread.jspa?threadID=174503 requirement #4 which reflects my motivations). What is the smallest subnet one can create on AWS in the VPC and what would the IPv4 CIDR be? 回答1: 16 IPs is the smallest range for a VPC Subnet -- /28 netmask.

How to properly connect AWS Lambda to RDS in VPC?

半腔热情 提交于 2019-12-06 08:25:35
问题 I am trying to build a graphQL API with Serverless Framework on AWS-Lambda using Apollo-Server-Lambda etc. I need to use a not publicly available PostgreSQL RDS instance. I can get lambdas up and running and sending back requests when not in VPC. I can get a Postgres RDS Database up and running and connected to PgAdmin (when in publicly available mode). The problem is once I make the RDS Postgres 'non public' and try to get all these pieces talking together I fail. I have tried multitude of