How to create AWS API Gateway Resource Policy section by using serverless framework

Since AWS API gateway is publicly accessible we want to apply policies to white-list desired IPs to access API gateway. It can be done from AWS console by add policies in API Gateway -> Resources Policy section. Since we are using serverless framework to setup our project , want to add Resource Policy by using serverless framework.

Can you please inform how can I do it using serverless? If it is not available in serverless do you have any plan to add this functionality.


It looks like this isn’t supported by CloudFormation yet. Until then you’ll need to use one of the other mechanisms.

Is this still not implemented? I see in documentation for serverless property “resourcePolicy”
I use serverless 1.24 version but when i specify this “resourcePolicy” property it do not appear in cloudformation template. Why it can be so? Thank you.