Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHandling Private API gateway resource policy as long with lambda policy when using chalice deploy #1225
Comments
|
Thanks for all of the information. First just answering your questions:
These need to be separate JSON files in the
I think that makes a lot of sense to add in the docs. In the meantime, something like this should work: app.py from chalice import Chalice
app = Chalice(app_name='private')
@app.route('/')
def index():
return {'hello': 'world'}.chalice/config.json
.chalice/custom_policy.json
And from there if you have a
You would not include it in the I hope this helps. We should definitely add more documentation on how to setup private endpoints. |
Hello!
I have updated to the new chalice release 1.11.0. I have seen that there are two tickets related with my request:
#976
#897
I would like to handle both lambda and API gateway Resource policy in the same file.
When I ran the
chalice deploy --no-autogen-policyI bumped in:
chalice.deploy.deployer.ChaliceDeploymentError: ERROR - While deploying your chalice application, received the following error:
An error occurred (MalformedPolicyDocument) when calling the PutRolePolicy
operation: Policy document should not specify a principal.
Therefore, my questions are:
How to properly distinguish in policy.json bewteen the lambda policy statements and API Gateway Resource policy statements?
Can you please provide a working example where you can set up both the API Gateway resource policy as PRIVATE with a VPC/VPC endpoint and lambda policies?
In my policy.json file the part related with vpcendpoint should be deployed to API Gateway Resource policy. How to to cope that in the policy.json?
Thank you.
Below are my configurations for config.json and policy-dev.json :
config.json
policy.json