{"id":22337,"library":"sceptre-file-resolver","title":"Sceptre File Resolver","description":"Sceptre resolver to retrieve file content and inject it into CloudFormation templates. Version 1.0.6 is the latest stable release (last updated 2022). Low maintenance project.","status":"maintenance","version":"1.0.6","language":"python","source_language":"en","source_url":"https://github.com/sceptre/sceptre-file-resolver","tags":["sceptre","resolver","file","cloudformation","plugin"],"install":[{"cmd":"pip install sceptre-file-resolver","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Runtime dependency; the resolver is a Sceptre plugin.","package":"sceptre","optional":false}],"imports":[{"note":"sceptre-file-resolver is a separate package, not part of sceptre core.","wrong":"from sceptre.file_resolver import FileContent","symbol":"FileContent","correct":"from sceptre_file_resolver import FileContent as FileResolver"}],"quickstart":{"code":"from sceptre_file_resolver import FileContent as FileResolver\n\n# Example usage within Sceptre config\n# In config.yaml:\n#   parameters:\n#     my_param: !file_content path/to/file.txt\n\n# The resolver reads file content and returns it as a string.\nfile_path = \"/path/to/file.txt\"\nresolver = FileResolver()\ncontent = resolver.resolve(file_path=file_path)\nprint(content)","lang":"python","description":"Instantiate the FileContent resolver and use it to read a file's content."},"warnings":[{"fix":"Ensure the file exists and is readable before calling the resolver. Use custom error handling in a wrapper if needed.","message":"The resolver does not validate file paths or handle permissions errors gracefully. Non-existent files cause runtime exceptions.","severity":"gotcha","affected_versions":"all"},{"fix":"Do not rely on environment variable resolution in the file path. Provide absolute or relative paths that are fully resolved at Sceptre runtime.","message":"The resolver does not support Sceptre built-in environment variables. Use explicit file paths only.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Check that the file path is correct and the file has read permissions. Use an absolute path or verify relative path from Sceptre working directory.","cause":"File path does not exist or is not readable.","error":"sceptre.exceptions.InvalidFileSceptreResolverException: Unable to resolve file"},{"fix":"Run: pip install sceptre-file-resolver, then import with: from sceptre_file_resolver import FileContent","cause":"PyPI package name differs from import path. The package is 'sceptre-file-resolver', import from 'sceptre_file_resolver'.","error":"ImportError: cannot import name 'FileContent' from 'sceptre_file_resolver'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}