Skip to content

Code source — S3 ZIP archive

Use zip+s3://bucket/key.zip to point the runtime at a ZIP archive stored on S3 (or S3‑compatible object storage).

Quick checklist

  • Is the bucket and key reachable from the runtime environment?
  • Is the content a ZIP archive containing a Python package/module layout?
  • Will the runtime have credentials to read the object?

Format

  • zip+s3://bucket/path/to/archive.zip

Behavior

  • The runtime downloads the ZIP archive, extracts it, and imports the module/file referenced in handler.
  • Handler must reference a module and a callable using module:callable (for example pkg.module:func).

Examples

# S3 ZIP archive (package inside archive)
func = dh.new_function(
    name='worker',
    kind='python',
    code_src='zip+s3://my-bucket/my-code.zip',
    handler='app.main:handler',
)

Credentials

To read S3 objects, the runtime needs appropriate permissions. Check the S3 credential section for details on configuring access.