@go-to-k/cdkd 0.290.29 → 0.290.30
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/dist/{asg-provider-Dwnb3CES.js → asg-provider-De5KONKr.js} +3 -3
- package/dist/{asg-provider-Dwnb3CES.js.map → asg-provider-De5KONKr.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-Bcwb9_mO.js → deploy-engine-mI1Xv1oi.js} +183 -81
- package/dist/{deploy-engine-Bcwb9_mO.js.map → deploy-engine-mI1Xv1oi.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{logger-6LP1UiFA.js → logger-BjWM-UVj.js} +42 -2
- package/dist/logger-BjWM-UVj.js.map +1 -0
- package/dist/{program-PCCyP9-O.js → program-qSSjqstP.js} +92 -31
- package/dist/{program-PCCyP9-O.js.map → program-qSSjqstP.js.map} +1 -1
- package/dist/{version-snXN__f1.js → version-C15BftsD.js} +2 -2
- package/dist/{version-snXN__f1.js.map → version-C15BftsD.js.map} +1 -1
- package/package.json +1 -1
- package/dist/logger-6LP1UiFA.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as secretBearing, $n as recordMaskOnlyValue, $r as AssetManifestLoader, $t as s3BucketArn, A as extractDeploymentEventError, Ai as getAwsClients, An as refuseMalformedState, Ar as BOOTSTRAP_MARKER_PREFIX, At as isImpossibleEmptyStoredAttribute, B as toCfnInteger, Bi as IntrinsicResolutionRefusalError, Bn as STATE_SOURCED_BASELINE_RULES, Br as buildDockerImage, Bt as coerceCfnBoolean, C as buildFinalSnapshotIdentifier, Ci as canonicalizeRegion, Cn as producerRecordKey, Cr as stringifyValue, Ct as isTerminationProtectionPropagationError, D as refusesFinalSnapshot, Dn as refuseMalformedOutputsForDestroy, Dr as loadPublishableAssetManifest, Dt as cfnRefValueFromPhysicalId, E as isFinalSnapshotError, Ei as processStackMessages, En as refuseMalformedOutputs, Er as createAssetRedirectResolver, Et as carriesFetchableDynamicReference, F as isStatefulRecreateTargetSync, Fn as findSilentDropProperties, Fr as parseBootstrapMarker, Ft as isSettledInstanceState, G as gray, Gi as NestedStackChildDirectDestroyError, Gn as createSecretMasker, Gr as formatDockerLoginError, Gt as readConfigString, H as formatResourceLine, Hi as LocalStartServiceError, Hn as STATE_SOURCED_READBACK_RULES, Hr as describeDockerExecFailure, Ht as configBooleanRefusal, I as renderStatefulReason, Ii as CrossAccountSecretRefusalError, In as describeTypeWithThrottleRetry, Ir as readBootstrapMarkerBody, It as WAFv2WebACLProvider, J as yellow, Ji as ResourceTimeoutError, Jn as identityKeyFor, Jr as redactDockerArgvValues, Jt as requireConfigObject, K as green, Ki as PartialFailureError, Kn as dynamicReferenceTokens, Kr as getDockerCmd, Kt as replayWarn, L as WARM_THROUGHPUT_MEMBERS, Ln as withRetry, Lr as validateAssetBucketName, Lt as normalizeAwsTagsToCfn, M as planOrphanAdoption, Mi as setAwsClients, Mn as repairMalformedResourcePropertiesForReadOnly, Mr as ensureAssetStorage, Mt as isUnboundTemplateParameter, N as MULTI_REGION_RECREATE_BLOCKED_TYPES, Nn as repairMalformedResourcesForReadOnly, Nr as getBootstrapMarkerKey, Nt as parameterTypeMayLoseSecretIdentity, O as unsupportedFinalSnapshotError, Oi as resolveBucketRegion, On as refuseMalformedResourcePropertiesForOrphan, Or as rewriteTemplateAssetReferences, Ot as coerceParameterTypedValue, P as isStatefulRecreateTargetForReplace, Pi as CdkdError, Pn as findActionableSilentDrops, Pr as isCrossRegionRedirect, Pt as refStateLookupFromResource, Q as isExportAliasCollision, Qn as maskSecretsInText, Qr as stripControlChars, Qt as withSharedDrainBudget, R as coerceWarmThroughput$1, Ri as DeployCancelledError, Rn as DagBuilder, Rr as validateContainerRepoName, Rt as resolveExplicitPhysicalId, S as PRE_DELETE_SNAPSHOT_TYPES, Si as PARTITION_TABLE, Sn as malformedStateRefusalMessage, Sr as AssetPublisher, St as disableInstanceApiTermination, T as createPreDeleteFinalSnapshot, Ti as AssemblyReader, Tn as refuseMalformedNestedChildOutputs, Tr as buildAssetRedirectMap, Tt as carriesDynamicReference, U as bold, Un as TEMPLATE_SOURCED_RULES, Ur as describeDockerFailure, Ut as configIntegerRefusal, V as toFiniteNumber, Vi as LocalInvokeBuildError$1, Vn as STATE_SOURCED_CROSS_GENERATION_RULES, Vr as describeDockerCapturedOutput, Vt as coerceCfnInteger, W as cyan, Wi as MalformedProducerRecordRefusalError, Wn as carriesSecretMask, Wr as dockerSpawnEnvWithSensitive, Wt as configStringRefusal, X as collectPublishedOutputNames, Xi as StackHasActiveImportsError, Xn as markSameGenerationBag, Xr as runDockerStreaming, Xt as classifyReplaySecretRegion, Y as collectDeclaredOutputNames, Yi as ResourceUpdateNotSupportedError, Yn as isSingleDynamicReferenceToken, Yr as runDockerForeground, Yt as requireConfigString, Z as exportAliasCollisionScrubWarning, Zi as StackTerminationProtectionError, Zn as maskSecretsInError, Zr as escapeRegExp, Zt as producerRegionsFromState, _ as isSecretBearingReferenceString, _i as findLargeInlineResources, _n as malformedOutputsRefusalMessage, _r as importableOutputs, _t as isWaitAbandonedError, a as DeploymentEventsStore, aa as isRetryableTransientError, ai as resolveApp, an as AWS_CREDENTIAL_ENV_KEYS, ar as rebuildClientForBucketRegion, at as clearOnUpdateRemoval, b as bindingSkippedOutputs, bi as decodeListingKey, bn as malformedResourcePropertiesWarning, br as orphansCarriedFrom, bt as deleteIndeterminateGuards, c as replayFailedOperations, ca as markNonRetryable, ci as resolveSkipPrefix, cn as envCredentialsAreAssumedRole, cr as buildLockContentionMessage, ct as createMaskedRetryLogger, d as updatePartialReason, da as describeAwsFailure, di as resolveUseCdkBootstrapAssets, dn as STATE_RESOURCES_MALFORMED, dr as shellQuote, dt as beginCommandInterruptScope, ei as getDockerImageBySourceHash, en as s3BucketDomainName, er as recoverMaskedOutput, et as secretBearingStateKeyWarning, f as withResourceDeadline, fa as safeStringify, fi as stateBucketExistenceConfirmed, fn as hasReadableOutputs, fr as CUSTOM_RESOURCE_RESPONSE_PREFIX, ft as endCommandInterruptScope, g as bagHoldsSecretExpression, gi as MIGRATE_TMP_PREFIX, gn as malformedLocalOutputsWarning, gr as importableOutputKeys, gt as CloudControlProvider, h as computeImplicitDeleteEdges, hi as CFN_TEMPLATE_URL_LIMIT, hn as malformedExportSourceWarning, hr as hasReadableExportSet, ht as startInterruptWatch, i as DeploymentEventsReader, ia as isMarkedNonRetryable, ii as getLegacyStateBucketName, in as applyRoleArnIfSet, ir as S3StateBackend, it as collectInlinePolicyNamesManagedBySiblings, j as makeSiblingClaimReader, ji as resetAwsClients, jn as repairMalformedOutputsForReadOnly, jr as assertAssetBucketRegion, jt as isNamelessDynamicReferenceError, k as makeCanonicalizePropertiesFn, ki as AwsClients, kn as refuseMalformedResourcesForDestroy, kr as AssetModeResolver, kt as getAccountInfo, l as replayRollback, la as markRedactedCause, li as resolveStateBucketWithDefault, ln as DiffCalculator, lr as forceQuitRecoveryClause, lt as maskDeep, m as IMPLICIT_DELETE_DEPENDENCIES, mi as CFN_TEMPLATE_BODY_LIMIT, mn as malformedExportNamesWarning, mr as exportNamesCarriedFrom, mt as isInterruptedWaitError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as normalizeAwsError, ni as synthesisStatusMessage, nn as s3BucketRegionalDomainName, nr as scrubResourceRecord, nt as getCurrentResourceSecrets, o as planFailedOps, oa as isThrottlingError, oi as resolveAutoAssetStorage, on as applyCallerIdentityCredentials, or as UNREPRODUCIBLE_LOCK_CLAUSE, ot as ProviderRegistry, p as maskingRetryLogger, pi as warnDeprecatedNoPrefixCliFlag, pn as hasReadableResources, pr as DEFAULT_STATE_PREFIX, pt as interruptWatchListenerCount, q as red, qi as ProvisioningError, qn as errorCauseChain, qr as partitionSensitiveEnv, qt as requireConfigArray, r as DeployEngine, ra as withErrorHandling, ri as getDefaultStateBucketName, rn as s3BucketWebsiteUrl, rr as LockManager, rt as IAMRoleProvider, s as planRollback, sa as isTransientServerError, si as resolveCaptureObservedState, sn as callerEnvCredentials, sr as buildForceUnlockCommand, st as wouldReturnToSdkProvider, t as DEFAULT_RESOURCE_TIMEOUT_MS, ti as Synthesizer, tn as s3BucketDualStackDomainName, tr as redactSecretsForState, tt as secretSafeKeyDisplay, u as updatePartialMessage, ua as retryClassificationText, ui as resolveStateBucketWithDefaultAndSource, un as INTRINSIC_KEYS, ur as formatLockExpiry, ut as maskerOrIdentity, v as keptWholeReasonText, vi as uploadCfnTemplate, vn as malformedOutputsWarning, vr as isReadableBag, vt as slowCcOperationTimeoutMs, w as ccRoutedFinalSnapshotError, wi as derivePartitionAndUrlSuffix, wn as refuseDivergentRecordRegionForDestroy, wr as WorkGraph, wt as IntrinsicFunctionResolver, x as ATOMIC_FINAL_SNAPSHOT_TYPES, xi as expectedOwnerParam, xn as malformedResourcesWarning, xr as shouldRetainResource, xt as deleteSkipReason, y as mergeNoChangeOutputs, yi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, yn as malformedRenderedContainersWarning, yr as orphansAfterRollback, yt as UNSPECIFIED_SKIP_REASON, z as isWarmThroughputDecrease, zi as DynamicReferenceRegionAmbiguousError, zn as TemplateParser, zr as buildDenyExternalAccessPolicy, zt as assertRegionMatch } from "./deploy-engine-
|
|
2
|
-
import { C as
|
|
1
|
+
import { $ as secretBearing, $n as recordMaskOnlyValue, $r as AssetManifestLoader, $t as s3BucketArn, A as extractDeploymentEventError, Ai as getAwsClients, An as refuseMalformedState, Ar as BOOTSTRAP_MARKER_PREFIX, At as isImpossibleEmptyStoredAttribute, B as toCfnInteger, Bi as IntrinsicResolutionRefusalError, Bn as STATE_SOURCED_BASELINE_RULES, Br as buildDockerImage, Bt as coerceCfnBoolean, C as buildFinalSnapshotIdentifier, Ci as canonicalizeRegion, Cn as producerRecordKey, Cr as stringifyValue, Ct as isTerminationProtectionPropagationError, D as refusesFinalSnapshot, Dn as refuseMalformedOutputsForDestroy, Dr as loadPublishableAssetManifest, Dt as cfnRefValueFromPhysicalId, E as isFinalSnapshotError, Ei as processStackMessages, En as refuseMalformedOutputs, Er as createAssetRedirectResolver, Et as carriesFetchableDynamicReference, F as isStatefulRecreateTargetSync, Fn as findSilentDropProperties, Fr as parseBootstrapMarker, Ft as isSettledInstanceState, G as gray, Gi as NestedStackChildDirectDestroyError, Gn as createSecretMasker, Gr as formatDockerLoginError, Gt as readConfigString, H as formatResourceLine, Hi as LocalStartServiceError, Hn as STATE_SOURCED_READBACK_RULES, Hr as describeDockerExecFailure, Ht as configBooleanRefusal, I as renderStatefulReason, Ii as CrossAccountSecretRefusalError, In as describeTypeWithThrottleRetry, Ir as readBootstrapMarkerBody, It as WAFv2WebACLProvider, J as yellow, Ji as ResourceTimeoutError, Jn as identityKeyFor, Jr as redactDockerArgvValues, Jt as requireConfigObject, K as green, Ki as PartialFailureError, Kn as dynamicReferenceTokens, Kr as getDockerCmd, Kt as replayWarn, L as WARM_THROUGHPUT_MEMBERS, Ln as withRetry, Lr as validateAssetBucketName, Lt as normalizeAwsTagsToCfn, M as planOrphanAdoption, Mi as setAwsClients, Mn as repairMalformedResourcePropertiesForReadOnly, Mr as ensureAssetStorage, Mt as isUnboundTemplateParameter, N as MULTI_REGION_RECREATE_BLOCKED_TYPES, Nn as repairMalformedResourcesForReadOnly, Nr as getBootstrapMarkerKey, Nt as parameterTypeMayLoseSecretIdentity, O as unsupportedFinalSnapshotError, Oi as resolveBucketRegion, On as refuseMalformedResourcePropertiesForOrphan, Or as rewriteTemplateAssetReferences, Ot as coerceParameterTypedValue, P as isStatefulRecreateTargetForReplace, Pi as CdkdError, Pn as findActionableSilentDrops, Pr as isCrossRegionRedirect, Pt as refStateLookupFromResource, Q as isExportAliasCollision, Qn as maskSecretsInText, Qr as stripControlChars, Qt as withSharedDrainBudget, R as coerceWarmThroughput$1, Ri as DeployCancelledError, Rn as DagBuilder, Rr as validateContainerRepoName, Rt as resolveExplicitPhysicalId, S as PRE_DELETE_SNAPSHOT_TYPES, Si as PARTITION_TABLE, Sn as malformedStateRefusalMessage, Sr as AssetPublisher, St as disableInstanceApiTermination, T as createPreDeleteFinalSnapshot, Ti as AssemblyReader, Tn as refuseMalformedNestedChildOutputs, Tr as buildAssetRedirectMap, Tt as carriesDynamicReference, U as bold, Un as TEMPLATE_SOURCED_RULES, Ur as describeDockerFailure, Ut as configIntegerRefusal, V as toFiniteNumber, Vi as LocalInvokeBuildError$1, Vn as STATE_SOURCED_CROSS_GENERATION_RULES, Vr as describeDockerCapturedOutput, Vt as coerceCfnInteger, W as cyan, Wi as MalformedProducerRecordRefusalError, Wn as carriesSecretMask, Wr as dockerSpawnEnvWithSensitive, Wt as configStringRefusal, X as collectPublishedOutputNames, Xi as StackHasActiveImportsError, Xn as markSameGenerationBag, Xr as runDockerStreaming, Xt as classifyReplaySecretRegion, Y as collectDeclaredOutputNames, Yi as ResourceUpdateNotSupportedError, Yn as isSingleDynamicReferenceToken, Yr as runDockerForeground, Yt as requireConfigString, Z as exportAliasCollisionScrubWarning, Zi as StackTerminationProtectionError, Zn as maskSecretsInError, Zr as escapeRegExp, Zt as producerRegionsFromState, _ as isSecretBearingReferenceString, _i as findLargeInlineResources, _n as malformedOutputsRefusalMessage, _r as importableOutputs, _t as isWaitAbandonedError, a as DeploymentEventsStore, aa as isRetryableTransientError, ai as resolveApp, an as AWS_CREDENTIAL_ENV_KEYS, ar as rebuildClientForBucketRegion, at as clearOnUpdateRemoval, b as bindingSkippedOutputs, bi as decodeListingKey, bn as malformedResourcePropertiesWarning, br as orphansCarriedFrom, bt as deleteIndeterminateGuards, c as replayFailedOperations, ca as markNonRetryable, ci as resolveSkipPrefix, cn as envCredentialsAreAssumedRole, cr as buildLockContentionMessage, ct as createMaskedRetryLogger, d as updatePartialReason, da as describeAwsFailure, di as resolveUseCdkBootstrapAssets, dn as STATE_RESOURCES_MALFORMED, dr as shellQuote, dt as beginCommandInterruptScope, ei as getDockerImageBySourceHash, en as s3BucketDomainName, er as recoverMaskedOutput, et as secretBearingStateKeyWarning, f as withResourceDeadline, fa as safeStringify, fi as stateBucketExistenceConfirmed, fn as hasReadableOutputs, fr as CUSTOM_RESOURCE_RESPONSE_PREFIX, ft as endCommandInterruptScope, g as bagHoldsSecretExpression, gi as MIGRATE_TMP_PREFIX, gn as malformedLocalOutputsWarning, gr as importableOutputKeys, gt as CloudControlProvider, h as computeImplicitDeleteEdges, hi as CFN_TEMPLATE_URL_LIMIT, hn as malformedExportSourceWarning, hr as hasReadableExportSet, ht as startInterruptWatch, i as DeploymentEventsReader, ia as isMarkedNonRetryable, ii as getLegacyStateBucketName, in as applyRoleArnIfSet, ir as S3StateBackend, it as collectInlinePolicyNamesManagedBySiblings, j as makeSiblingClaimReader, ji as resetAwsClients, jn as repairMalformedOutputsForReadOnly, jr as assertAssetBucketRegion, jt as isNamelessDynamicReferenceError, k as makeCanonicalizePropertiesFn, ki as AwsClients, kn as refuseMalformedResourcesForDestroy, kr as AssetModeResolver, kt as getAccountInfo, l as replayRollback, la as markRedactedCause, li as resolveStateBucketWithDefault, ln as DiffCalculator, lr as forceQuitRecoveryClause, lt as maskDeep, m as IMPLICIT_DELETE_DEPENDENCIES, mi as CFN_TEMPLATE_BODY_LIMIT, mn as malformedExportNamesWarning, mr as exportNamesCarriedFrom, mt as isInterruptedWaitError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as normalizeAwsError, ni as synthesisStatusMessage, nn as s3BucketRegionalDomainName, nr as scrubResourceRecord, nt as getCurrentResourceSecrets, o as planFailedOps, oa as isThrottlingError, oi as resolveAutoAssetStorage, on as applyCallerIdentityCredentials, or as UNREPRODUCIBLE_LOCK_CLAUSE, ot as ProviderRegistry, p as maskingRetryLogger, pi as warnDeprecatedNoPrefixCliFlag, pn as hasReadableResources, pr as DEFAULT_STATE_PREFIX, pt as interruptWatchListenerCount, q as red, qi as ProvisioningError, qn as errorCauseChain, qr as partitionSensitiveEnv, qt as requireConfigArray, r as DeployEngine, ra as withErrorHandling, ri as getDefaultStateBucketName, rn as s3BucketWebsiteUrl, rr as LockManager, rt as IAMRoleProvider, s as planRollback, sa as isTransientServerError, si as resolveCaptureObservedState, sn as callerEnvCredentials, sr as buildForceUnlockCommand, st as wouldReturnToSdkProvider, t as DEFAULT_RESOURCE_TIMEOUT_MS, ti as Synthesizer, tn as s3BucketDualStackDomainName, tr as redactSecretsForState, tt as secretSafeKeyDisplay, u as updatePartialMessage, ua as retryClassificationText, ui as resolveStateBucketWithDefaultAndSource, un as INTRINSIC_KEYS, ur as formatLockExpiry, ut as maskerOrIdentity, v as keptWholeReasonText, vi as uploadCfnTemplate, vn as malformedOutputsWarning, vr as isReadableBag, vt as slowCcOperationTimeoutMs, w as ccRoutedFinalSnapshotError, wi as derivePartitionAndUrlSuffix, wn as refuseDivergentRecordRegionForDestroy, wr as WorkGraph, wt as IntrinsicFunctionResolver, x as ATOMIC_FINAL_SNAPSHOT_TYPES, xi as expectedOwnerParam, xn as malformedResourcesWarning, xr as shouldRetainResource, xt as deleteSkipReason, y as mergeNoChangeOutputs, yi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, yn as malformedRenderedContainersWarning, yr as orphansAfterRollback, yt as UNSPECIFIED_SKIP_REASON, z as isWarmThroughputDecrease, zi as DynamicReferenceRegionAmbiguousError, zn as TemplateParser, zr as buildDenyExternalAccessPolicy, zt as assertRegionMatch } from "./deploy-engine-mI1Xv1oi.js";
|
|
2
|
+
import { C as displayAwsMessage, E as truncateCodePoints, S as UNRENDERABLE, T as displaySafe, _ as withSkipPrefix, b as SECRET_REF_MAX_CODE_POINTS, c as PATTERN_B_NAME_OPTIONS, f as explicitNamePropertyFor, h as getCurrentStackName, i as reserveStdoutForPayload, l as PATTERN_B_NAME_PROPERTIES, m as generateResourceNameWithFallback, n as getLogger, o as runStackBuffered, p as generateResourceName, s as getLiveRenderer, u as PATTERN_B_RESOURCE_TYPES, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS } from "./logger-BjWM-UVj.js";
|
|
3
3
|
import { n as awsClientDefaults } from "./aws-client-defaults-BoIxyCir.js";
|
|
4
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
-
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as getCdkdVersion } from "./version-C15BftsD.js";
|
|
5
|
+
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-De5KONKr.js";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
8
8
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -1089,6 +1089,21 @@ const deployOptions = [
|
|
|
1089
1089
|
* -c / --context can be specified multiple times to pass context key=value pairs
|
|
1090
1090
|
*/
|
|
1091
1091
|
const contextOptions = [new Option("-c, --context <key=value...>", "Set context values (can be specified multiple times)")];
|
|
1092
|
+
/**
|
|
1093
|
+
* ANCHORED AT THE START ONLY, and that is what makes the renders below a
|
|
1094
|
+
* display boundary rather than a formality (issue
|
|
1095
|
+
* [#3397](https://github.com/go-to-k/cdkd/issues/3397)).
|
|
1096
|
+
*
|
|
1097
|
+
* A value CLEARING this test is constrained in its first ~30 characters and in
|
|
1098
|
+
* nothing after `role/` — `arn:aws:iam::1:role/` followed by an ESC, a
|
|
1099
|
+
* newline, or 10 MB of anything is a PASS. So `normalizeStartApiAssumeRole`'s
|
|
1100
|
+
* mutual-exclusion error, which renders an ARN this regex already accepted,
|
|
1101
|
+
* needs sanitizing exactly as much as the three REFUSALS that render one it
|
|
1102
|
+
* rejected. Tightening the regex instead was considered and is the wrong tool:
|
|
1103
|
+
* `src/utils/role-arn.ts`'s `IAM_ROLE_ARN_RE` is the strict parse, it runs
|
|
1104
|
+
* later and on a different path, and a stricter argparse here would start
|
|
1105
|
+
* refusing role-name shapes the deploy path accepts.
|
|
1106
|
+
*/
|
|
1092
1107
|
const IAM_ROLE_ARN_REGEX = /^arn:[^:]+:iam::\d+:role\//;
|
|
1093
1108
|
/**
|
|
1094
1109
|
* Argparse for the repeatable `--assume-role` flag.
|
|
@@ -1102,16 +1117,17 @@ const IAM_ROLE_ARN_REGEX = /^arn:[^:]+:iam::\d+:role\//;
|
|
|
1102
1117
|
function parseAssumeRoleToken(raw, previous) {
|
|
1103
1118
|
const acc = previous ?? { perLambda: {} };
|
|
1104
1119
|
if (!acc.perLambda) acc.perLambda = {};
|
|
1120
|
+
const shownRaw = displayIdent(raw, { maxCodePoints: 613 });
|
|
1105
1121
|
const eqIndex = raw.indexOf("=");
|
|
1106
1122
|
if (eqIndex === -1) {
|
|
1107
|
-
if (!IAM_ROLE_ARN_REGEX.test(raw)) throw new Error(`Invalid --assume-role value "${
|
|
1123
|
+
if (!IAM_ROLE_ARN_REGEX.test(raw)) throw new Error(`Invalid --assume-role value "${shownRaw}": expected an IAM role ARN like arn:aws:iam::123456789012:role/MyRole, or LogicalId=<arn>.`);
|
|
1108
1124
|
acc.globalArn = raw;
|
|
1109
1125
|
return acc;
|
|
1110
1126
|
}
|
|
1111
1127
|
const logicalId = raw.substring(0, eqIndex).trim();
|
|
1112
1128
|
const arn = raw.substring(eqIndex + 1).trim();
|
|
1113
|
-
if (!/^[A-Za-z][A-Za-z0-9]*$/.test(logicalId)) throw new Error(`Invalid --assume-role value "${
|
|
1114
|
-
if (!IAM_ROLE_ARN_REGEX.test(arn)) throw new Error(`Invalid --assume-role value "${
|
|
1129
|
+
if (!/^[A-Za-z][A-Za-z0-9]*$/.test(logicalId)) throw new Error(`Invalid --assume-role value "${shownRaw}": left-hand side "${displayIdent(logicalId)}" must be a CloudFormation logical ID (alphanumeric, leading letter).`);
|
|
1130
|
+
if (!IAM_ROLE_ARN_REGEX.test(arn)) throw new Error(`Invalid --assume-role value "${shownRaw}": right-hand side "${displayIdent(arn, { maxCodePoints: 613 })}" must be an IAM role ARN like arn:aws:iam::123456789012:role/MyRole.`);
|
|
1115
1131
|
acc.perLambda[logicalId] = arn;
|
|
1116
1132
|
return acc;
|
|
1117
1133
|
}
|
|
@@ -1140,7 +1156,7 @@ function normalizeStartApiAssumeRole(raw, autoResolve) {
|
|
|
1140
1156
|
perLambda: {},
|
|
1141
1157
|
bareAutoResolve: true
|
|
1142
1158
|
} : void 0;
|
|
1143
|
-
if (autoResolve && raw.globalArn) throw new Error(`--assume-role-auto auto-resolves EACH routed Lambda's own execution role, but --assume-role ${raw.globalArn} also names a single global default. These are mutually exclusive on the global slot. Either drop the global ARN to keep --assume-role-auto for every Lambda, or drop --assume-role-auto to keep the global default. Per-Lambda overrides (--assume-role <LogicalId>=<arn>) are compatible with either side.`);
|
|
1159
|
+
if (autoResolve && raw.globalArn) throw new Error(`--assume-role-auto auto-resolves EACH routed Lambda's own execution role, but --assume-role ${displayIdent(raw.globalArn, { maxCodePoints: 613 })} also names a single global default. These are mutually exclusive on the global slot. Either drop the global ARN to keep --assume-role-auto for every Lambda, or drop --assume-role-auto to keep the global default. Per-Lambda overrides (--assume-role <LogicalId>=<arn>) are compatible with either side.`);
|
|
1144
1160
|
if (autoResolve) raw.bareAutoResolve = true;
|
|
1145
1161
|
return raw;
|
|
1146
1162
|
}
|
|
@@ -12149,6 +12165,16 @@ function isSqsQueueUrl(value) {
|
|
|
12149
12165
|
//#endregion
|
|
12150
12166
|
//#region src/provisioning/providers/sns-topic-provider.ts
|
|
12151
12167
|
/**
|
|
12168
|
+
* The value SNS enforces for a topic that never set `MaximumMessageSize`
|
|
12169
|
+
* (256 KiB, the standard maximum), and therefore what a template REMOVAL of
|
|
12170
|
+
* the member resets the attribute to — SNS refuses the `''` the other
|
|
12171
|
+
* `SetTopicAttributes` removals send (`MaximumMessageSize: is not an integer
|
|
12172
|
+
* between 1024 and 1048576 bytes`, measured us-east-1 2026-09-18). A fresh
|
|
12173
|
+
* topic REPORTS no value at all, which `readCurrentState` folds to this value;
|
|
12174
|
+
* see there. Exported for the unit tests that pin both halves (issue #3413).
|
|
12175
|
+
*/
|
|
12176
|
+
const SNS_MAXIMUM_MESSAGE_SIZE_DEFAULT = "262144";
|
|
12177
|
+
/**
|
|
12152
12178
|
* AWS SNS Topic Provider
|
|
12153
12179
|
*
|
|
12154
12180
|
* Implements resource provisioning for AWS::SNS::Topic using the SNS SDK.
|
|
@@ -12172,7 +12198,8 @@ var SNSTopicProvider = class {
|
|
|
12172
12198
|
"DataProtectionPolicy",
|
|
12173
12199
|
"DeliveryStatusLogging",
|
|
12174
12200
|
"Subscription",
|
|
12175
|
-
"FifoThroughputScope"
|
|
12201
|
+
"FifoThroughputScope",
|
|
12202
|
+
"MaximumMessageSize"
|
|
12176
12203
|
])]]);
|
|
12177
12204
|
constructor() {
|
|
12178
12205
|
const awsClients = getAwsClients();
|
|
@@ -12207,6 +12234,7 @@ var SNSTopicProvider = class {
|
|
|
12207
12234
|
if (properties["TracingConfig"]) topicAttributes["TracingConfig"] = properties["TracingConfig"];
|
|
12208
12235
|
if (properties["SignatureVersion"]) topicAttributes["SignatureVersion"] = stringifyValue(properties["SignatureVersion"]);
|
|
12209
12236
|
if (properties["FifoThroughputScope"]) topicAttributes["FifoThroughputScope"] = properties["FifoThroughputScope"];
|
|
12237
|
+
if (properties["MaximumMessageSize"] != null) topicAttributes["MaximumMessageSize"] = stringifyValue(properties["MaximumMessageSize"]);
|
|
12210
12238
|
let tags;
|
|
12211
12239
|
if (properties["Tags"]) tags = properties["Tags"];
|
|
12212
12240
|
const createParams = {
|
|
@@ -12293,7 +12321,7 @@ var SNSTopicProvider = class {
|
|
|
12293
12321
|
}
|
|
12294
12322
|
async applyUpdate(logicalId, physicalId, properties, previousProperties, maskSecrets) {
|
|
12295
12323
|
this.logger.debug(`Updating SNS topic ${logicalId}: ${physicalId}`);
|
|
12296
|
-
|
|
12324
|
+
const mutableAttributes = [
|
|
12297
12325
|
{
|
|
12298
12326
|
name: "DisplayName",
|
|
12299
12327
|
prop: "DisplayName"
|
|
@@ -12327,13 +12355,19 @@ var SNSTopicProvider = class {
|
|
|
12327
12355
|
name: "DataProtectionPolicy",
|
|
12328
12356
|
prop: "DataProtectionPolicy",
|
|
12329
12357
|
serialize: true
|
|
12358
|
+
},
|
|
12359
|
+
{
|
|
12360
|
+
name: "MaximumMessageSize",
|
|
12361
|
+
prop: "MaximumMessageSize",
|
|
12362
|
+
resetValue: SNS_MAXIMUM_MESSAGE_SIZE_DEFAULT
|
|
12330
12363
|
}
|
|
12331
|
-
]
|
|
12364
|
+
];
|
|
12365
|
+
for (const attr of mutableAttributes) {
|
|
12332
12366
|
const newVal = properties[attr.prop];
|
|
12333
12367
|
const oldVal = previousProperties[attr.prop];
|
|
12334
12368
|
if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
|
|
12335
12369
|
let value;
|
|
12336
|
-
if (newVal === void 0 || newVal === null) value = "";
|
|
12370
|
+
if (newVal === void 0 || newVal === null) value = attr.resetValue ?? "";
|
|
12337
12371
|
else if (attr.serialize && typeof newVal !== "string") value = JSON.stringify(newVal);
|
|
12338
12372
|
else value = stringifyValue(newVal);
|
|
12339
12373
|
await this.snsClient.send(new SetTopicAttributesCommand({
|
|
@@ -12568,6 +12602,9 @@ var SNSTopicProvider = class {
|
|
|
12568
12602
|
"SignatureVersion"
|
|
12569
12603
|
]) result[key] = attrs[key] ?? "";
|
|
12570
12604
|
if (attrs["FifoTopic"] === "true") result["FifoThroughputScope"] = attrs["FifoThroughputScope"] ?? "";
|
|
12605
|
+
const liveMaxSize = attrs["MaximumMessageSize"] || "262144";
|
|
12606
|
+
const maxSizeNumber = Number(liveMaxSize);
|
|
12607
|
+
result["MaximumMessageSize"] = Number.isFinite(maxSizeNumber) ? maxSizeNumber : liveMaxSize;
|
|
12571
12608
|
for (const key of ["ArchivePolicy", "DataProtectionPolicy"]) {
|
|
12572
12609
|
const v = attrs[key];
|
|
12573
12610
|
if (v) try {
|
|
@@ -72197,7 +72234,7 @@ function createIamPrincipalUniqueIdResolver(awsClients) {
|
|
|
72197
72234
|
entityId = user?.UserId;
|
|
72198
72235
|
}
|
|
72199
72236
|
if (entityArn !== void 0 && entityArn.toLowerCase() === arn.toLowerCase()) uniqueId = entityId;
|
|
72200
|
-
else getLogger().debug(`Principal ${arn} resolved to ${entityArn
|
|
72237
|
+
else getLogger().debug(`Principal ${displayIdent(arn, { maxCodePoints: 613 })} resolved to ${entityArn === void 0 ? "no entity" : displayIdent(entityArn, { maxCodePoints: 613 })} — same name in this account or under another IAM path; leaving the policy principal comparison untouched.`);
|
|
72201
72238
|
} catch (error) {
|
|
72202
72239
|
const message = error instanceof Error ? error.message : String(error);
|
|
72203
72240
|
const name = error instanceof Error ? error.name : "";
|
|
@@ -72207,7 +72244,7 @@ function createIamPrincipalUniqueIdResolver(awsClients) {
|
|
|
72207
72244
|
warnedOnDenied = true;
|
|
72208
72245
|
getLogger().warn(`Cannot read IAM principals (${name || "access denied"}). A resource policy whose principal AWS rendered as a unique id (AROA…/AIDA…) may therefore report drift that is only a spelling difference; grant iam:GetRole / iam:GetUser to resolve it, or re-run with --verbose for the full error.`);
|
|
72209
72246
|
}
|
|
72210
|
-
getLogger().debug(`Could not resolve the unique id of principal ${arn} (${message}); leaving the policy principal comparison untouched.`);
|
|
72247
|
+
getLogger().debug(`Could not resolve the unique id of principal ${displayIdent(arn, { maxCodePoints: 613 })} (${displayAwsMessage(message)}); leaving the policy principal comparison untouched.`);
|
|
72211
72248
|
if (isThrottlingError(error)) return void 0;
|
|
72212
72249
|
}
|
|
72213
72250
|
cache.set(arn, uniqueId);
|
|
@@ -81455,6 +81492,30 @@ function safeStack(value) {
|
|
|
81455
81492
|
return displayIdent(value, { maxCodePoints: STACK_REF_MAX_CODE_POINTS });
|
|
81456
81493
|
}
|
|
81457
81494
|
/**
|
|
81495
|
+
* `safe()` for an IAM ROLE ARN, the SECOND value class in this file whose
|
|
81496
|
+
* legitimate grammar runs past `displayIdent`'s 255-code-point default (issue
|
|
81497
|
+
* go-to-k/cdkd#3397 review).
|
|
81498
|
+
*
|
|
81499
|
+
* An AWS-legal role ARN reaches 613 code points — a 512-character path plus a
|
|
81500
|
+
* 64-character name — so `safe()` cut the one ARN this file renders at 255 and
|
|
81501
|
+
* appended `[cut: N more characters withheld]` INSIDE
|
|
81502
|
+
* `pass --role-arn to match`, the sentence whose only job is to say which role
|
|
81503
|
+
* to pass back. That is verbatim the failure `ROLE_ARN_MAX_CODE_POINTS`'s own
|
|
81504
|
+
* doc exists to prevent, and the display fence could not see it: it checks that
|
|
81505
|
+
* a sanitizer was CALLED, never which cap the call passed.
|
|
81506
|
+
*
|
|
81507
|
+
* A NAMED helper rather than a `maxCodePoints` argument at the site, for the
|
|
81508
|
+
* reason {@link safeStack} records about itself — a per-site spelling of
|
|
81509
|
+
* exactly this rule is what issue #3164 exists to stop, and a first cut of this
|
|
81510
|
+
* fix wrote one before the reference-count fence in
|
|
81511
|
+
* `tests/unit/cli/commands/rollback.test.ts` refused it. That refusal is the
|
|
81512
|
+
* fence working: it forces the question "which helper does this value belong
|
|
81513
|
+
* in" to be answered in code rather than in a diff.
|
|
81514
|
+
*/
|
|
81515
|
+
function safeRoleArn(value) {
|
|
81516
|
+
return displayIdent(value, { maxCodePoints: 613 });
|
|
81517
|
+
}
|
|
81518
|
+
/**
|
|
81458
81519
|
* Human label for a planned rollback action (plan preview). `skipFinalSnapshot`
|
|
81459
81520
|
* is threaded in because the classifier is pure (it cannot see CLI flags) and
|
|
81460
81521
|
* the Snapshot label would otherwise promise a final snapshot the run is about
|
|
@@ -81574,7 +81635,7 @@ async function rollbackCommand(stackArg, options) {
|
|
|
81574
81635
|
const mintedOrphans = [];
|
|
81575
81636
|
const orphanLogicalIds = new Set(options.orphan ?? []);
|
|
81576
81637
|
const newestSegment = journal.segments[journal.segments.length - 1];
|
|
81577
|
-
if (newestSegment.roleArn && !options.roleArn) logger.info(`Note: the failed deploy ran with --role-arn ${
|
|
81638
|
+
if (newestSegment.roleArn && !options.roleArn) logger.info(`Note: the failed deploy ran with --role-arn ${safeRoleArn(newestSegment.roleArn)}; this rollback is running with ambient credentials (pass --role-arn to match).`);
|
|
81578
81639
|
logger.info(`\nRollback plan for '${safeStack(stackName)}' (${safe(region)}):`);
|
|
81579
81640
|
const planStateView = { ...stateResources };
|
|
81580
81641
|
for (let s = journal.segments.length - 1; s >= 0; s--) {
|
|
@@ -88552,11 +88613,11 @@ async function pullEcrImage(imageUri, options) {
|
|
|
88552
88613
|
const cached = ASSUMED_ROLE_CACHE.get(cacheKey);
|
|
88553
88614
|
if (cached && isCredentialFresh(cached)) {
|
|
88554
88615
|
assumed = cached;
|
|
88555
|
-
logger.debug(`Reusing cached AssumeRole credentials for ${displayIdent(options.ecrRoleArn, { maxCodePoints:
|
|
88616
|
+
logger.debug(`Reusing cached AssumeRole credentials for ${displayIdent(options.ecrRoleArn, { maxCodePoints: 613 })}`);
|
|
88556
88617
|
} else {
|
|
88557
88618
|
assumed = await assumeRoleForEcr(options.ecrRoleArn, callerRegion, logger);
|
|
88558
88619
|
ASSUMED_ROLE_CACHE.set(cacheKey, assumed);
|
|
88559
|
-
logger.info(`Assumed role ${displayIdent(options.ecrRoleArn, { maxCodePoints:
|
|
88620
|
+
logger.info(`Assumed role ${displayIdent(options.ecrRoleArn, { maxCodePoints: 613 })} for ECR pull (account=${parsed.accountId}, region=${parsed.region})`);
|
|
88560
88621
|
}
|
|
88561
88622
|
} else if (crossAccount) logger.info(`Cross-account ECR pull: image account ${parsed.accountId} != caller ${callerAccount}. Using the caller's credentials; pass --ecr-role-arn <arn> if AWS rejects with AccessDenied.`);
|
|
88562
88623
|
if (crossRegion) logger.info(`Cross-region ECR pull: image region ${parsed.region} != caller ${callerRegion ?? "(unset)"}. Authenticating against the image region directly.`);
|
|
@@ -88587,7 +88648,7 @@ async function pullEcrImage(imageUri, options) {
|
|
|
88587
88648
|
* mirrors the convention used by `src/utils/role-arn.ts`.
|
|
88588
88649
|
*/
|
|
88589
88650
|
async function assumeRoleForEcr(roleArn, callerRegion, logger) {
|
|
88590
|
-
logger.debug(`Assuming role ${displayIdent(roleArn, { maxCodePoints:
|
|
88651
|
+
logger.debug(`Assuming role ${displayIdent(roleArn, { maxCodePoints: 613 })} for ECR pull...`);
|
|
88591
88652
|
const sts = new STSClient({
|
|
88592
88653
|
...awsClientDefaults(),
|
|
88593
88654
|
...callerRegion && { region: callerRegion }
|
|
@@ -88598,7 +88659,7 @@ async function assumeRoleForEcr(roleArn, callerRegion, logger) {
|
|
|
88598
88659
|
RoleSessionName: `cdkd-local-ecr-${Date.now()}`,
|
|
88599
88660
|
DurationSeconds: 3600
|
|
88600
88661
|
}))).Credentials;
|
|
88601
|
-
if (!creds || !creds.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new LocalInvokeBuildError$1(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
88662
|
+
if (!creds || !creds.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new LocalInvokeBuildError$1(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials. Verify the role's trust policy allows your identity to assume it.`);
|
|
88602
88663
|
return {
|
|
88603
88664
|
accessKeyId: creds.AccessKeyId,
|
|
88604
88665
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -88608,7 +88669,7 @@ async function assumeRoleForEcr(roleArn, callerRegion, logger) {
|
|
|
88608
88669
|
} catch (err) {
|
|
88609
88670
|
if (err instanceof LocalInvokeBuildError$1) throw err;
|
|
88610
88671
|
const reason = err instanceof Error ? err.message : String(err);
|
|
88611
|
-
throw new LocalInvokeBuildError$1(`Failed to assume role ${displayIdent(roleArn, { maxCodePoints:
|
|
88672
|
+
throw new LocalInvokeBuildError$1(`Failed to assume role ${displayIdent(roleArn, { maxCodePoints: 613 })} for ECR pull: ${displaySafe(reason)}. Verify the role exists and its trust policy permits the caller's identity to assume it.`);
|
|
88612
88673
|
} finally {
|
|
88613
88674
|
sts.destroy();
|
|
88614
88675
|
}
|
|
@@ -90987,7 +91048,7 @@ async function assumeLambdaExecutionRole$1(roleArn, region) {
|
|
|
90987
91048
|
RoleSessionName: `cdkd-local-start-api-${Date.now()}`,
|
|
90988
91049
|
DurationSeconds: 3600
|
|
90989
91050
|
}))).Credentials;
|
|
90990
|
-
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
91051
|
+
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials.`);
|
|
90991
91052
|
return {
|
|
90992
91053
|
accessKeyId: creds.AccessKeyId,
|
|
90993
91054
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -92350,7 +92411,7 @@ async function resolvePlaceholderAccount(arn, region) {
|
|
|
92350
92411
|
});
|
|
92351
92412
|
try {
|
|
92352
92413
|
const account = (await sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
92353
|
-
if (!account) throw new Error(`--assume-task-role: GetCallerIdentity returned no Account; cannot resolve placeholder ARN ${displayIdent(arn, { maxCodePoints:
|
|
92414
|
+
if (!account) throw new Error(`--assume-task-role: GetCallerIdentity returned no Account; cannot resolve placeholder ARN ${displayIdent(arn, { maxCodePoints: 613 })}. Pass the ARN explicitly: --assume-task-role <arn>`);
|
|
92354
92415
|
return arn.split(TASK_ROLE_ACCOUNT_PLACEHOLDER).join(account);
|
|
92355
92416
|
} finally {
|
|
92356
92417
|
sts.destroy();
|
|
@@ -92372,7 +92433,7 @@ async function assumeTaskRole(roleArn, region) {
|
|
|
92372
92433
|
RoleSessionName: `cdkd-local-run-task-${Date.now()}`,
|
|
92373
92434
|
DurationSeconds: 3600
|
|
92374
92435
|
}))).Credentials;
|
|
92375
|
-
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
92436
|
+
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials.`);
|
|
92376
92437
|
return {
|
|
92377
92438
|
accessKeyId: creds.AccessKeyId,
|
|
92378
92439
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -93854,7 +93915,7 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
|
|
|
93854
93915
|
if (stsRegion) dockerEnv["AWS_REGION"] = stsRegion;
|
|
93855
93916
|
assumeSucceeded = true;
|
|
93856
93917
|
} catch (err) {
|
|
93857
|
-
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints:
|
|
93918
|
+
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints: 613 })}) failed: ${displaySafe(err instanceof Error ? err.message : String(err))}. Falling back to the developer's shell credentials.`);
|
|
93858
93919
|
}
|
|
93859
93920
|
}
|
|
93860
93921
|
if (!assumeSucceeded) {
|
|
@@ -93911,7 +93972,7 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
|
|
|
93911
93972
|
*/
|
|
93912
93973
|
function assumeRoleFallbackWarning(args) {
|
|
93913
93974
|
const fallback = args.profile ? `--profile ${displayIdent(args.profile)}` : args.fallbackWithoutProfile;
|
|
93914
|
-
return `--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints:
|
|
93975
|
+
return `--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints: 613 })}) failed for ${args.purpose}: ${displaySafe(args.error instanceof Error ? args.error.message : String(args.error))}. Falling back to ${fallback}.`;
|
|
93915
93976
|
}
|
|
93916
93977
|
/**
|
|
93917
93978
|
* Resolve the role ARN to assume, honoring the three `--assume-role` forms.
|
|
@@ -94072,7 +94133,7 @@ async function assumeAgentCoreExecutionRole(roleArn, region) {
|
|
|
94072
94133
|
RoleSessionName: `${getEmbedConfig().resourceNamePrefix}-invoke-agentcore-${Date.now()}`,
|
|
94073
94134
|
DurationSeconds: 3600
|
|
94074
94135
|
}))).Credentials;
|
|
94075
|
-
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new CdkdError(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
94136
|
+
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new CdkdError(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials.`, "LOCAL_INVOKE_AGENTCORE_ASSUMEROLE_NO_CREDS");
|
|
94076
94137
|
return {
|
|
94077
94138
|
accessKeyId: creds.AccessKeyId,
|
|
94078
94139
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -94685,7 +94746,7 @@ async function localInvokeCommand(target, options) {
|
|
|
94685
94746
|
const arn = resolveExecutionRoleArnFromState(stateForRoleHint, lambda.logicalId);
|
|
94686
94747
|
if (arn) {
|
|
94687
94748
|
resolvedAssumeRoleArn = arn;
|
|
94688
|
-
logger.info(`--assume-role: auto-resolved execution role from cdkd state: ${displayIdent(arn, { maxCodePoints:
|
|
94749
|
+
logger.info(`--assume-role: auto-resolved execution role from cdkd state: ${displayIdent(arn, { maxCodePoints: 613 })}`);
|
|
94689
94750
|
} else logger.warn(`--assume-role: could not resolve the execution role ARN from cdkd state for '${lambda.logicalId}'. Pass the ARN explicitly: --assume-role <arn>. Falling back to the developer's shell credentials.`);
|
|
94690
94751
|
}
|
|
94691
94752
|
} else maybeSuggestAssumeRole(options, stateForRoleHint, lambda.logicalId);
|
|
@@ -95153,7 +95214,7 @@ async function applyLambdaCredentialEnv(dockerEnv, args) {
|
|
|
95153
95214
|
assumeSucceeded = true;
|
|
95154
95215
|
} catch (err) {
|
|
95155
95216
|
const reason = err instanceof Error ? err.message : String(err);
|
|
95156
|
-
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints:
|
|
95217
|
+
logger.warn(`--assume-role: STS AssumeRole(${displayIdent(args.assumeRoleArn, { maxCodePoints: 613 })}) failed: ${displaySafe(reason)}. Falling back to the developer's shell credentials.`);
|
|
95157
95218
|
}
|
|
95158
95219
|
}
|
|
95159
95220
|
if (!assumeSucceeded) {
|
|
@@ -95191,7 +95252,7 @@ async function assumeLambdaExecutionRole(roleArn, region) {
|
|
|
95191
95252
|
RoleSessionName: `cdkd-local-invoke-${Date.now()}`,
|
|
95192
95253
|
DurationSeconds: 3600
|
|
95193
95254
|
}))).Credentials;
|
|
95194
|
-
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints:
|
|
95255
|
+
if (!creds?.AccessKeyId || !creds.SecretAccessKey || !creds.SessionToken) throw new Error(`AssumeRole(${displayIdent(roleArn, { maxCodePoints: 613 })}) returned no usable credentials.`);
|
|
95195
95256
|
return {
|
|
95196
95257
|
accessKeyId: creds.AccessKeyId,
|
|
95197
95258
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -95312,7 +95373,7 @@ function materializeInlineCode(handler, source, fileExtension) {
|
|
|
95312
95373
|
function suggestAssumeRoleFromState(state, logicalId) {
|
|
95313
95374
|
const logger = getLogger();
|
|
95314
95375
|
const roleArn = resolveExecutionRoleArnFromState(state, logicalId);
|
|
95315
|
-
if (roleArn) logger.info(`Hint: the deployed function uses execution role ${displayIdent(roleArn, { maxCodePoints:
|
|
95376
|
+
if (roleArn) logger.info(`Hint: the deployed function uses execution role ${displayIdent(roleArn, { maxCodePoints: 613 })}. Re-run with --assume-role to invoke under the deployed function's narrow permissions.`);
|
|
95316
95377
|
}
|
|
95317
95378
|
/**
|
|
95318
95379
|
* Emit the "re-run with `--assume-role`" hint, if it applies.
|
|
@@ -95472,4 +95533,4 @@ function buildProgram() {
|
|
|
95472
95533
|
|
|
95473
95534
|
//#endregion
|
|
95474
95535
|
export { buildProgram };
|
|
95475
|
-
//# sourceMappingURL=program-
|
|
95536
|
+
//# sourceMappingURL=program-qSSjqstP.js.map
|