* Lazily construct the AppConfig data-plane client. Never instantiated unless a * caller actually fetches a profile, so deployments without AppConfig configured * never reach for AWS credentials.
()
| 41 | * never reach for AWS credentials. |
| 42 | */ |
| 43 | function getClient(): AppConfigDataClient { |
| 44 | if (!client) { |
| 45 | client = new AppConfigDataClient({ |
| 46 | region: env.AWS_REGION, |
| 47 | credentials: getAwsCredentialsFromEnv(), |
| 48 | }) |
| 49 | } |
| 50 | return client |
| 51 | } |
| 52 | |
| 53 | function cacheKey(ids: AppConfigProfileIdentifiers): string { |
| 54 | return `${ids.application}/${ids.environment}/${ids.profile}` |
no test coverage detected