OptionalconfigStore?: KindStoreOptionsNamespace/cache options for config() values (SSM Parameter Store).
Defaults to { prefix: '/amplify/hosting/<project>/config' }.
Optionalenvironment?: Record<string, EnvValue | ByoValue>Environment variables injected into all compute (SSR) Lambda functions.
Accepts:
secret('KEY') — a sensitive value in AWS Secrets Manager, read at
runtime with getSecret('KEY');config('KEY') — a non-sensitive value in SSM Parameter Store, read at
runtime with getConfig('KEY');byoSecret('name-or-arn') / byoConfig('name') — a bring-your-own
reference to an EXISTING Secrets Manager secret / SSM parameter (resolved
to a CDK handle internally, no user CDK required);ISecret / IParameter CDK handle to an existing store entry.For the marker forms only the store locator is injected; the value never enters the CloudFormation template.
OptionalsecretStore?: KindStoreOptionsNamespace/cache options for secret() values (AWS Secrets Manager).
Defaults to { prefix: '/amplify/hosting/<project>/secrets' }.
Configuration for
defineHosting().Amplify widens the upstream
@aws-blocks/hostingHostingPropsin two ways so self-managed hosting can reference externalized values:environmentacceptssecret('KEY')/config('KEY')markers (and BYOISecret/IParameterhandles) in addition to plain strings. A marker injects only the store locator into the compute Lambdas (never the value) and grants least-privilege read + decrypt; the value is read at runtime withgetSecret('KEY')/getConfig('KEY').secretStore/configStoreoverride the per-kind SSM/Secrets Manager namespace. When omitted,defineHostingdefaults them to a per-project path (/amplify/hosting/<project>/secretsand/amplify/hosting/<project>/config) so the CLI write, the IAM grant, and the runtime read all agree.