Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nat gateway support (custom CF type) #59

Merged
merged 1 commit into from
Jan 26, 2016
Merged

Nat gateway support (custom CF type) #59

merged 1 commit into from
Jan 26, 2016

Conversation

bkrodgers
Copy link
Contributor

Change also includes improvements to the EIP model and adds the ability to specify a name for a load balancer.

@tjcorr
Copy link
Collaborator

tjcorr commented Jan 22, 2016

To keep the history clean lets squash this guy

@tylersouthwick
Copy link
Contributor

instead of using the cli in a bash script, it could all be scripted using the template library since lambdas are supported. That way, it won't overwrite any functions currently in the account

@bkrodgers
Copy link
Contributor Author

@tylersouthwick: Thanks Tyler! I did consider that when I put this together. There are two ways you could set up the Lambda function with CF. They both have downsides.

One would be to just provide a CF template for a one time load, instead of this bash script. The downside here is that the function gets created with a random ARN. So the template would need to be provided the ARN for the account and region you're running the template in. The bash script will upload it to a constant name, and I've provided a default that templates can reference to construct the ARN from that constant, the account ID, and the region.

The other approach would be to include creating the function in every template itself. This solves the ARN problem, since you can reference it within the template. The problem now is that you're uploading the function for every stack you stamp out on that template. There's a 1.5GB limit on Lambda code per account, and the zip file for this function is 665KB (Amazon doesn't provide a current version of their SDK in the Lambda environment, so it must be bundled). Granted, there's lots of room to upload 665KB many times in 1.5GB, but if you're using Lambda for other things, and if you stand up lots of VPCs in an AWS account, it may be a concern. I know it would be for us right now, but it might not be a big deal for people with a low VPC/Account ratio and those who don't use Lambda heavily.

So neither are showstoppers, but the script based approach seemed to solve both. What do you think? I could certainly provide a CF based option as well, but I think at least in my case I'd probably stick with the script. I could also just mention in the document that CF is an alternative option but not provide it.

@bkrodgers
Copy link
Contributor Author

@tj-corrigan Thanks -- i'd squashed it earlier and meant to resquash before submitting, but forgot. Done now.

@tjcorr
Copy link
Collaborator

tjcorr commented Jan 26, 2016

We also wouldn't have an automated way of cleaning up all the lambda functions.

I'm OK with this approach for now hoping that CloudFormation has a native solution for this in the not too distant future.

tjcorr pushed a commit that referenced this pull request Jan 26, 2016
Nat gateway support (custom CF type)
@tjcorr tjcorr merged commit d08bb21 into master Jan 26, 2016
@tylersouthwick
Copy link
Contributor

@bkrodgers interesting constraints. I wasn't too familiar with the size limitations. Neither option is optimal... but the script is as good as any right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants