aws / aws/chalice

Deployment creates a new private endpoint every time

Open
#1,647 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

When I trigger a deployment (whether it's the `chalice deploy` route or `chalice package` route), a new api-endpoint is created (within the `vpceEndpointId`. I don't see where I can specify an api-id in the configuration (perhaps I'm missing it?). Would it be possible to include the ability to specify which api-id to deploy to? Thanks!

In case I'm missing something, here's my config.json:
```
{
"version": "2.0" ,
"app_name": "some-api" ,
"automatic_layer": false ,
"autogen_policy": false ,
"manage_iam_role": false ,
"iam_role_arn": "arn:aws:iam:::role/some-api" ,
"stages": {
"development": {
"api_gateway_stage": "api" ,
"api_gateway_endpoint_type": "PRIVATE" ,
"api_gateway_policy_file": "policy.json"
}
}
}
```
And here's the `policy.json`:
```
{
"Version": "2012-10-17" ,
"Statement": [
{
"Effect": "Allow" ,
"Principal": "*" ,
"Action": [
"execute-api:Invoke"
] ,
"Resource": "arn:aws:execute-api:::*" ,
// Also tried as "Resource": "arn:aws:execute-api:::/*" ,
"Condition": {
"StringEquals": {
"aws:SourceVpce": ""
}
}
}
]
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the `chalice deploy` and `chalice package` routes and the stage settings in `config.json`, especially the private endpoint configuration. Trace how the API ID and `vpceEndpointId` are handled across repeated deployments, then verify that a configured API ID is reused rather than creating a new private endpoint each time.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.