Skip to main content

Module resource_policy

Module resource_policy 

Source
Expand description

Lambda implementation of ResourcePolicyProvider.

Lambda persists function resource policies as raw JSON in crate::state::LambdaFunction::policy. Both AddPermission and RemovePermission write through that field, seeding a canonical {"Version":"2012-10-17","Statement":[...]} document so the existing cross-service evaluator path reads it without a Lambda-specific fork. This file is the read-side bridge into the fakecloud-core::auth::ResourcePolicyProvider trait.

Mirrors [fakecloud_sns::resource_policy::SnsResourcePolicyProvider] and [fakecloud_s3::resource_policy::S3ResourcePolicyProvider]: single-service gate, ARN parsing, state lookup, return None for anything not owned here so composition is safe.

Structsยง

LambdaResourcePolicyProvider
Concrete ResourcePolicyProvider backed by the in-memory crate::state::LambdaState. Server bootstrap clone-shares it via fakecloud_core::auth::MultiResourcePolicyProvider alongside the S3 and SNS providers.