smoketurner / serverless-vpc-plugin

Serverless Plugin to create a VPC
MIT License
88 stars 35 forks source link

Getting started #695

Closed sc0ttdav3y closed 2 years ago

sc0ttdav3y commented 3 years ago

Hi,

This looks like a great plugin, and might be exactly what I've been searching for. Thanks for taking the time to create and share it! But unfortunately I'm stumped in terms of usage.

Design intent

I've read the README and I've looked through (and deployed) the example directory and those gives me some guidance, but is there something else at a high level — a blog post or something — that I haven't seen in terms of documentation? I feel like perhaps I'm missing something obvious.

What is the purpose/design of the various subnets? What should I put into "public" vs "app" vs "db"? Are there others I've missed? What's the rationale behind this design? I'm guessing all this might have been in the link to the now shut-down Skyliner. I've searched the web and found nothing on it.

The best way to use the created resources

Also, how do I use the various subnets, security groups, etc this plugin creates? I presume there's a way to !Ref them as needed, but how? What names does it create?

Using the bastion host

Is there any documentation on the bastion host? I can see this as highly useful, but I can't seem to work out how to use it. I set it up but I get an error saying the key doesn't exist? I presume bastionHostKeyName must refer to something external, but what?

Fixing the example

And finally, FYI I pulled down the repo and tried to run sls deploy on the example directory but it fails out of the box right now due to an error on line 62 of serverless.yml:

  The CloudFormation template is invalid: Template error: every Fn::GetAtt object requires two non-empty parameters, the resource name and the resource attribute

The corrected line that works should be:

    'Fn::GetAtt': [ EFSAccessPoint, Arn ]

This was run on my environment:

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              14.4.0
     Framework Version:         2.54.0 (local)
     Plugin Version:            5.4.3
     SDK Version:               4.2.6
     Components Version:        3.15.1

Thank you

Again, thanks for the plugin. I know this post may seem negative, but I really wish to get some better understanding so I can get some value out of it, and perhaps I can contribute to the project in terms of improved docs.

Cheers, Scott

jplock commented 3 years ago

Thank you for the feedback and great points. I’ll look into enhancing this.

sc0ttdav3y commented 3 years ago

I've added PR https://github.com/smoketurner/serverless-vpc-plugin/pull/705 to address the CF issue.

mwitt9999 commented 3 years ago

Hey Guys!

Im running into the same issue as @sc0ttdav3y and would be greatly appreciative if someone could provide some direction. I have cloned this repo and performed a "serverless deploy" within the example directory and am receiving this error related to the creation of the Bastion host:

An error occurred: BastionLaunchConfiguration - The key pair 'MyKey' does not exist (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID: 01989768-412e-4a05-8841-48668ce6cf5a; Proxy: null).

Here is the configuration from my serverless.yml:

createBastionHost: true
bastionHostKeyName: MyKey

My Env Info:

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              15.7.0
     Framework Version:         2.59.0 (local)
     Plugin Version:            5.4.5
     SDK Version:               4.3.0
     Components Version:        3.17.1
jplock commented 3 years ago

@mwitt9999 did you replace MyKey with the name of the key pair in your account/region? You need to generate the key pair ahead of time.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. Remove the "stale" label or comment or this will be closed in 14 days.