When using ContainerLifetime.Persistent, the container lives after the app host is killed. But then on subsequent runs of the AppHost, the existing container is killed, and a new container is created.
var localStack = builder.AddLocalStack(
awsConfig: awsConfig,
configureContainer: container =>
{
container.Lifetime = ContainerLifetime.Persistent;
container.DebugLevel = 1;
container.LogLevel = LocalStackLogLevel.Info;
}
);