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

Create Private Deployments #1540

Closed
mcrowson opened this issue Jun 20, 2018 · 2 comments
Closed

Create Private Deployments #1540

mcrowson opened this issue Jun 20, 2018 · 2 comments

Comments

@mcrowson
Copy link
Collaborator

Context

Support the new AWS Feature for [private API Gateways](: https://aws.amazon.com/about-aws/whats-new/2018/06/api-gateway-supports-private-apis/)

Expected Behavior

Private deployments are only accessible within the VPC

Actual Behavior

Currently all deployments are public

Possible Fix

  • Add private key to the zappa_settings.json in readme with default of False
  • Change the deploy function to use the new private flag if supplied in the config.
  • Create or attach a resource policy for the private API to have access within vpc. This will likely require some other setting in the config file specifying the VPC it is allowed in. Would likely require an additional config value in zappa settings where the specified VPC is allowed. Not sure how complicated this part could get.

I might be missing something as I've just read through the docs/announcement. So jump in if there is some requirement or solution piece I've missed.

@brylie
Copy link

brylie commented Sep 17, 2018

From what I can tell, this feature would create a resource policy rule to Allow private API traffic based on source VPC or VPC endpoint:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "execute-api:Invoke",
            "Resource": [
                "arn:aws:execute-api:region:account-id:api-id/*"
            ]
        },
        {
            "Effect": "Deny",
            "Principal": "*",
            "Action": "execute-api:Invoke",
            "Resource": [
                "arn:aws:execute-api:region:account-id:api-id/*"
            ],
            "Condition" : {
                "StringNotEquals": {
                   "aws:SourceVpc": "vpc-2f09a348"
                }
            }
        }
    ]
}

IlyaSukhanov added a commit to IlyaSukhanov/Zappa that referenced this issue Dec 2, 2018
This change makes EndpointConfiguration configurable this, primarily,
enables for creation of Private API Gateway Endpoints, ones only
accessible from within a VPC.

It is an attempt to address:
Miserlou#1540

See also:
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html
IlyaSukhanov added a commit to IlyaSukhanov/Zappa that referenced this issue Dec 2, 2018
This change makes EndpointConfiguration configurable this, primarily,
enables for creation of Private API Gateway Endpoints, ones only
accessible from within a VPC.

It is an attempt to address:
Miserlou#1540

See also:
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html
IlyaSukhanov added a commit to IlyaSukhanov/Zappa that referenced this issue Dec 2, 2018
This change makes EndpointConfiguration configurable this, primarily,
enables for creation of Private API Gateway Endpoints, ones only
accessible from within a VPC.

It is an attempt to address:
Miserlou#1540

See also:
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html
IlyaSukhanov added a commit to IlyaSukhanov/Zappa that referenced this issue Dec 3, 2018
This change makes EndpointConfiguration configurable this, primarily,
enables for creation of Private API Gateway Endpoints, ones only
accessible from within a VPC.

It is an attempt to address:
Miserlou#1540

See also:
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html
@jtszalay
Copy link

This is merged #1820

@jneves jneves closed this as completed Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants