add more realistic policy
This commit is contained in:
parent
fc9c250922
commit
b994cf5291
2 changed files with 9 additions and 2 deletions
|
|
@ -67,7 +67,10 @@ class LambdaResponse(BaseResponse):
|
|||
path = request.path if hasattr(request, 'path') else request.path_url
|
||||
function_name = path.split('/')[-2]
|
||||
if lambda_backend.has_function(function_name):
|
||||
return 200, {}, json.dumps(dict(Policy='test_policy'))
|
||||
policy = ("{\"Statement\":[{\"Action\":[\"lambda:InvokeFunction\"],"
|
||||
"\"Resource\":\"arn:aws:lambda:us-west-2:account-id:function:helloworld\","
|
||||
"\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"account-id\"},\"Sid\":\"3\"}]}")
|
||||
return 200, {}, json.dumps(dict(Policy=policy))
|
||||
else:
|
||||
return 404, {}, "{}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue