Imposter can load configuration files from a directory or an S3 bucket.
By default, configuration files with the suffix -config.json, -config.yaml or -config.yml are loaded from the configuration directory.
This section describes how to load from these sources, depending on how you run Imposter.
Also see recursive configuration discovery rules.
To load configuration files from a directory, pass the path to the directory in the imposter up command:
imposter up /path/to/config/dirNote If no directory is specified, Imposter will use the current working directory.
You can load configuration from an S3 bucket by setting the IMPOSTER_CONFIG_DIR environment variable to the S3 URL, such as:
imposter up -e IMPOSTER_CONFIG_DIR=s3://my-bucket/path/to/config/dir To load configuration files from a directory, mount the directory to /opt/imposter/config:
docker run -v /path/to/config/dir:/opt/imposter/config outofcoffee/imposterYou can load configuration from an S3 bucket by setting the IMPOSTER_CONFIG_DIR environment variable to the S3 URL, such as:
docker run -e IMPOSTER_CONFIG_DIR=s3://my-bucket/path/to/config/dir outofcoffee/imposterSee the Bundled Configuration section of the deployment patterns page for more information.
You can load configuration from an S3 bucket by setting the IMPOSTER_CONFIG_DIR environment variable to the S3 URL, such as:
IMPOSTER_CONFIG_DIR=s3://my-bucket/path/to/config/dirIt is not possible to load configuration files from a directory when using Lambda. Instead, bundle configuration files into a ZIP file.
To do this, use the imposter bundle CLI command:
imposter bundle -t awslambda /path/to/config/dirThis will create a ZIP file in the current working directory, which can be deployed to Lambda. The bundle contains both the Imposter engine and the configuration files.
See the Bundled Configuration section of the deployment patterns page for more information.
To load configuration files from a directory, pass the path to the directory in the --configDir flag:
java -jar imposter.jar --configDir=/path/to/config/dirYou can load configuration from an S3 bucket by passing the S3 URL in the --configDir flag:
java -jar imposter.jar --configDir=s3://my-bucket/path/to/config/dir