Exemple #1
0
def create_app_packager(config):
    # type: (Config) -> AppPackager
    osutils = OSUtils()
    # The config object does not handle a default value
    # for autogen'ing a policy so we need to handle this here.
    return AppPackager(
        # We're add place holder values that will be filled in once the
        # lambda function is deployed.
        SAMTemplateGenerator(
            CFNSwaggerGenerator('{region}', {}),
            PreconfiguredPolicyGenerator(
                config,
                ApplicationPolicyHandler(osutils,
                                         AppPolicyGenerator(osutils)))),
        LambdaDeploymentPackager())
Exemple #2
0
def app_policy(in_memory_osutils):
    return ApplicationPolicyHandler(in_memory_osutils)
Exemple #3
0
def app_policy(in_memory_osutils):
    return ApplicationPolicyHandler(in_memory_osutils,
                                    AppPolicyGenerator(in_memory_osutils))