cdk-local 0.165.1 → 0.166.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/cli.js +2 -2
- package/dist/{docker-runner-CmcChp3e.js → docker-runner-Du4rQJ1q.js} +228 -7
- package/dist/docker-runner-Du4rQJ1q.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +2 -2
- package/dist/{local-studio-Y_GECnu7.js → local-studio-D4E6Wb1V.js} +110 -34
- package/dist/local-studio-D4E6Wb1V.js.map +1 -0
- package/dist/{local-studio-XwDqTyvC.d.ts → local-studio-D6vz-OSk.d.ts} +3 -1
- package/dist/local-studio-D6vz-OSk.d.ts.map +1 -0
- package/package.json +2 -1
- package/dist/docker-runner-CmcChp3e.js.map +0 -1
- package/dist/local-studio-XwDqTyvC.d.ts.map +0 -1
- package/dist/local-studio-Y_GECnu7.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as displayIdent, c as getEmbedConfig, i as STACK_REF_MAX_CODE_POINTS, o as displayStackName, s as displayToolOutput, t as getLogger, u as setEmbedConfig } from "./logger-uzapot2X.js";
|
|
2
2
|
import { $ as formatHostForAuthority, B as describeCredentialLoadFailure, H as isAwsServiceException, I as renderAssemblyPathEscape, J as resolveEnvVars$1, K as applyEnvOverrideMap, L as resolveAssemblyPath, N as displayUntrustedValue, Q as formatAuthority, R as clampErrorName, U as sanitizeServiceExceptionMessage, V as flattenToOneLine, W as stringifyThrown, X as isLoopbackHostname, Y as defineOwnKey, Z as isWildcardHostname, et as hostFromAuthority, j as absoluteAssemblyPathEscape, n as awsEmulatorRealServices, o as deployArtifactClientConfig, p as proxyAwareFetch, q as readEnvVarsFileText, r as awsEndpointOverrideClientConfig, s as deployArtifactsReadEmulator, u as isAwsServiceRoutedToEmulator, y as createMixedModeStateProvider, z as describeAwsFailureForWarn } from "./aws-proxy-CtjweaLu.js";
|
|
3
|
-
import { $ as isIamRoleArn, A as buildDockerImage, B as substituteImagePlaceholders, D as isImageInLocalCache, E as warnIfEmulatedPlatform, F as parseEcrRegistryHost, G as LocalStartServiceError, H as CdkLocalError, I as contextForContainer, J as withErrorHandling, K as RouteDiscoveryError, L as derivePartitionAndUrlSuffix, M as createShutdownSignalHandler, N as signalExitCode, O as parseEcrUri, P as describeExitWithoutArgv, Q as describeRejectedRoleArn, R as derivePseudoParametersFromRegion, T as buildContainerImage, U as InteractiveTtyRequiredError, V as tryResolveImageFnJoin, W as LocalInvokeBuildError, X as applyRoleArnIfSet, Y as AssumeRoleFailure, Z as assumeRoleCredentials, a as describeRefusedSensitiveEnvKeys, c as execEnvForSecrets, d as rememberForwardedPorts, et as refusedRoleArnMessage, f as removeContainer, h as streamLogs, i as attachLoopbackForwarder, j as resolveAssetSourcePath, k as pullEcrImage, l as pickFreePort, m as startNamespaceOwnerForwarder, n as SENSITIVE_ENV_KEYS, nt as
|
|
3
|
+
import { $ as isIamRoleArn, A as buildDockerImage, B as substituteImagePlaceholders, D as isImageInLocalCache, E as warnIfEmulatedPlatform, F as parseEcrRegistryHost, G as LocalStartServiceError, H as CdkLocalError, I as contextForContainer, J as withErrorHandling, K as RouteDiscoveryError, L as derivePartitionAndUrlSuffix, M as createShutdownSignalHandler, N as signalExitCode, O as parseEcrUri, P as describeExitWithoutArgv, Q as describeRejectedRoleArn, R as derivePseudoParametersFromRegion, T as buildContainerImage, U as InteractiveTtyRequiredError, V as tryResolveImageFnJoin, W as LocalInvokeBuildError, X as applyRoleArnIfSet, Y as AssumeRoleFailure, Z as assumeRoleCredentials, a as describeRefusedSensitiveEnvKeys, c as execEnvForSecrets, d as rememberForwardedPorts, et as refusedRoleArnMessage, f as removeContainer, h as streamLogs, i as attachLoopbackForwarder, j as resolveAssetSourcePath, k as pullEcrImage, l as pickFreePort, m as startNamespaceOwnerForwarder, n as SENSITIVE_ENV_KEYS, nt as buildStsClientConfig, p as runDetached, q as TargetSelectionCancelledError, r as appendEnvFlags, rt as resolveProfileCredentials, s as ensureDockerAvailable, t as DockerRunnerError, tt as emulateRoleAfterDeniedAssume, u as pullImage, w as architectureToPlatform, z as formatStateRemedy } from "./docker-runner-Du4rQJ1q.js";
|
|
4
4
|
import { C as effectiveLoopbackPorts, F as resolveHostDefaultCredentials, R as takeAwsEmulatorStateSourceHint, b as awsEmulatorEnvName, d as workloadStsClientConfig, l as warnWorkloadCredentialsStripped, n as accountLookupStsClientConfig, r as applyWorkloadEnvCredentials, u as workloadClientConfig, v as activateWorkloadAwsWiring, w as getActiveWorkloadAwsWiring, y as applyWorkloadAwsWiringToEnv, z as workloadGetsEmulatorKeysOnly } from "./workload-identity-BONcukjU.js";
|
|
5
5
|
import { a as isDockerClientEnvKey, c as runDockerStreaming, i as getDockerCmd, n as finchSecretArgvRefusal, o as isMalformedEnvKey, p as noImplicitEcrPullArgs, u as warnFinchArgvExposure } from "./docker-cmd-Cqd0TG-d.js";
|
|
6
6
|
import { chmodSync, cpSync, createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, promises, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -79,6 +79,21 @@ function appOptions() {
|
|
|
79
79
|
return [new Option("-a, --app <command>", `CDK app command (e.g., "node app.ts") or path to a pre-synthesized cloud assembly directory. Falls back to cdk.json or ${envPrefix}_APP env`), new Option("--output <path>", "Output directory for synthesis").default("cdk.out")];
|
|
80
80
|
}
|
|
81
81
|
const contextOptions = [new Option("-c, --context <key=value...>", "Set context values (can be specified multiple times)")];
|
|
82
|
+
function parseEmulateRoleVia(raw) {
|
|
83
|
+
const arn = raw.trim();
|
|
84
|
+
if (!isIamRoleArn(arn)) throw new InvalidArgumentError(`Invalid --emulate-role-via value ${describeRejectedRoleArn(raw)}: expected an IAM role ARN like arn:aws:iam::123456789012:role/MyRole.`);
|
|
85
|
+
return arn;
|
|
86
|
+
}
|
|
87
|
+
function emulateRoleViaOption(roleFlag) {
|
|
88
|
+
return new Option("--emulate-role-via <arn>", `When the ${roleFlag} AssumeRole is refused (the role does not trust you), emulate the role's permissions: assume THIS role with the execution role's policies as session policies, so only what both allow is allowed. For callers that are not an IAM user (IAM Identity Center, a role session); an IAM user gets the same through sts:GetFederationToken without this flag. An approximation: resource-based policies, key policies and conditions naming the role are not reproduced, and a role with a permissions boundary is not emulated.`).argParser(parseEmulateRoleVia);
|
|
89
|
+
}
|
|
90
|
+
function isRoleFlagRequested(value) {
|
|
91
|
+
return value === true || typeof value === "string";
|
|
92
|
+
}
|
|
93
|
+
function warnIfEmulateRoleViaUnused(value, args) {
|
|
94
|
+
if (value === void 0 || args.roleRequested) return;
|
|
95
|
+
getLogger().warn(`--emulate-role-via has no effect without ${args.roleFlag}: it is used only when that flag's AssumeRole is refused.`);
|
|
96
|
+
}
|
|
82
97
|
function parseAssumeRoleToken(raw, previous) {
|
|
83
98
|
const acc = previous ?? { perLambda: {} };
|
|
84
99
|
if (!acc.perLambda) acc.perLambda = {};
|
|
@@ -5865,6 +5880,10 @@ async function localInvokeCommand(target, options, extraStateProviders) {
|
|
|
5865
5880
|
});
|
|
5866
5881
|
try {
|
|
5867
5882
|
await activateWorkloadAwsWiring(options);
|
|
5883
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
5884
|
+
roleFlag: "--assume-role",
|
|
5885
|
+
roleRequested: options.assumeRole !== void 0 && options.assumeRole !== false
|
|
5886
|
+
});
|
|
5868
5887
|
await applyRoleArnIfSet({
|
|
5869
5888
|
roleArn: options.roleArn,
|
|
5870
5889
|
region: options.region,
|
|
@@ -6368,7 +6387,8 @@ async function resolveLambdaContainerEnvWith(lambda, options, profileCredentials
|
|
|
6368
6387
|
roleArn: resolvedAssumeRoleArn,
|
|
6369
6388
|
region: stsRegion,
|
|
6370
6389
|
profile: options.profile,
|
|
6371
|
-
sessionNameSuffix: "invoke"
|
|
6390
|
+
sessionNameSuffix: "invoke",
|
|
6391
|
+
emulateRoleVia: options.emulateRoleVia
|
|
6372
6392
|
});
|
|
6373
6393
|
dockerEnv["AWS_ACCESS_KEY_ID"] = creds.accessKeyId;
|
|
6374
6394
|
dockerEnv["AWS_SECRET_ACCESS_KEY"] = creds.secretAccessKey;
|
|
@@ -6496,7 +6516,7 @@ function createLocalInvokeCommand(opts = {}) {
|
|
|
6496
6516
|
}
|
|
6497
6517
|
function addInvokeSpecificOptions(cmd) {
|
|
6498
6518
|
addAwsEndpointOptions(cmd);
|
|
6499
|
-
return cmd.addOption(new Option("-e, --event <file>", "JSON event payload file (default: {})")).addOption(new Option("--event-stdin", "Read event JSON from stdin").default(false)).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--no-pull", "Skip docker pull. Semantics differ by code path: ZIP Lambdas skip pulling the public Lambda base image; Container Lambdas on the local-build path are a no-op (docker build does not refresh the FROM cache by default); Container Lambdas on the ECR-pull fallback skip docker pull AND error if the image is not in the local cache (re-run without --no-pull or pre-pull manually).")).addOption(new Option("--no-build", "Skip docker build on the IMAGE local-build path (use the previously-built tag). Requires the deterministic tag to already be in the local registry; errors with an actionable message when missing. No-op for ZIP Lambdas and the IMAGE ECR-pull path. Compatible with --no-pull.")).addOption(new Option("--debug-port <port>", "Node --inspect-brk port (default: off)")).addOption(new Option("--container-host <host>", "Host IP the host uses to bind the RIE port to. Must be a numeric IP (Docker rejects hostnames here). Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--assume-role [arn]", "Assume the Lambda's deployed execution role and forward STS-issued temp credentials to the container so the handler runs with the deployed function's narrow permissions. Three forms: (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) auto-resolves the function's execution role ARN from state (requires an active state source); (3) `--no-assume-role` explicitly opts out. Off by default — when omitted, the developer's shell credentials are forwarded unchanged (SAM-compatible default). STS failures degrade to a warn + dev-creds fallback.")).addOption(new Option("--layer-role-arn <arn>", "Role to sts:AssumeRole before calling lambda:GetLayerVersion on every literal-ARN entry in Properties.Layers. Use only when the dev credentials cannot read the layer — typically cross-account layers. AWS-published public layers (e.g. Lambda Powertools) are readable from every account and need no role.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries. Issues sts:AssumeRole via the default credential chain and uses the temporary credentials for ecr:GetAuthorizationToken + docker pull. Required when the caller does not have direct cross-account access to the target repository. Same-account / same-region pulls do not need this flag.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the resolved stack name; pass an explicit value when CFn stack name differs. Fn::GetAtt is warn-and-dropped in v1 (CFn ListStackResources does not return per-attribute values).")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--response-file <path>", "Also write the raw Lambda response payload to this file. Lets a programmatic caller recover the response without parsing it out of stdout (where it interleaves with synth progress + streamed container logs). stdout output is unchanged."));
|
|
6519
|
+
return cmd.addOption(new Option("-e, --event <file>", "JSON event payload file (default: {})")).addOption(new Option("--event-stdin", "Read event JSON from stdin").default(false)).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--no-pull", "Skip docker pull. Semantics differ by code path: ZIP Lambdas skip pulling the public Lambda base image; Container Lambdas on the local-build path are a no-op (docker build does not refresh the FROM cache by default); Container Lambdas on the ECR-pull fallback skip docker pull AND error if the image is not in the local cache (re-run without --no-pull or pre-pull manually).")).addOption(new Option("--no-build", "Skip docker build on the IMAGE local-build path (use the previously-built tag). Requires the deterministic tag to already be in the local registry; errors with an actionable message when missing. No-op for ZIP Lambdas and the IMAGE ECR-pull path. Compatible with --no-pull.")).addOption(new Option("--debug-port <port>", "Node --inspect-brk port (default: off)")).addOption(new Option("--container-host <host>", "Host IP the host uses to bind the RIE port to. Must be a numeric IP (Docker rejects hostnames here). Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--assume-role [arn]", "Assume the Lambda's deployed execution role and forward STS-issued temp credentials to the container so the handler runs with the deployed function's narrow permissions. Three forms: (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) auto-resolves the function's execution role ARN from state (requires an active state source); (3) `--no-assume-role` explicitly opts out. Off by default — when omitted, the developer's shell credentials are forwarded unchanged (SAM-compatible default). STS failures degrade to a warn + dev-creds fallback.")).addOption(emulateRoleViaOption("--assume-role")).addOption(new Option("--layer-role-arn <arn>", "Role to sts:AssumeRole before calling lambda:GetLayerVersion on every literal-ARN entry in Properties.Layers. Use only when the dev credentials cannot read the layer — typically cross-account layers. AWS-published public layers (e.g. Lambda Powertools) are readable from every account and need no role.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries. Issues sts:AssumeRole via the default credential chain and uses the temporary credentials for ecr:GetAuthorizationToken + docker pull. Required when the caller does not have direct cross-account access to the target repository. Same-account / same-region pulls do not need this flag.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the resolved stack name; pass an explicit value when CFn stack name differs. Fn::GetAtt is warn-and-dropped in v1 (CFn ListStackResources does not return per-attribute values).")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--response-file <path>", "Also write the raw Lambda response payload to this file. Lets a programmatic caller recover the response without parsing it out of stdout (where it interleaves with synth progress + streamed container logs). stdout output is unchanged."));
|
|
6500
6520
|
}
|
|
6501
6521
|
|
|
6502
6522
|
//#endregion
|
|
@@ -11687,6 +11707,10 @@ async function localStartApiCommand(targets, options, extraStateProviders) {
|
|
|
11687
11707
|
if (normalizedAssumeRole === void 0) delete options.assumeRole;
|
|
11688
11708
|
else options.assumeRole = normalizedAssumeRole;
|
|
11689
11709
|
await activateWorkloadAwsWiring(options);
|
|
11710
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
11711
|
+
roleFlag: "--assume-role",
|
|
11712
|
+
roleRequested: normalizedAssumeRole !== void 0
|
|
11713
|
+
});
|
|
11690
11714
|
await applyRoleArnIfSet({
|
|
11691
11715
|
roleArn: options.roleArn,
|
|
11692
11716
|
region: options.region,
|
|
@@ -11792,6 +11816,7 @@ async function localStartApiCommand(targets, options, extraStateProviders) {
|
|
|
11792
11816
|
stacks: servedStacks,
|
|
11793
11817
|
overrides,
|
|
11794
11818
|
assumeRole: normalizedAssumeRole,
|
|
11819
|
+
...options.emulateRoleVia !== void 0 && { emulateRoleVia: options.emulateRoleVia },
|
|
11795
11820
|
containerHost: options.containerHost,
|
|
11796
11821
|
...debugPortBase !== void 0 && { debugPort: debugPortBase + i },
|
|
11797
11822
|
stsRegion: options.region ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"],
|
|
@@ -12435,7 +12460,7 @@ async function buildContainerSpec(args) {
|
|
|
12435
12460
|
profile
|
|
12436
12461
|
});
|
|
12437
12462
|
if (roleArn) {
|
|
12438
|
-
const creds = await assumeLambdaExecutionRole(roleArn, containerRegion, profile);
|
|
12463
|
+
const creds = await assumeLambdaExecutionRole(roleArn, containerRegion, profile, args.emulateRoleVia);
|
|
12439
12464
|
dockerEnv["AWS_ACCESS_KEY_ID"] = creds.accessKeyId;
|
|
12440
12465
|
dockerEnv["AWS_SECRET_ACCESS_KEY"] = creds.secretAccessKey;
|
|
12441
12466
|
dockerEnv["AWS_SESSION_TOKEN"] = creds.sessionToken;
|
|
@@ -12752,12 +12777,13 @@ function forwardAwsEnv$2(env) {
|
|
|
12752
12777
|
}
|
|
12753
12778
|
return applyWorkloadEnvCredentials(env);
|
|
12754
12779
|
}
|
|
12755
|
-
async function assumeLambdaExecutionRole(roleArn, region, profile) {
|
|
12780
|
+
async function assumeLambdaExecutionRole(roleArn, region, profile, emulateRoleVia) {
|
|
12756
12781
|
return assumeRoleCredentials({
|
|
12757
12782
|
roleArn,
|
|
12758
12783
|
region,
|
|
12759
12784
|
profile,
|
|
12760
|
-
sessionNameSuffix: "start-api"
|
|
12785
|
+
sessionNameSuffix: "start-api",
|
|
12786
|
+
emulateRoleVia
|
|
12761
12787
|
});
|
|
12762
12788
|
}
|
|
12763
12789
|
function parsePerLambdaConcurrency(raw) {
|
|
@@ -13038,7 +13064,7 @@ function createLocalStartApiCommand(opts = {}) {
|
|
|
13038
13064
|
}
|
|
13039
13065
|
function addStartApiSpecificOptions(cmd) {
|
|
13040
13066
|
addAwsEndpointOptions(cmd);
|
|
13041
|
-
return cmd.addOption(new Option("--port <port>", "HTTP server port (default: auto-allocate)").default("0")).addOption(new Option("--host <host>", "Bind address").default("127.0.0.1")).addOption(new Option("--stack <name>", "Stack to start (single-stack apps auto-detect)")).addOption(new Option("--all-stacks", "Serve every stack's API in a multi-stack app (each API on its own port) instead of erroring out. Mutually exclusive with a positional target subset, --stack, and an explicit --from-cfn-stack <name>; the bare --from-cfn-stack flag stays compatible (binds each routed stack to its own CFn stack).").default(false)).addOption(new Option("--warm", "Pre-start one container per Lambda at server boot").default(false)).addOption(new Option("--per-lambda-concurrency <n>", "Pool size cap per Lambda (default 2, max 4)").default("2")).addOption(new Option("--no-pull", "Skip docker pull (cached image)")).addOption(new Option("--no-build", "Skip docker build on every container Lambda local-asset build (use the previously-built tag). Requires the deterministic tag to already be in the local registry; errors with an actionable message when missing. No-op for ZIP Lambdas and the IMAGE ECR-pull path. Compatible with --no-pull.")).addOption(new Option("--container-host <host>", "IP the host uses to bind/probe the RIE port (must be a numeric IP — `docker run -p <ip>:<port>:8080` rejects hostnames). Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--debug-port-base <port>", "Reserve a contiguous --debug-port range (one per Lambda)")).addOption(new Option("--debug-port <port>", "Alias of --debug-port-base for parity with `cdkl invoke --debug-port`. Reserves a contiguous --debug-port range (one per Lambda) starting at <port>.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries on the container-Lambda ECR-pull fallback. Issues sts:AssumeRole via the default credential chain and uses the temporary credentials for ecr:GetAuthorizationToken + docker pull. Required when the caller does not have direct cross-account access to the target repository. Same-account / same-region pulls do not need this flag.")).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--assume-role <arn-or-pair>", "Assume the Lambda's execution role and forward STS-issued temp creds. Two forms: (1) `--assume-role <arn>` sets a single global default ARN used for every routed Lambda; (2) `--assume-role <LogicalId>=<arn>` (repeatable) is a per-Lambda override (wins over the global default and over --assume-role-auto for the named Lambda). Pair with --assume-role-auto to auto-resolve every other Lambda. Precedence: per-Lambda > (--assume-role-auto OR global default) > unset (developer creds passed through).").argParser((raw, prev) => parseAssumeRoleToken(raw, prev))).addOption(new Option("--assume-role-auto", "Auto-resolve EACH routed Lambda's own execution role per-Lambda (literal ARN / Fn::GetAtt against template / --from-cfn-stack state). Slower boot — one STS call per Lambda — but the right shape when each Lambda's deployed role differs. Mutually exclusive with `--assume-role <arn>` (global default); errors at boot. Compatible with `--assume-role <LogicalId>=<arn>` per-Lambda overrides — the map wins for named Lambdas, auto-resolve handles the rest.").default(false)).addOption(new Option("--watch", "Hot-reload: re-synth + re-discover routes when the CDK app's source changes (honors cdk.json watch.include/exclude; cdk.out, cdk.context.json, node_modules, .git are always excluded). Off by default; the server keeps the previous version serving when synth fails mid-reload.").default(false)).addOption(new Option("--stage <name>", "Select an API Gateway Stage by its 'StageName'. Default: the first Stage attached to each API. Drives event.stageVariables for both REST v1 and HTTP API v2. NOTE: For HTTP API v2 routes, requestContext.stage is always '$default' regardless of this flag (AWS-side limitation — HTTP API only exposes one stage to the integration event); only event.stageVariables is affected for v2 routes. For REST v1 routes the selected StageName is also threaded into requestContext.stage.")).addOption(new Option("--api <id>", "DEPRECATED — use the positional <targets...> argument instead. Accepts a SINGLE identifier; for a subset pass multiple positional targets. Same accepted forms (bare logical id, stack-qualified, Construct path, ancestor prefix). Will be removed in a future major release.")).addOption(new Option("--layer-role-arn <arn>", "Role to sts:AssumeRole before calling lambda:GetLayerVersion on every literal-ARN entry in Properties.Layers (issue #448). Use only when the dev credentials cannot read the layer — typically cross-account layers. AWS-published public layers (e.g. Lambda Powertools) are readable from every account and need no role.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in Lambda env vars with the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the resolved stack name per routed stack; pass an explicit value when a single CFn stack should serve every routed stack. Fn::GetAtt is warn-and-dropped in v1 (CFn ListStackResources does not return per-attribute values).")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--mtls-truststore <path>", `PEM-encoded CA bundle for client-certificate verification (mutual TLS). When set, the local server switches from HTTP to HTTPS and the TLS handshake rejects clients whose certificate doesn't chain to one of these CAs. Verified certs are surfaced on the Lambda event under requestContext.identity.clientCert (REST v1) / requestContext.authentication.clientCert (HTTP API v2). Must be set together with --mtls-cert + --mtls-key; partial flag sets are rejected. Generate a CA + server + client cert for local dev: openssl req -x509 -newkey rsa:2048 -nodes -keyout ca-key.pem -out ca.pem -subj "/CN=${getEmbedConfig().resourceNamePrefix}-ca" -days 365; openssl req -newkey rsa:2048 -nodes -keyout server-key.pem -out server-csr.pem -subj "/CN=localhost"; openssl x509 -req -in server-csr.pem -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out server-cert.pem -days 365; openssl req -newkey rsa:2048 -nodes -keyout client-key.pem -out client-csr.pem -subj "/CN=client"; openssl x509 -req -in client-csr.pem -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out client-cert.pem -days 365; curl --cacert ca.pem --cert client-cert.pem --key client-key.pem https://localhost:<port>/...`)).addOption(new Option("--mtls-cert <path>", "PEM-encoded server certificate for mutual TLS. Self-signed is fine for local dev. Must be set together with --mtls-truststore + --mtls-key.")).addOption(new Option("--mtls-key <path>", "PEM-encoded server private key matching --mtls-cert. Must be set together with --mtls-truststore + --mtls-cert.")).addOption(new Option("--strict-sigv4", "Opt-in: DENY AWS_IAM SigV4 requests that cannot be cryptographically verified (foreign access-key-id — e.g. a federated / Cognito Identity Pool / cross-account signer — OR no local AWS credentials configured) instead of the default warn-and-pass. DEFAULT off: cdk-local warn-and-passes unverifiable IAM requests with a placeholder principalId so local dev exercises app logic without reproducing an auth boundary it cannot fully emulate. OAC-fronted Function URLs always warn-and-pass regardless.").default(false));
|
|
13067
|
+
return cmd.addOption(new Option("--port <port>", "HTTP server port (default: auto-allocate)").default("0")).addOption(new Option("--host <host>", "Bind address").default("127.0.0.1")).addOption(new Option("--stack <name>", "Stack to start (single-stack apps auto-detect)")).addOption(new Option("--all-stacks", "Serve every stack's API in a multi-stack app (each API on its own port) instead of erroring out. Mutually exclusive with a positional target subset, --stack, and an explicit --from-cfn-stack <name>; the bare --from-cfn-stack flag stays compatible (binds each routed stack to its own CFn stack).").default(false)).addOption(new Option("--warm", "Pre-start one container per Lambda at server boot").default(false)).addOption(new Option("--per-lambda-concurrency <n>", "Pool size cap per Lambda (default 2, max 4)").default("2")).addOption(new Option("--no-pull", "Skip docker pull (cached image)")).addOption(new Option("--no-build", "Skip docker build on every container Lambda local-asset build (use the previously-built tag). Requires the deterministic tag to already be in the local registry; errors with an actionable message when missing. No-op for ZIP Lambdas and the IMAGE ECR-pull path. Compatible with --no-pull.")).addOption(new Option("--container-host <host>", "IP the host uses to bind/probe the RIE port (must be a numeric IP — `docker run -p <ip>:<port>:8080` rejects hostnames). Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--debug-port-base <port>", "Reserve a contiguous --debug-port range (one per Lambda)")).addOption(new Option("--debug-port <port>", "Alias of --debug-port-base for parity with `cdkl invoke --debug-port`. Reserves a contiguous --debug-port range (one per Lambda) starting at <port>.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries on the container-Lambda ECR-pull fallback. Issues sts:AssumeRole via the default credential chain and uses the temporary credentials for ecr:GetAuthorizationToken + docker pull. Required when the caller does not have direct cross-account access to the target repository. Same-account / same-region pulls do not need this flag.")).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--assume-role <arn-or-pair>", "Assume the Lambda's execution role and forward STS-issued temp creds. Two forms: (1) `--assume-role <arn>` sets a single global default ARN used for every routed Lambda; (2) `--assume-role <LogicalId>=<arn>` (repeatable) is a per-Lambda override (wins over the global default and over --assume-role-auto for the named Lambda). Pair with --assume-role-auto to auto-resolve every other Lambda. Precedence: per-Lambda > (--assume-role-auto OR global default) > unset (developer creds passed through).").argParser((raw, prev) => parseAssumeRoleToken(raw, prev))).addOption(new Option("--assume-role-auto", "Auto-resolve EACH routed Lambda's own execution role per-Lambda (literal ARN / Fn::GetAtt against template / --from-cfn-stack state). Slower boot — one STS call per Lambda — but the right shape when each Lambda's deployed role differs. Mutually exclusive with `--assume-role <arn>` (global default); errors at boot. Compatible with `--assume-role <LogicalId>=<arn>` per-Lambda overrides — the map wins for named Lambdas, auto-resolve handles the rest.").default(false)).addOption(emulateRoleViaOption("--assume-role")).addOption(new Option("--watch", "Hot-reload: re-synth + re-discover routes when the CDK app's source changes (honors cdk.json watch.include/exclude; cdk.out, cdk.context.json, node_modules, .git are always excluded). Off by default; the server keeps the previous version serving when synth fails mid-reload.").default(false)).addOption(new Option("--stage <name>", "Select an API Gateway Stage by its 'StageName'. Default: the first Stage attached to each API. Drives event.stageVariables for both REST v1 and HTTP API v2. NOTE: For HTTP API v2 routes, requestContext.stage is always '$default' regardless of this flag (AWS-side limitation — HTTP API only exposes one stage to the integration event); only event.stageVariables is affected for v2 routes. For REST v1 routes the selected StageName is also threaded into requestContext.stage.")).addOption(new Option("--api <id>", "DEPRECATED — use the positional <targets...> argument instead. Accepts a SINGLE identifier; for a subset pass multiple positional targets. Same accepted forms (bare logical id, stack-qualified, Construct path, ancestor prefix). Will be removed in a future major release.")).addOption(new Option("--layer-role-arn <arn>", "Role to sts:AssumeRole before calling lambda:GetLayerVersion on every literal-ARN entry in Properties.Layers (issue #448). Use only when the dev credentials cannot read the layer — typically cross-account layers. AWS-published public layers (e.g. Lambda Powertools) are readable from every account and need no role.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in Lambda env vars with the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the resolved stack name per routed stack; pass an explicit value when a single CFn stack should serve every routed stack. Fn::GetAtt is warn-and-dropped in v1 (CFn ListStackResources does not return per-attribute values).")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--mtls-truststore <path>", `PEM-encoded CA bundle for client-certificate verification (mutual TLS). When set, the local server switches from HTTP to HTTPS and the TLS handshake rejects clients whose certificate doesn't chain to one of these CAs. Verified certs are surfaced on the Lambda event under requestContext.identity.clientCert (REST v1) / requestContext.authentication.clientCert (HTTP API v2). Must be set together with --mtls-cert + --mtls-key; partial flag sets are rejected. Generate a CA + server + client cert for local dev: openssl req -x509 -newkey rsa:2048 -nodes -keyout ca-key.pem -out ca.pem -subj "/CN=${getEmbedConfig().resourceNamePrefix}-ca" -days 365; openssl req -newkey rsa:2048 -nodes -keyout server-key.pem -out server-csr.pem -subj "/CN=localhost"; openssl x509 -req -in server-csr.pem -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out server-cert.pem -days 365; openssl req -newkey rsa:2048 -nodes -keyout client-key.pem -out client-csr.pem -subj "/CN=client"; openssl x509 -req -in client-csr.pem -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out client-cert.pem -days 365; curl --cacert ca.pem --cert client-cert.pem --key client-key.pem https://localhost:<port>/...`)).addOption(new Option("--mtls-cert <path>", "PEM-encoded server certificate for mutual TLS. Self-signed is fine for local dev. Must be set together with --mtls-truststore + --mtls-key.")).addOption(new Option("--mtls-key <path>", "PEM-encoded server private key matching --mtls-cert. Must be set together with --mtls-truststore + --mtls-cert.")).addOption(new Option("--strict-sigv4", "Opt-in: DENY AWS_IAM SigV4 requests that cannot be cryptographically verified (foreign access-key-id — e.g. a federated / Cognito Identity Pool / cross-account signer — OR no local AWS credentials configured) instead of the default warn-and-pass. DEFAULT off: cdk-local warn-and-passes unverifiable IAM requests with a placeholder principalId so local dev exercises app logic without reproducing an auth boundary it cannot fully emulate. OAC-fronted Function URLs always warn-and-pass regardless.").default(false));
|
|
13042
13068
|
}
|
|
13043
13069
|
|
|
13044
13070
|
//#endregion
|
|
@@ -13815,6 +13841,10 @@ async function localInvokeAgentCoreCommand(target, options, extraStateProviders)
|
|
|
13815
13841
|
});
|
|
13816
13842
|
try {
|
|
13817
13843
|
await activateWorkloadAwsWiring(options);
|
|
13844
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
13845
|
+
roleFlag: "--assume-role",
|
|
13846
|
+
roleRequested: options.assumeRole !== void 0 && options.assumeRole !== false
|
|
13847
|
+
});
|
|
13818
13848
|
await applyRoleArnIfSet({
|
|
13819
13849
|
roleArn: options.roleArn,
|
|
13820
13850
|
region: options.region,
|
|
@@ -14076,7 +14106,7 @@ async function resolveHostCredentialsForSigV4(options, resolved, loaded, region,
|
|
|
14076
14106
|
const logger = getLogger();
|
|
14077
14107
|
const assumeRoleArn = await resolveAssumeRoleArn(options, resolved, loaded, stateProvider);
|
|
14078
14108
|
if (assumeRoleArn) try {
|
|
14079
|
-
return await assumeAgentCoreExecutionRole(assumeRoleArn, region, options.profile);
|
|
14109
|
+
return await assumeAgentCoreExecutionRole(assumeRoleArn, region, options.profile, options.emulateRoleVia);
|
|
14080
14110
|
} catch (err) {
|
|
14081
14111
|
const sigv4Detail = assumeRoleDetail(err, "STS AssumeRole (--sigv4 signing)");
|
|
14082
14112
|
logger.warn(`--assume-role: STS AssumeRole(${flattenToOneLine(assumeRoleArn)}) failed for --sigv4 signing: ${sigv4Detail}. Falling back to ${options.profile ? `--profile ${displayUntrustedValue(options.profile)}` : "shell credentials"}.`);
|
|
@@ -14182,7 +14212,7 @@ async function resolveAgentCoreCodeImageFromS3(resolved, code, s3Source, options
|
|
|
14182
14212
|
const assumeRoleArn = await resolveAssumeRoleArn(options, resolved, loaded, stateProvider);
|
|
14183
14213
|
let credentials;
|
|
14184
14214
|
if (assumeRoleArn) try {
|
|
14185
|
-
credentials = await assumeAgentCoreExecutionRole(assumeRoleArn, region, options.profile);
|
|
14215
|
+
credentials = await assumeAgentCoreExecutionRole(assumeRoleArn, region, options.profile, options.emulateRoleVia);
|
|
14186
14216
|
} catch (err) {
|
|
14187
14217
|
const bundleDetail = assumeRoleDetail(err, "STS AssumeRole (fromS3 bundle download)");
|
|
14188
14218
|
logger.warn(`--assume-role: STS AssumeRole(${flattenToOneLine(assumeRoleArn)}) failed for the fromS3 bundle download: ${bundleDetail}. Falling back to ${options.profile ? `--profile ${displayUntrustedValue(options.profile)}` : "the default credentials"}.`);
|
|
@@ -14277,6 +14307,7 @@ async function buildContainerEnvWith(resolved, options, profileCredentials, prof
|
|
|
14277
14307
|
const stackRegion = options.stackRegion ?? resolved.stack.region;
|
|
14278
14308
|
await applyAgentCoreCredentialEnv(dockerEnv, {
|
|
14279
14309
|
...assumeRoleArn !== void 0 && { assumeRoleArn },
|
|
14310
|
+
...options.emulateRoleVia !== void 0 && { emulateRoleVia: options.emulateRoleVia },
|
|
14280
14311
|
...options.region !== void 0 && { region: options.region },
|
|
14281
14312
|
...stackRegion !== void 0 && { stackRegion },
|
|
14282
14313
|
...loaded?.region !== void 0 && { stateRegion: loaded.region },
|
|
@@ -14373,7 +14404,7 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
|
|
|
14373
14404
|
if (args.assumeRoleArn) {
|
|
14374
14405
|
const stsRegion = containerRegion;
|
|
14375
14406
|
try {
|
|
14376
|
-
const creds = await assumeAgentCoreExecutionRole(args.assumeRoleArn, stsRegion, args.profile);
|
|
14407
|
+
const creds = await assumeAgentCoreExecutionRole(args.assumeRoleArn, stsRegion, args.profile, args.emulateRoleVia);
|
|
14377
14408
|
dockerEnv["AWS_ACCESS_KEY_ID"] = creds.accessKeyId;
|
|
14378
14409
|
dockerEnv["AWS_SECRET_ACCESS_KEY"] = creds.secretAccessKey;
|
|
14379
14410
|
dockerEnv["AWS_SESSION_TOKEN"] = creds.sessionToken;
|
|
@@ -14502,7 +14533,7 @@ function forwardAwsEnv$1(env) {
|
|
|
14502
14533
|
}
|
|
14503
14534
|
return applyWorkloadEnvCredentials(env);
|
|
14504
14535
|
}
|
|
14505
|
-
async function assumeAgentCoreExecutionRole(roleArn, region, profile) {
|
|
14536
|
+
async function assumeAgentCoreExecutionRole(roleArn, region, profile, emulateRoleVia) {
|
|
14506
14537
|
if (!isIamRoleArn(roleArn)) throw new AssumeRoleFailure(refusedRoleArnMessage(roleArn), `the role ARN is not well-formed: ${describeRejectedRoleArn(roleArn)}`);
|
|
14507
14538
|
const { STSClient, AssumeRoleCommand } = await import("@aws-sdk/client-sts");
|
|
14508
14539
|
const sts = new STSClient(workloadStsClientConfig({
|
|
@@ -14510,11 +14541,26 @@ async function assumeAgentCoreExecutionRole(roleArn, region, profile) {
|
|
|
14510
14541
|
profile
|
|
14511
14542
|
}));
|
|
14512
14543
|
try {
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14544
|
+
let response;
|
|
14545
|
+
try {
|
|
14546
|
+
response = await sts.send(new AssumeRoleCommand({
|
|
14547
|
+
RoleArn: roleArn,
|
|
14548
|
+
RoleSessionName: `${getEmbedConfig().resourceNamePrefix}-invoke-agentcore-${Date.now()}`,
|
|
14549
|
+
DurationSeconds: 3600
|
|
14550
|
+
}));
|
|
14551
|
+
} catch (err) {
|
|
14552
|
+
const emulated = await emulateRoleAfterDeniedAssume(err, {
|
|
14553
|
+
roleArn,
|
|
14554
|
+
region,
|
|
14555
|
+
profile,
|
|
14556
|
+
emulateRoleVia,
|
|
14557
|
+
flag: "--assume-role",
|
|
14558
|
+
sessionNameSuffix: "invoke-agentcore"
|
|
14559
|
+
});
|
|
14560
|
+
if (emulated !== void 0) return emulated;
|
|
14561
|
+
throw err;
|
|
14562
|
+
}
|
|
14563
|
+
const creds = response.Credentials;
|
|
14518
14564
|
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new AssumeRoleFailure(`AssumeRole(${flattenToOneLine(roleArn)}) returned no usable credentials.`, "the response carried no usable credentials");
|
|
14519
14565
|
return {
|
|
14520
14566
|
accessKeyId: creds.AccessKeyId,
|
|
@@ -14846,7 +14892,7 @@ function createLocalInvokeAgentCoreCommand(opts = {}) {
|
|
|
14846
14892
|
}
|
|
14847
14893
|
function addInvokeAgentCoreSpecificOptions(cmd) {
|
|
14848
14894
|
addAwsEndpointOptions(cmd);
|
|
14849
|
-
return cmd.addOption(new Option("-e, --event <file>", "JSON event payload file (default: {})")).addOption(new Option("--event-stdin", "Read event JSON from stdin").default(false)).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--session-id <id>", "AgentCore runtime session id header value (default: a random UUID)")).addOption(new Option("--ws", "Stream over the HTTP-protocol agent's bidirectional /ws WebSocket endpoint (on 8080) instead of POST /invocations: send --event as the first frame and print every received frame to stdout until the agent closes. When stdin is a TTY, additionally reads stdin lines as follow-up text frames (multi-turn REPL; Ctrl-D to end). When stdin is piped / redirected / non-TTY (CI), only the initial --event frame is sent (one-shot). Force one-shot in a TTY with `cdkl ... --ws </dev/null`. Ignored for an MCP runtime.").default(false)).addOption(new Option("--bearer-token <jwt>", "Bearer JWT this command SUPPLIES (the supplier role) when the runtime declares a customJwtAuthorizer — `cdkl invoke-agentcore` is the local-dev client making the outbound call, so it always presents this token to its own invocation. Verified against the runtime's OIDC discovery URL (signature / issuer / expiry / audience) before the container starts, then forwarded to /invocations as Authorization: Bearer <jwt>. Contrast with `cdkl start-alb --bearer-token`, where the role is reversed — the ALB front-door RECEIVES inbound requests and injects this token only as a default when an inbound request has none (default-when-missing).")).addOption(new Option("--no-verify-auth", "Skip inbound JWT verification even when the runtime declares a customJwtAuthorizer (local-dev escape hatch). A --bearer-token, if given, is still forwarded.")).addOption(new Option("--sigv4", "Sign the /invocations POST with AWS SigV4 (service bedrock-agentcore) using the resolved credentials, matching the cloud default when the runtime declares no customJwtAuthorizer. Opt-in: default unsigned. Mutually exclusive with --bearer-token; ignored on a JWT-protected runtime.").default(false)).addOption(new Option("--platform <platform>", "docker --platform for the agent container (linux/amd64 or linux/arm64). Defaults to linux/arm64 because the cloud AgentCore Runtime requires arm64. Override to linux/amd64 only when iterating against an amd64 dev container locally; note the image will not run on the cloud runtime as-is.").choices(["linux/amd64", "linux/arm64"]).default("linux/arm64")).addOption(new Option("--no-pull", "Skip docker pull (use cached image) — no-op for the local-build path")).addOption(new Option("--no-build", "Skip docker build on the local-asset path (use the previously-built tag). No-op for the ECR / registry pull paths.")).addOption(new Option("--container-host <host>", "Host IP the host uses to bind the agent port to. Must be a numeric IP (Docker rejects hostnames here). Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--timeout <ms>", "Per-request timeout in milliseconds. Applied to POST /invocations, POST /mcp, and the /ws open-to-close window. Raise this for long-running agent calls that exceed the default.").default(12e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role [arn]", "Assume the runtime's execution role and forward STS-issued temp credentials to the container so the agent runs with the deployed role. Three forms: (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) uses the runtime's RoleArn when it is a literal ARN; (3) `--no-assume-role` opts out. Off by default — the developer's shell credentials are forwarded unchanged.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries. Same-account / same-region pulls do not need this flag.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Bare form uses the resolved stack name; pass an explicit value when the CFn stack name differs.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--watch", "Re-synth and reload the agent container on CDK source changes. Only meaningful with the long-running --ws session path; single-shot POST /invocations, MCP, and A2A invocations run once and exit, so --watch is logged as a no-op WARN for them and the single shot proceeds. The active /ws socket is closed cleanly on every reload firing so the next session connects to the rebuilt container — the honest local-dev semantic.").default(false));
|
|
14895
|
+
return cmd.addOption(new Option("-e, --event <file>", "JSON event payload file (default: {})")).addOption(new Option("--event-stdin", "Read event JSON from stdin").default(false)).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--session-id <id>", "AgentCore runtime session id header value (default: a random UUID)")).addOption(new Option("--ws", "Stream over the HTTP-protocol agent's bidirectional /ws WebSocket endpoint (on 8080) instead of POST /invocations: send --event as the first frame and print every received frame to stdout until the agent closes. When stdin is a TTY, additionally reads stdin lines as follow-up text frames (multi-turn REPL; Ctrl-D to end). When stdin is piped / redirected / non-TTY (CI), only the initial --event frame is sent (one-shot). Force one-shot in a TTY with `cdkl ... --ws </dev/null`. Ignored for an MCP runtime.").default(false)).addOption(new Option("--bearer-token <jwt>", "Bearer JWT this command SUPPLIES (the supplier role) when the runtime declares a customJwtAuthorizer — `cdkl invoke-agentcore` is the local-dev client making the outbound call, so it always presents this token to its own invocation. Verified against the runtime's OIDC discovery URL (signature / issuer / expiry / audience) before the container starts, then forwarded to /invocations as Authorization: Bearer <jwt>. Contrast with `cdkl start-alb --bearer-token`, where the role is reversed — the ALB front-door RECEIVES inbound requests and injects this token only as a default when an inbound request has none (default-when-missing).")).addOption(new Option("--no-verify-auth", "Skip inbound JWT verification even when the runtime declares a customJwtAuthorizer (local-dev escape hatch). A --bearer-token, if given, is still forwarded.")).addOption(new Option("--sigv4", "Sign the /invocations POST with AWS SigV4 (service bedrock-agentcore) using the resolved credentials, matching the cloud default when the runtime declares no customJwtAuthorizer. Opt-in: default unsigned. Mutually exclusive with --bearer-token; ignored on a JWT-protected runtime.").default(false)).addOption(new Option("--platform <platform>", "docker --platform for the agent container (linux/amd64 or linux/arm64). Defaults to linux/arm64 because the cloud AgentCore Runtime requires arm64. Override to linux/amd64 only when iterating against an amd64 dev container locally; note the image will not run on the cloud runtime as-is.").choices(["linux/amd64", "linux/arm64"]).default("linux/arm64")).addOption(new Option("--no-pull", "Skip docker pull (use cached image) — no-op for the local-build path")).addOption(new Option("--no-build", "Skip docker build on the local-asset path (use the previously-built tag). No-op for the ECR / registry pull paths.")).addOption(new Option("--container-host <host>", "Host IP the host uses to bind the agent port to. Must be a numeric IP (Docker rejects hostnames here). Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--timeout <ms>", "Per-request timeout in milliseconds. Applied to POST /invocations, POST /mcp, and the /ws open-to-close window. Raise this for long-running agent calls that exceed the default.").default(12e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role [arn]", "Assume the runtime's execution role and forward STS-issued temp credentials to the container so the agent runs with the deployed role. Three forms: (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) uses the runtime's RoleArn when it is a literal ARN; (3) `--no-assume-role` opts out. Off by default — the developer's shell credentials are forwarded unchanged.")).addOption(emulateRoleViaOption("--assume-role")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries. Same-account / same-region pulls do not need this flag.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Bare form uses the resolved stack name; pass an explicit value when the CFn stack name differs.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--watch", "Re-synth and reload the agent container on CDK source changes. Only meaningful with the long-running --ws session path; single-shot POST /invocations, MCP, and A2A invocations run once and exit, so --watch is logged as a no-op WARN for them and the single shot proceeds. The active /ws socket is closed cleanly on every reload firing so the next session connects to the rebuilt container — the honest local-dev semantic.").default(false));
|
|
14850
14896
|
}
|
|
14851
14897
|
|
|
14852
14898
|
//#endregion
|
|
@@ -16978,7 +17024,7 @@ const defaultDockerStartImpl = async (containerId, opts = {}) => {
|
|
|
16978
17024
|
const { getActiveWorkloadAwsWiring } = await import("./workload-identity-BONcukjU.js").then((n) => n.B);
|
|
16979
17025
|
const wiring = getActiveWorkloadAwsWiring();
|
|
16980
17026
|
if (wiring) {
|
|
16981
|
-
const { attachLoopbackForwarder } = await import("./docker-runner-
|
|
17027
|
+
const { attachLoopbackForwarder } = await import("./docker-runner-Du4rQJ1q.js").then((n) => n.o);
|
|
16982
17028
|
await attachLoopbackForwarder(containerId, wiring);
|
|
16983
17029
|
}
|
|
16984
17030
|
};
|
|
@@ -19552,6 +19598,10 @@ async function runEcsServiceEmulator(targets, options, strategy, extraStateProvi
|
|
|
19552
19598
|
}, (err) => getLogger().warn(`service cleanup failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
19553
19599
|
try {
|
|
19554
19600
|
await activateWorkloadAwsWiring(options);
|
|
19601
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
19602
|
+
roleFlag: "--assume-role",
|
|
19603
|
+
roleRequested: isRoleFlagRequested(options.assumeRole ?? options.assumeTaskRole)
|
|
19604
|
+
});
|
|
19555
19605
|
await applyRoleArnIfSet({
|
|
19556
19606
|
roleArn: options.roleArn,
|
|
19557
19607
|
region: options.region,
|
|
@@ -19964,10 +20014,10 @@ async function resolveServiceAndRunnerOpts(boot, stacks, options, discovery, ski
|
|
|
19964
20014
|
if (effectiveAssumeRole === true) {
|
|
19965
20015
|
if (!service.task.taskRoleArn) throw new LocalStartServiceError(`--assume-role passed without an ARN but service ${displayIdent(service.serviceLogicalId)} has no resolvable TaskRoleArn. Pass the ARN explicitly: --assume-role <arn>`);
|
|
19966
20016
|
resolvedRoleArn = await resolveTaskRoleArnForOptions$1(service.task.taskRoleArn, options);
|
|
19967
|
-
assumedCredentials = await assumeTaskRole$1(resolvedRoleArn, options.region, options.profile);
|
|
20017
|
+
assumedCredentials = await assumeTaskRole$1(resolvedRoleArn, options.region, options.profile, options.emulateRoleVia, options.assumeRole !== void 0 ? "--assume-role" : "--assume-task-role");
|
|
19968
20018
|
} else if (typeof effectiveAssumeRole === "string") {
|
|
19969
20019
|
resolvedRoleArn = effectiveAssumeRole;
|
|
19970
|
-
assumedCredentials = await assumeTaskRole$1(resolvedRoleArn, options.region, options.profile);
|
|
20020
|
+
assumedCredentials = await assumeTaskRole$1(resolvedRoleArn, options.region, options.profile, options.emulateRoleVia, options.assumeRole !== void 0 ? "--assume-role" : "--assume-task-role");
|
|
19971
20021
|
}
|
|
19972
20022
|
const mixedWiring = getActiveWorkloadAwsWiring()?.mixed;
|
|
19973
20023
|
if (!mixedWiring && discovery.sharedNetwork && resolvedRoleArn !== void 0 && assumedCredentials) try {
|
|
@@ -20051,7 +20101,8 @@ async function resolveAlbLambdaTargetEnv(plan, options, extraStateProviders) {
|
|
|
20051
20101
|
...options.region !== void 0 && { region: options.region },
|
|
20052
20102
|
...options.profile !== void 0 && { profile: options.profile },
|
|
20053
20103
|
...options.stackRegion !== void 0 && { stackRegion: options.stackRegion },
|
|
20054
|
-
...options.envVars !== void 0 && { envVars: options.envVars }
|
|
20104
|
+
...options.envVars !== void 0 && { envVars: options.envVars },
|
|
20105
|
+
...options.emulateRoleVia !== void 0 && { emulateRoleVia: options.emulateRoleVia }
|
|
20055
20106
|
};
|
|
20056
20107
|
const profileCredentials = options.profile ? await resolveProfileCredentials(options.profile) : void 0;
|
|
20057
20108
|
for (const [logicalId, lambda] of lambdas) out.set(logicalId, await resolveLambdaContainerEnv(lambda, envOptions, profileCredentials, extraStateProviders));
|
|
@@ -20324,13 +20375,15 @@ async function resolvePlaceholderAccount$1(arn, region, profile, readFromCfnStac
|
|
|
20324
20375
|
async function resolveTaskRoleArnForOptions$1(arn, options) {
|
|
20325
20376
|
return resolvePlaceholderAccount$1(arn, options.region, options.profile, isCfnFlagPresent(options));
|
|
20326
20377
|
}
|
|
20327
|
-
async function assumeTaskRole$1(roleArn, region, profile) {
|
|
20378
|
+
async function assumeTaskRole$1(roleArn, region, profile, emulateRoleVia, roleFlag = "--assume-role") {
|
|
20328
20379
|
return assumeRoleCredentials({
|
|
20329
20380
|
roleArn,
|
|
20330
20381
|
region,
|
|
20331
20382
|
profile,
|
|
20332
20383
|
sessionNameSuffix: "start-service",
|
|
20333
|
-
makeError: (message) => new LocalStartServiceError(message)
|
|
20384
|
+
makeError: (message) => new LocalStartServiceError(message),
|
|
20385
|
+
emulateRoleVia,
|
|
20386
|
+
roleFlag
|
|
20334
20387
|
});
|
|
20335
20388
|
}
|
|
20336
20389
|
async function createTargetStateProviders(target, stacks, options, extraStateProviders) {
|
|
@@ -20613,7 +20666,7 @@ function ecsClusterOption() {
|
|
|
20613
20666
|
return new Option("--cluster <name>", "Cluster name surfaced to ECS_CONTAINER_METADATA_URI_V4 and used as the docker network prefix").default(getEmbedConfig().resourceNamePrefix);
|
|
20614
20667
|
}
|
|
20615
20668
|
function addEcsAssumeRoleOptions(cmd) {
|
|
20616
|
-
return cmd.addOption(new Option("--assume-task-role [arn]", "Assume the task definition's TaskRoleArn (or the supplied ARN) and forward STS-issued temp credentials via the metadata sidecar so containers run with the deployed task role. Bare flag uses the template's TaskRoleArn; pass an explicit ARN to override. DEPRECATED alias of `--assume-role`; both forms work, but `--assume-role` is the cross-command name and will become the only form in a future release.")).addOption(new Option("--assume-role [arn]", "Assume the task definition's TaskRoleArn (or the supplied ARN) and forward STS-issued temp credentials via the metadata sidecar so containers run with the deployed task role. Bare flag uses the template's TaskRoleArn; pass an explicit ARN to override. Cross-command alias matching the same flag on `invoke` / `invoke-agentcore` / `start-api`; supersedes the older `--assume-task-role` (which still works)."));
|
|
20669
|
+
return cmd.addOption(new Option("--assume-task-role [arn]", "Assume the task definition's TaskRoleArn (or the supplied ARN) and forward STS-issued temp credentials via the metadata sidecar so containers run with the deployed task role. Bare flag uses the template's TaskRoleArn; pass an explicit ARN to override. DEPRECATED alias of `--assume-role`; both forms work, but `--assume-role` is the cross-command name and will become the only form in a future release.")).addOption(new Option("--assume-role [arn]", "Assume the task definition's TaskRoleArn (or the supplied ARN) and forward STS-issued temp credentials via the metadata sidecar so containers run with the deployed task role. Bare flag uses the template's TaskRoleArn; pass an explicit ARN to override. Cross-command alias matching the same flag on `invoke` / `invoke-agentcore` / `start-api`; supersedes the older `--assume-task-role` (which still works).")).addOption(emulateRoleViaOption("--assume-role"));
|
|
20617
20670
|
}
|
|
20618
20671
|
let assumeTaskRoleDeprecationWarned = false;
|
|
20619
20672
|
function isTaskRoleInEffect(options) {
|
|
@@ -20676,6 +20729,10 @@ async function localRunTaskCommand(target, options, extraStateProviders) {
|
|
|
20676
20729
|
};
|
|
20677
20730
|
try {
|
|
20678
20731
|
await activateWorkloadAwsWiring(options);
|
|
20732
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
20733
|
+
roleFlag: "--assume-role",
|
|
20734
|
+
roleRequested: isRoleFlagRequested(options.assumeRole ?? options.assumeTaskRole)
|
|
20735
|
+
});
|
|
20679
20736
|
await applyRoleArnIfSet({
|
|
20680
20737
|
roleArn: options.roleArn,
|
|
20681
20738
|
region: options.region,
|
|
@@ -20735,10 +20792,10 @@ async function localRunTaskCommand(target, options, extraStateProviders) {
|
|
|
20735
20792
|
if (effectiveAssumeRole === true) {
|
|
20736
20793
|
if (!task.taskRoleArn) throw new Error(`--assume-role passed without an ARN but the task definition has no resolvable TaskRoleArn. Either the task definition does not set TaskRoleArn, or it points at a resource ${getEmbedConfig().binaryName} cannot resolve to an IAM Role at synth time. Pass the ARN explicitly: --assume-role <arn>`);
|
|
20737
20794
|
resolvedRoleArn = await resolveTaskRoleArnForOptions(task.taskRoleArn, options);
|
|
20738
|
-
assumedCredentials = await assumeTaskRole(resolvedRoleArn, options.region, options.profile);
|
|
20795
|
+
assumedCredentials = await assumeTaskRole(resolvedRoleArn, options.region, options.profile, options.emulateRoleVia, options.assumeRole !== void 0 ? "--assume-role" : "--assume-task-role");
|
|
20739
20796
|
} else if (typeof effectiveAssumeRole === "string") {
|
|
20740
20797
|
resolvedRoleArn = effectiveAssumeRole;
|
|
20741
|
-
assumedCredentials = await assumeTaskRole(resolvedRoleArn, options.region, options.profile);
|
|
20798
|
+
assumedCredentials = await assumeTaskRole(resolvedRoleArn, options.region, options.profile, options.emulateRoleVia, options.assumeRole !== void 0 ? "--assume-role" : "--assume-task-role");
|
|
20742
20799
|
}
|
|
20743
20800
|
const sidecarCredentials = await resolveSidecarCredentials(options, assumedCredentials);
|
|
20744
20801
|
const credsDelivery = containerCredentialDelivery(options, sidecarCredentials, assumedCredentials);
|
|
@@ -20844,12 +20901,14 @@ async function resolvePlaceholderAccount(arn, region, profile, readFromCfnStack)
|
|
|
20844
20901
|
async function resolveTaskRoleArnForOptions(arn, options) {
|
|
20845
20902
|
return resolvePlaceholderAccount(arn, options.region, options.profile, isCfnFlagPresent(options));
|
|
20846
20903
|
}
|
|
20847
|
-
async function assumeTaskRole(roleArn, region, profile) {
|
|
20904
|
+
async function assumeTaskRole(roleArn, region, profile, emulateRoleVia, roleFlag = "--assume-role") {
|
|
20848
20905
|
return assumeRoleCredentials({
|
|
20849
20906
|
roleArn,
|
|
20850
20907
|
region,
|
|
20851
20908
|
profile,
|
|
20852
|
-
sessionNameSuffix: "run-task"
|
|
20909
|
+
sessionNameSuffix: "run-task",
|
|
20910
|
+
emulateRoleVia,
|
|
20911
|
+
roleFlag
|
|
20853
20912
|
});
|
|
20854
20913
|
}
|
|
20855
20914
|
async function buildEcsImageResolutionContext(candidate, stateProvider, options, stateProviderFor) {
|
|
@@ -24787,7 +24846,8 @@ function buildLambdaEnvOptions(options, extraStateProviders) {
|
|
|
24787
24846
|
...options.region !== void 0 && { region: options.region },
|
|
24788
24847
|
...options.profile !== void 0 && { profile: options.profile },
|
|
24789
24848
|
...options.stackRegion !== void 0 && { stackRegion: options.stackRegion },
|
|
24790
|
-
...options.envVars !== void 0 && { envVars: options.envVars }
|
|
24849
|
+
...options.envVars !== void 0 && { envVars: options.envVars },
|
|
24850
|
+
...options.emulateRoleVia !== void 0 && { emulateRoleVia: options.emulateRoleVia }
|
|
24791
24851
|
};
|
|
24792
24852
|
}
|
|
24793
24853
|
function lambdaEdgeEnvOptions(envOptions) {
|
|
@@ -24890,6 +24950,10 @@ async function localStartCloudFrontCommand(target, options, extraStateProviders,
|
|
|
24890
24950
|
const originOverrides = parseOriginOverrides(options.origin);
|
|
24891
24951
|
const tlsRequested = options.tls === true || options.tlsCert !== void 0 || options.tlsKey !== void 0;
|
|
24892
24952
|
await activateWorkloadAwsWiring(options);
|
|
24953
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
24954
|
+
roleFlag: "--assume-role",
|
|
24955
|
+
roleRequested: options.assumeRole !== void 0 && options.assumeRole !== false
|
|
24956
|
+
});
|
|
24893
24957
|
await applyRoleArnIfSet({
|
|
24894
24958
|
roleArn: options.roleArn,
|
|
24895
24959
|
region: options.region,
|
|
@@ -25065,7 +25129,7 @@ function createLocalStartCloudFrontCommand(opts = {}) {
|
|
|
25065
25129
|
}
|
|
25066
25130
|
function addStartCloudFrontSpecificOptions(cmd) {
|
|
25067
25131
|
addAwsEndpointOptions(cmd);
|
|
25068
|
-
return cmd.addOption(new Option("--port <port>", "HTTP server port (default: auto-allocate)").default("0")).addOption(new Option("--host <host>", "Bind address").default("127.0.0.1")).addOption(new Option("--origin <originId=dir>", "Point a distribution origin at a local directory (repeatable). Use when cdk-local cannot resolve the origin's BucketDeployment source automatically (content uploaded out of band, or a non-CDK bucket).").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--kvs-file <key=file.json>", "Back a CloudFront Function's KeyValueStore reads (cf.kvs().get()) with a local JSON map (repeatable). The key is a KeyValueStore handle — its AWS::CloudFront::KeyValueStore resource logical id, its construct path, or its bare construct id; the file is a flat { \"key\": \"value\" } object. The AWS-free alternative to --from-cfn-stack, which instead reads the deployed store via the GetKey API.").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--tls", "Terminate real TLS (HTTPS). Uses --tls-cert / --tls-key when supplied, else an auto-generated self-signed cert.").default(false)).addOption(new Option("--tls-cert <path>", "PEM server certificate for --tls (implies --tls).")).addOption(new Option("--tls-key <path>", "PEM server private key for --tls (implies --tls).")).addOption(new Option("--no-pull", "Skip 'docker pull' for a Lambda Function URL / Web Function origin's base image (use the locally cached image).")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Bind to a deployed CloudFormation stack (ListStackResources). Resolves an S3 origin that has no local BucketDeployment source to its deployed bucket and serves it from real S3 on demand (the front/back-split case: files uploaded out of band), and resolves a Lambda Function URL / Lambda@Edge function's or a Web Function origin revision's env vars to the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the resolved stack name; pass a value when the CFn stack name differs.")).addOption(new Option("--cache-origin", "For a deployed-S3 origin (served from real S3 under --from-cfn-stack): keep fetched objects in memory for the session instead of re-reading on every request. Faster repeat reads / fewer S3 GETs, but an out-of-band S3 content change is not reflected until a --watch reload (which clears the cache) or a restart. Off by default (every request re-reads, always current). Not CloudFront CDN caching.").default(false)).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--assume-role [arn]", "Assume a Lambda Function URL origin's (or a Web Function origin revision's) execution role and forward STS-issued temp credentials into its container so the handler runs with the deployed permissions. Three forms: `--assume-role <arn>` (explicit ARN); `--assume-role` (bare, auto-resolves from state — requires --from-cfn-stack); `--no-assume-role` (opt out). Off by default (the dev shell credentials are forwarded).")).addOption(new Option("--env-vars <file>", "JSON env-var overrides for the Lambda Function URL and Lambda Web Function endpoint origins (SAM-compatible, the same file as the other commands: {\"Parameters\": {...}} for every origin, {\"<LogicalId or construct path>\": {\"KEY\": \"VALUE\"}} for one — the backing function, or the Web Function revision the endpoint serves; a null value removes the variable). Not applied to Lambda@Edge functions, which cannot carry environment variables in AWS.")).addOption(new Option("--watch", "Hot-reload: re-synth + re-resolve the distribution when the CDK app's source changes (honors cdk.json watch.include/exclude; cdk.out, cdk.context.json, node_modules, .git are always excluded). The server keeps the previous version serving when synth fails mid-reload.").default(false));
|
|
25132
|
+
return cmd.addOption(new Option("--port <port>", "HTTP server port (default: auto-allocate)").default("0")).addOption(new Option("--host <host>", "Bind address").default("127.0.0.1")).addOption(new Option("--origin <originId=dir>", "Point a distribution origin at a local directory (repeatable). Use when cdk-local cannot resolve the origin's BucketDeployment source automatically (content uploaded out of band, or a non-CDK bucket).").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--kvs-file <key=file.json>", "Back a CloudFront Function's KeyValueStore reads (cf.kvs().get()) with a local JSON map (repeatable). The key is a KeyValueStore handle — its AWS::CloudFront::KeyValueStore resource logical id, its construct path, or its bare construct id; the file is a flat { \"key\": \"value\" } object. The AWS-free alternative to --from-cfn-stack, which instead reads the deployed store via the GetKey API.").argParser((value, prev) => [...prev ?? [], value])).addOption(new Option("--tls", "Terminate real TLS (HTTPS). Uses --tls-cert / --tls-key when supplied, else an auto-generated self-signed cert.").default(false)).addOption(new Option("--tls-cert <path>", "PEM server certificate for --tls (implies --tls).")).addOption(new Option("--tls-key <path>", "PEM server private key for --tls (implies --tls).")).addOption(new Option("--no-pull", "Skip 'docker pull' for a Lambda Function URL / Web Function origin's base image (use the locally cached image).")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Bind to a deployed CloudFormation stack (ListStackResources). Resolves an S3 origin that has no local BucketDeployment source to its deployed bucket and serves it from real S3 on demand (the front/back-split case: files uploaded out of band), and resolves a Lambda Function URL / Lambda@Edge function's or a Web Function origin revision's env vars to the deployed physical IDs / exports. Use for CDK apps deployed via the upstream CDK CLI (`cdk deploy`). Bare form uses the resolved stack name; pass a value when the CFn stack name differs.")).addOption(new Option("--cache-origin", "For a deployed-S3 origin (served from real S3 under --from-cfn-stack): keep fetched objects in memory for the session instead of re-reading on every request. Faster repeat reads / fewer S3 GETs, but an out-of-band S3 content change is not reflected until a --watch reload (which clears the cache) or a restart. Off by default (every request re-reads, always current). Not CloudFront CDN caching.").default(false)).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--assume-role [arn]", "Assume a Lambda Function URL origin's (or a Web Function origin revision's) execution role and forward STS-issued temp credentials into its container so the handler runs with the deployed permissions. Three forms: `--assume-role <arn>` (explicit ARN); `--assume-role` (bare, auto-resolves from state — requires --from-cfn-stack); `--no-assume-role` (opt out). Off by default (the dev shell credentials are forwarded).")).addOption(emulateRoleViaOption("--assume-role")).addOption(new Option("--env-vars <file>", "JSON env-var overrides for the Lambda Function URL and Lambda Web Function endpoint origins (SAM-compatible, the same file as the other commands: {\"Parameters\": {...}} for every origin, {\"<LogicalId or construct path>\": {\"KEY\": \"VALUE\"}} for one — the backing function, or the Web Function revision the endpoint serves; a null value removes the variable). Not applied to Lambda@Edge functions, which cannot carry environment variables in AWS.")).addOption(new Option("--watch", "Hot-reload: re-synth + re-resolve the distribution when the CDK app's source changes (honors cdk.json watch.include/exclude; cdk.out, cdk.context.json, node_modules, .git are always excluded). The server keeps the previous version serving when synth fails mid-reload.").default(false));
|
|
25069
25133
|
}
|
|
25070
25134
|
|
|
25071
25135
|
//#endregion
|
|
@@ -25451,6 +25515,10 @@ async function localStartAgentCoreCommand(target, options, extraStateProviders,
|
|
|
25451
25515
|
} catch {}
|
|
25452
25516
|
};
|
|
25453
25517
|
await activateWorkloadAwsWiring(options);
|
|
25518
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
25519
|
+
roleFlag: "--assume-role",
|
|
25520
|
+
roleRequested: options.assumeRole !== void 0 && options.assumeRole !== false
|
|
25521
|
+
});
|
|
25454
25522
|
await applyRoleArnIfSet({
|
|
25455
25523
|
roleArn: options.roleArn,
|
|
25456
25524
|
region: options.region,
|
|
@@ -25706,7 +25774,7 @@ function createLocalStartAgentCoreCommand(opts = {}) {
|
|
|
25706
25774
|
}
|
|
25707
25775
|
function addStartAgentCoreSpecificOptions(cmd) {
|
|
25708
25776
|
addAwsEndpointOptions(cmd);
|
|
25709
|
-
return cmd.addOption(new Option("--port <n>", "Serve bind port the client connects to (HTTP contract + /ws on the same port). Default 0 (OS-assigned).").default(0).argParser(parsePort$2)).addOption(new Option("--host <ip>", "Serve bind host. Default 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--session-id <id>", "Pin one AgentCore runtime session id header value for every forwarded request / /ws connection (default: a fresh random UUID each, so each is its own session).")).addOption(new Option("--bearer-token <jwt>", "Bearer JWT to present when the runtime declares a customJwtAuthorizer. Verified against the runtime's OIDC discovery URL before the container starts, then injected as Authorization: Bearer <jwt> on every forwarded request and the container /ws upgrade.")).addOption(new Option("--no-verify-auth", "Skip inbound JWT verification even when the runtime declares a customJwtAuthorizer (local-dev escape hatch). A --bearer-token, if given, is still forwarded.")).addOption(new Option("--sigv4", "Sign each forwarded request with AWS SigV4 (service bedrock-agentcore) when the runtime declares NO customJwtAuthorizer, so the warm container sees the same Authorization / X-Amz-* headers the cloud receives. Mutually exclusive with --bearer-token; ignored (with a warning) when a customJwtAuthorizer is declared.")).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--platform <platform>", "docker --platform for the agent container (linux/amd64 or linux/arm64). Defaults to linux/arm64 because the cloud AgentCore Runtime requires arm64.").choices(["linux/amd64", "linux/arm64"]).default("linux/arm64")).addOption(new Option("--watch", "Re-synth + reload the warm container in place on a CDK source change, keeping the serve up. A per-firing classifier picks rebuild (boot a fresh container, re-point the serve) vs soft-reload (docker cp + docker restart the same container) — the same pattern as start-service / invoke-agentcore --ws --watch.")).addOption(new Option("--no-pull", "Skip docker pull (use cached image) — no-op for the local-build path")).addOption(new Option("--no-build", "Skip docker build on the local-asset path (use the previously-built tag). No-op for the ECR / registry pull paths.")).addOption(new Option("--container-host <host>", "Host IP used to bind the agent container port. Must be a numeric IP. Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--timeout <ms>", "Maximum time in milliseconds to wait for the container to become ready (the GET /ping readiness deadline). Default 120000.").default(12e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role [arn]", "Assume the runtime's execution role and forward STS-issued temp credentials to the container. (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) uses the runtime's literal RoleArn; (3) `--no-assume-role` opts out. Off by default.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack and substitute Ref / Fn::ImportValue in env vars / image URIs with the deployed physical IDs / exports. Bare form uses the resolved stack name.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region."));
|
|
25777
|
+
return cmd.addOption(new Option("--port <n>", "Serve bind port the client connects to (HTTP contract + /ws on the same port). Default 0 (OS-assigned).").default(0).argParser(parsePort$2)).addOption(new Option("--host <ip>", "Serve bind host. Default 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--session-id <id>", "Pin one AgentCore runtime session id header value for every forwarded request / /ws connection (default: a fresh random UUID each, so each is its own session).")).addOption(new Option("--bearer-token <jwt>", "Bearer JWT to present when the runtime declares a customJwtAuthorizer. Verified against the runtime's OIDC discovery URL before the container starts, then injected as Authorization: Bearer <jwt> on every forwarded request and the container /ws upgrade.")).addOption(new Option("--no-verify-auth", "Skip inbound JWT verification even when the runtime declares a customJwtAuthorizer (local-dev escape hatch). A --bearer-token, if given, is still forwarded.")).addOption(new Option("--sigv4", "Sign each forwarded request with AWS SigV4 (service bedrock-agentcore) when the runtime declares NO customJwtAuthorizer, so the warm container sees the same Authorization / X-Amz-* headers the cloud receives. Mutually exclusive with --bearer-token; ignored (with a warning) when a customJwtAuthorizer is declared.")).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--platform <platform>", "docker --platform for the agent container (linux/amd64 or linux/arm64). Defaults to linux/arm64 because the cloud AgentCore Runtime requires arm64.").choices(["linux/amd64", "linux/arm64"]).default("linux/arm64")).addOption(new Option("--watch", "Re-synth + reload the warm container in place on a CDK source change, keeping the serve up. A per-firing classifier picks rebuild (boot a fresh container, re-point the serve) vs soft-reload (docker cp + docker restart the same container) — the same pattern as start-service / invoke-agentcore --ws --watch.")).addOption(new Option("--no-pull", "Skip docker pull (use cached image) — no-op for the local-build path")).addOption(new Option("--no-build", "Skip docker build on the local-asset path (use the previously-built tag). No-op for the ECR / registry pull paths.")).addOption(new Option("--container-host <host>", "Host IP used to bind the agent container port. Must be a numeric IP. Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--timeout <ms>", "Maximum time in milliseconds to wait for the container to become ready (the GET /ping readiness deadline). Default 120000.").default(12e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role [arn]", "Assume the runtime's execution role and forward STS-issued temp credentials to the container. (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) uses the runtime's literal RoleArn; (3) `--no-assume-role` opts out. Off by default.")).addOption(emulateRoleViaOption("--assume-role")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack and substitute Ref / Fn::ImportValue in env vars / image URIs with the deployed physical IDs / exports. Bare form uses the resolved stack name.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region."));
|
|
25710
25778
|
}
|
|
25711
25779
|
|
|
25712
25780
|
//#endregion
|
|
@@ -25721,6 +25789,10 @@ async function localStartWebFunctionCommand(target, options, extraStateProviders
|
|
|
25721
25789
|
if (options.verbose) logger.setLevel("debug");
|
|
25722
25790
|
const forever = () => new Promise(() => void 0);
|
|
25723
25791
|
await activateWorkloadAwsWiring(options);
|
|
25792
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
25793
|
+
roleFlag: "--assume-role",
|
|
25794
|
+
roleRequested: options.assumeRole !== void 0 && options.assumeRole !== false
|
|
25795
|
+
});
|
|
25724
25796
|
await applyRoleArnIfSet({
|
|
25725
25797
|
roleArn: options.roleArn,
|
|
25726
25798
|
region: options.region,
|
|
@@ -25820,7 +25892,7 @@ function createLocalStartWebFunctionCommand(opts = {}) {
|
|
|
25820
25892
|
}
|
|
25821
25893
|
function addStartWebFunctionSpecificOptions(cmd) {
|
|
25822
25894
|
addAwsEndpointOptions(cmd);
|
|
25823
|
-
return cmd.addOption(new Option("--revision <logicalId>", "Serve this WebFunctionRevision (logical ID) instead of the one the endpoint weights pick.")).addOption(new Option("--port <n>", "Local port to serve on. Default 0 (OS-assigned).").default(0).argParser(parsePort$1)).addOption(new Option("--host <ip>", "Address to publish the port on.").default("127.0.0.1")).addOption(new Option("--platform <platform>", "docker --platform for the server container. Defaults to the runtime's cloud architecture (linux/arm64 for nodejs24.x).").choices(["linux/amd64", "linux/arm64"])).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"RevisionLogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--no-pull", "Skip docker pull of the runtime base image (use the cached image)")).addOption(new Option("--timeout <ms>", "Maximum time in milliseconds to wait for the server to answer HTTP. Default 60000.").default(6e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role [arn]", "Assume the revision's execution role and forward STS-issued temp credentials to the container. (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) uses the revision's ServiceConfig.ExecutionRoleArn: a literal ARN as written, or the Fn::GetAtt / Ref CDK synthesizes resolved against --from-cfn-stack deployed state; (3) `--no-assume-role` opts out. Off by default.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Bare form uses the resolved stack name.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region."));
|
|
25895
|
+
return cmd.addOption(new Option("--revision <logicalId>", "Serve this WebFunctionRevision (logical ID) instead of the one the endpoint weights pick.")).addOption(new Option("--port <n>", "Local port to serve on. Default 0 (OS-assigned).").default(0).argParser(parsePort$1)).addOption(new Option("--host <ip>", "Address to publish the port on.").default("127.0.0.1")).addOption(new Option("--platform <platform>", "docker --platform for the server container. Defaults to the runtime's cloud architecture (linux/arm64 for nodejs24.x).").choices(["linux/amd64", "linux/arm64"])).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"RevisionLogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--no-pull", "Skip docker pull of the runtime base image (use the cached image)")).addOption(new Option("--timeout <ms>", "Maximum time in milliseconds to wait for the server to answer HTTP. Default 60000.").default(6e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role [arn]", "Assume the revision's execution role and forward STS-issued temp credentials to the container. (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) uses the revision's ServiceConfig.ExecutionRoleArn: a literal ARN as written, or the Fn::GetAtt / Ref CDK synthesizes resolved against --from-cfn-stack deployed state; (3) `--no-assume-role` opts out. Off by default.")).addOption(emulateRoleViaOption("--assume-role")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Bare form uses the resolved stack name.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region."));
|
|
25824
25896
|
}
|
|
25825
25897
|
|
|
25826
25898
|
//#endregion
|
|
@@ -26831,6 +26903,10 @@ async function localStartMicrovmCommand(target, options, extraStateProviders, ho
|
|
|
26831
26903
|
};
|
|
26832
26904
|
const teardown = () => teardownPromise ??= doTeardown();
|
|
26833
26905
|
await activateWorkloadAwsWiring(options);
|
|
26906
|
+
warnIfEmulateRoleViaUnused(options.emulateRoleVia, {
|
|
26907
|
+
roleFlag: "--assume-role",
|
|
26908
|
+
roleRequested: options.assumeRole !== void 0
|
|
26909
|
+
});
|
|
26834
26910
|
await applyRoleArnIfSet({
|
|
26835
26911
|
roleArn: options.roleArn,
|
|
26836
26912
|
region: options.region,
|
|
@@ -27011,7 +27087,7 @@ function createLocalStartMicrovmCommand(opts = {}) {
|
|
|
27011
27087
|
}
|
|
27012
27088
|
function addStartMicrovmSpecificOptions(cmd) {
|
|
27013
27089
|
addAwsEndpointOptions(cmd);
|
|
27014
|
-
return cmd.addOption(new Option("--count <n>", "Number of independent MicroVMs to run, each with its own URL.").default(1).argParser(parseCount)).addOption(new Option("--run-hook-payload <string>", "The runHookPayload string delivered to each MicroVM's /run hook (max 16 KB).")).addOption(new Option("--run-hook-payload-file <path>", "Read the runHookPayload from a file (mutually exclusive with --run-hook-payload).")).addOption(new Option("--port <n>", "Local port of the first MicroVM; MicroVM i listens on <n>+i. Default 0 (OS-assigned).").default(0).argParser(parsePort)).addOption(new Option("--host <ip>", "Address the MicroVM URLs listen on.").default("127.0.0.1")).addOption(new Option("--platform <platform>", "docker --platform for the build and the containers. Defaults to the image's CpuConfigurations architecture.").choices(["linux/amd64", "linux/arm64"])).addOption(new Option("--proxy-port <port>", "An extra container port X-aws-proxy-port may route to (repeatable). 8080, Hooks.Port and the image's EXPOSE ports are always routable.").argParser(parseProxyPort)).addOption(new Option("--auto-resume", "Resume a suspended MicroVM on its next request instead of answering 503 (autoResumeEnabled).")).addOption(new Option("--no-build-cache", "Build the image with docker build --no-cache.")).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"MicrovmImageLogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--timeout <ms>", "Default deadline in milliseconds for each hook without its own <Hook>TimeoutInSeconds (/terminate defaults to 10000), and for the app to answer HTTP when there is no /ready hook. Default 60000.").default(6e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role <arn>", "Assume this role (the MicroVM's execution role, a run-microvm parameter rather than part of the template) and forward STS-issued temp credentials to the containers. Off by default: the shell credentials are forwarded.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Bare form uses the resolved stack name.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region."));
|
|
27090
|
+
return cmd.addOption(new Option("--count <n>", "Number of independent MicroVMs to run, each with its own URL.").default(1).argParser(parseCount)).addOption(new Option("--run-hook-payload <string>", "The runHookPayload string delivered to each MicroVM's /run hook (max 16 KB).")).addOption(new Option("--run-hook-payload-file <path>", "Read the runHookPayload from a file (mutually exclusive with --run-hook-payload).")).addOption(new Option("--port <n>", "Local port of the first MicroVM; MicroVM i listens on <n>+i. Default 0 (OS-assigned).").default(0).argParser(parsePort)).addOption(new Option("--host <ip>", "Address the MicroVM URLs listen on.").default("127.0.0.1")).addOption(new Option("--platform <platform>", "docker --platform for the build and the containers. Defaults to the image's CpuConfigurations architecture.").choices(["linux/amd64", "linux/arm64"])).addOption(new Option("--proxy-port <port>", "An extra container port X-aws-proxy-port may route to (repeatable). 8080, Hooks.Port and the image's EXPOSE ports are always routable.").argParser(parseProxyPort)).addOption(new Option("--auto-resume", "Resume a suspended MicroVM on its next request instead of answering 503 (autoResumeEnabled).")).addOption(new Option("--no-build-cache", "Build the image with docker build --no-cache.")).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"MicrovmImageLogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--timeout <ms>", "Default deadline in milliseconds for each hook without its own <Hook>TimeoutInSeconds (/terminate defaults to 10000), and for the app to answer HTTP when there is no /ready hook. Default 60000.").default(6e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role <arn>", "Assume this role (the MicroVM's execution role, a run-microvm parameter rather than part of the template) and forward STS-issued temp credentials to the containers. Off by default: the shell credentials are forwarded.")).addOption(emulateRoleViaOption("--assume-role")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Bare form uses the resolved stack name.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region."));
|
|
27015
27091
|
}
|
|
27016
27092
|
|
|
27017
27093
|
//#endregion
|
|
@@ -32359,4 +32435,4 @@ function addStudioSpecificOptions(cmd) {
|
|
|
32359
32435
|
|
|
32360
32436
|
//#endregion
|
|
32361
32437
|
export { postHook as $, withoutKeys as $a, probeHostGatewaySupport as $i, addImageOverrideOptions as $n, resolveApiTargetSubset as $r, classifyS3Error as $t, microvmFidelityWarnings as A, filterWebSocketApisByIdentifiers as Aa, translateLambdaResponse as Ai, stripCloudFrontImport as An, A2A_CONTAINER_PORT as Ar, readContainerLogTail as At, MICROVM_WS_BASE_PROTOCOL as B, AGENTCORE_RUNTIME_TYPE as Ba, ConnectionRegistry as Bi, createLocalStartAlbCommand as Bn, AGENTCORE_SESSION_ID_HEADER as Br, parseWebFunctionBuildConfig as Bt, addListSpecificOptions as C, resolveWatchConfig as Ca, attachAuthorizers as Ci, WEB_FUNCTION_REVISION_TYPE as Cn, setShadowReadyTimeoutMs as Cr, parseKvsFileOverrides as Ct, buildMicrovmLambdaView as D, availableWebSocketApiIdentifiers as Da, isFunctionUrlOacFronted as Di, compileCloudFrontFunction as Dn, createLocalInvokeAgentCoreCommand as Dr, WEB_FUNCTION_CONTAINER_PORT as Dt, addStartMicrovmSpecificOptions as E, listTargets as Ea, buildCorsConfigFromCloudFrontChain as Ei, resolveWebFunctionTarget as En, addInvokeAgentCoreSpecificOptions as Er, RecentOutput as Et, microvmImageTag as F, resolveLambdaArnIntrinsic as Fa, pickResponseTemplate as Fi, findFileAssetForObjectKey as Fn, MCP_PROTOCOL_VERSION as Fr, buildNodeEntryFileStart as Ft, startMicrovmFrontDoor as G, DynamicReferenceResolver as Ga, buildDisconnectEvent as Gi, addStartServiceSpecificOptions as Gn, SUPPORTED_CODE_RUNTIMES as Gr, readWebFunctionServiceConfig as Gt, PROXY_PORT_HEADER as H, pickAgentCoreCandidateStack as Ha, handleConnectionsRequest as Hi, resolveAlbTarget as Hn, waitForAgentCoreHttpReady as Hr, WEB_FUNCTION_HTTP_ENDPOINT_ENV as Ht, planMicrovmPorts as I, AGENTCORE_A2A_PROTOCOL as Ia, selectIntegrationResponse as Ii, isBucketDeploymentResource as In, mcpInvokeOnce as Ir, defaultWebFunctionPlatform as It, MICROVM_HOOK_PATH_PREFIX as J, firstUsableRegion as Ja, createFileWatcher as Ji, addRunTaskSpecificOptions as Jn, renderCodeDockerfile as Jr, idFromArn as Jt, stripMicrovmProxyHeaders as K, containsDynamicReference as Ka, buildMessageEvent as Ki, createLocalStartServiceCommand as Kn, buildAgentCoreCodeImage as Kr, webFunctionAssumeRole as Kt, readExposedPorts as L, AGENTCORE_AGUI_PROTOCOL as La, tryParseStatus as Li, resolveBucketDeploymentObjectKey as Ln, parseSseForJsonRpc as Lr, resolveWebFunctionRuntime as Lt, DEFAULT_TERMINATE_HOOK_TIMEOUT_MS as M, webSocketApiMatchesIdentifier as Ma, buildHttpApiV2Event as Mi, createLocalFileKvsDataSource as Mn, a2aInvokeOnce as Mr, waitForWebFunctionReady as Mt, LocalMicrovm as N, discoverRoutes as Na, buildRestV1Event as Ni, createUnboundCloudFrontModule as Nn, MCP_CONTAINER_PORT as Nr, watchContainerExit as Nt, createLocalStartMicrovmCommand as O, discoverWebSocketApis as Oa, matchPreflight as Oi, runViewerRequest as On, bridgeAgentCoreWs as Or, containerFailure as Ot, buildMicrovmImage as P, pickRefLogicalId as Pa, evaluateResponseParameters as Pi, bucketDeploymentSourceObjectKeys as Pn, MCP_PATH as Pr, WEB_FUNCTION_RUNTIMES as Pt, pollBuildHook as Q, resolveDynamicReferencesInEnv as Qa, HOST_GATEWAY_MIN_VERSION as Qi, addEcsAssumeRoleOptions as Qn, createWatchPredicates as Qr, resolveDeployedOriginBucket as Qt, setContainerPaused as R, AGENTCORE_HTTP_PROTOCOL as Ra, VtlEvaluationError as Ri, addAlbSpecificOptions as Rn, AGENTCORE_SIGV4_SERVICE as Rr, supportedWebFunctionRuntimes as Rt, StudioEventBus as S, resolveSsmParameters as Sa, invokeTokenAuthorizer as Si, WEB_FUNCTION_ENDPOINT_TYPE as Sn, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as Sr, normalizeKvsFileKeys as St, formatTargetListing as T, countTargets as Ta, buildCorsConfigByApiId as Ti, WebFunctionResolutionError as Tn, attachContainerLogStreamer as Tr, resolveCloudFrontTarget as Tt, rewriteUpgradeResponseHead as U, resolveAgentCoreTarget as Ua, parseConnectionsPath as Ui, isApplicationLoadBalancer as Un, waitForAgentCorePing as Ur, buildWebFunctionLambdaView as Ut, MicrovmStateError as V, AgentCoreResolutionError as Va, buildMgmtEndpointEnvUrl as Vi, parseLbPortOverrides as Vn, invokeAgentCore as Vr, resolveWebFunctionArtifact as Vt, selectTargetPort as W, DynamicReferenceResolutionError as Wa, buildConnectEvent as Wi, resolveAlbFrontDoor as Wn, downloadAndExtractS3Bundle as Wr, finalizeWebFunctionEnv as Wt, callRuntimeHook as X, keysOverriddenBy as Xa, createLocalInvokeCommand as Xi, MAX_TASKS_SUBNET_RANGE_CAP as Xn, addStartApiSpecificOptions as Xr, createDeployedKvsDataSource as Xt, MicrovmHookError as Y, keysNotFromTemplate as Ya, addInvokeSpecificOptions as Yi, createLocalRunTaskCommand as Yn, toCmdArgv as Yr, resolveKvsModulesForDistribution as Yt, generateMicrovmId as Z, parseDynamicReference as Za, HOST_DOCKER_INTERNAL_GATEWAY as Zi, addCommonEcsServiceOptions as Zn, createLocalStartApiCommand as Zr, resolveDeployedKvsArnByName as Zt, filterStudioTargetGroups as _, resolveCfnFallbackRegion as _a, verifyJwtViaDiscovery as _i, pickKvsLogicalIdFromArn as _n, isLocalCdkAssetImage as _r, attachAgentCoreWsBridge as _t, createLocalStudioCommand as a, assertEcsTaskImagesResolvable as aa, filterRoutesByApiIdentifiers as ai, serveLambdaUrlOrigin as an, resolveSharedSidecarCredentials as ar, disposeMicrovmCodeArtifact as at, renderStudioHtml as b, CfnLocalStateProvider as ba, evaluateCachedLambdaPolicy as bi, pickWebFunctionEndpointLogicalIdFromOrigin as bn, CloudMapRegistry as br, addStartCloudFrontSpecificOptions as bt, startStudioProxy as c, substituteEnvVarsFromState as ca, startApiServer as ci, buildEdgeRequestEvent as cn, buildImageOverrideTag as cr, resolveMicrovmImageTarget as ct, createStudioDispatcher as d, LocalStateSourceError as da, defaultCredentialsLoader as di, httpHeadersToEdge as dn, mergeForService as dr, createLocalStartWebFunctionCommand as dt, resolveHostGatewayExtraHosts as ea, createAuthorizerCache as ei, createS3OriginReader as en, addAwsEndpointOptions as eo, buildEcsImageResolutionContext$1 as er, runHookBody as et, filterStudioCustomResources as f, UNNAMED_WORKLOAD as fa, buildCognitoJwksUrl as fi, CLOUDFRONT_DISTRIBUTION_TYPE as fn, parseImageOverrideFlags as fr, addStartAgentCoreSpecificOptions as ft, annotatePinnedEcsTargets as g, rejectExplicitCfnStackWithMultipleStacks as ga, verifyJwtAuthorizer as gi, pickFunctionUrlLogicalIdFromOrigin as gn, imageOverrideKeyAliases as gr, startAgentCoreHttpServer as gt, annotateEcsTaskPinnedTargets as h, isCfnFlagPresent as ha, verifyCognitoJwt as hi, isCloudFrontDistribution as hn, describePinnedImageUri as hr, selectServeInboundAuth as ht, coerceStopRequest as i, EcsTaskResolutionError as ia, filterRoutesByApiIdentifier as ii, serveFromStaticOrigin as in, resolveEcsAssumeRoleOption as ir, MicrovmResolutionError as it, readRunHookPayload as j, parseSelectionExpressionPath as ja, applyAuthorizerOverlay as ji, createCloudFrontModule as jn, A2A_PATH as jr, startWebFunctionContainer as jt, finalizeMicrovmEnv as k, discoverWebSocketApisOrThrow as ka, matchRoute as ki, runViewerResponse as kn, invokeAgentCoreWs as kr, planWebFunctionContainer as kt, relayServeRequest as l, substituteEnvVarsFromStateAsync as la, resolveSelectionExpression as li, buildEdgeResponseEvent as ln, canonicalizeImageOverrideKeys as lr, s3KeyOfUri as lt, annotateAlbPinnedBackingServices as m, groupWorkloadsRoutedApart as ma, createJwksCache as mi, extractKvsAssociations as mn, runImageOverrideBuilds as mr, buildAgentCoreServeAuthCheck as mt, coerceRunRequest as n, resolveRuntimeFileExtension as na, buildStageMap as ni, startCloudFrontServer as nn, parseMaxTasks as nr, MICROVM_DEFAULT_INGRESS_PORT as nt, resolveServeBaseUrl as o, substituteAgainstState as oa, groupRoutesByServer as oi, applyEdgeRequestResult as on, runEcsServiceEmulator as or, readMicrovmImageConfig as ot, isCustomResourceLambdaTarget as p, createLocalStateProvider as pa, buildJwksUrlFromIssuer as pi, describeS3OriginDomain as pn, resolveImageOverrides as pr, createLocalStartAgentCoreCommand as pt, MAX_RUN_HOOK_PAYLOAD_BYTES as q, deployedFillMayBeSecret as qa, classifySourceChange as qi, serviceStrategy as qn, computeCodeImageTag as qr, webFunctionFidelityWarnings as qt, coerceServeRequest as r, resolveRuntimeImage as ra, availableApiIdentifiers as ri, resolveErrorResponseCandidates as rn, parseRestartPolicy as rr, MICROVM_IMAGE_TYPE as rt, createStudioServeManager as s, substituteAgainstStateAsync as sa, readMtlsMaterialsFromDisk as si, applyEdgeResponseResult as sn, ImageOverrideError as sr, resolveMicrovmCodeArtifact as st, addStudioSpecificOptions as t, resolveRuntimeCodeMountPath as ta, attachStageContext as ti, matchBehavior as tn, awsEndpointOptions as to, ecsClusterOption as tr, waitForAppAnswer as tt, reinvoke as u, materializeLayerFromArn as ua, resolveServiceIntegrationParameters as ui, edgeHeadersToHttp as un, enforceImageOverrideOrphans as ur, addStartWebFunctionSpecificOptions as ut, startStudioServer as v, resolveCfnRegion as va, buildMethodArn as vi, pickLambdaEdgeFunctionLogicalId as vn, listPinnedTargets as vr, startAgentCoreWsBridge as vt, createLocalListCommand as w, resolveSingleTarget as wa, applyCorsResponseHeaders as wi, WEB_FUNCTION_TYPE as wn, getContainerNetworkIp as wr, parseOriginOverrides as wt, createStudioStore as x, collectSsmParameterRefs as xa, invokeRequestAuthorizer as xi, resolveCloudFrontDistribution as xn, DEFAULT_SHADOW_READY_TIMEOUT_MS as xr, createLocalStartCloudFrontCommand as xt, toStudioTargetGroups as y, resolveCfnStackName as ya, computeRequestIdentityHash as yi, pickTargetFunctionLogicalId as yn, buildCloudMapIndex as yr, LocalStartCloudFrontError as yt, MICROVM_CONTROL_PATH as z, AGENTCORE_MCP_PROTOCOL as za, bufferToBody as zi, albStrategy as zn, signAgentCoreInvocation as zr, disposeWebFunctionArtifact as zt };
|
|
32362
|
-
//# sourceMappingURL=local-studio-
|
|
32438
|
+
//# sourceMappingURL=local-studio-D4E6Wb1V.js.map
|