I’ve recently migrated a local python script to lambda via aws cdk. It collects data from an public api endpoint. On my local machine this function works 100% of the time when it comes to status codes and responses from the api.
When the code is running within the lambda alone its also working fine, 100% of requests are returning with 200.
When the lambda is invoked by an api gateway it will fail with a 403?
Im not writing any custom cookies or user agents and the below code is an example of the three requests that run in this area.
Other info
- api is public and requires no auth