@go-to-k/cdkd 0.317.0 → 0.318.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.
@@ -2,19 +2,19 @@ import { r as getAwsClients, s as withApiGatewayPacing } from "./aws-clients-DWp
2
2
  import { $ as safeMsg, A as isBeforeStateRead, E as generatedNameFor, J as displaySafe, N as recordedGeneratedNameKept, O as getCurrentStackInstanceId, Q as plainIdentOr, T as generateResourceNameWithFallback, V as SECRET_REF_MAX_CODE_POINTS, X as isPasteableIdent, Y as displayStackName, a as safeStringify, i as isAwsAuthoredFailure, n as describeAwsFailure, q as displayIdent, r as describeAwsStatusReason, s as getLogger, t as VERBOSE_POINTER, w as generateResourceName } from "./aws-failure-text-DiHodi76.js";
3
3
  import { $ as isTerminalDeleteFailure, A as setBounded, Ar as isThrottlingError, At as stateOrphanRecordRemedy, B as normalizeAwsTagsToCfn, C as AmbiguousCreateLatch, Cr as isExplicitDenyError, Ct as compositeIdFormatMessage, D as isInsideWindow, Dt as packCompositeId, E as createAttemptKey, Er as isTransientServerError, Et as logicalIdShown, F as assertRegionMatch, Fn as ResourceUpdateNotSupportedError, Ft as maskerOrIdentity, Gt as markAuxiliaryFailure, H as refusalTypeShown, I as VALUE_NOT_SHOWN, It as withDerivedNameMasks, J as deleteAfterProtectionFlipWithFinalSnapshot, K as ProtectionFlipRegistry, Kt as markCreatedBeforeFailure, L as isPlainImportJson, M as RESOURCE_NOT_FOUND, Mr as markRedactedCause, Mt as createMaskedRetryLogger, Nn as ProvisioningError, Nr as wrapMaskedAwsError, Nt as isSecretDerivedValue, O as replayFollowedAmbiguousAttempt, Or as THROTTLING_ERROR_NAMES, P as markNotGone, Pt as maskDeep, Q as isTerminalDbWaitStatus, Qn as pasteableCommand, R as isPlainImportValue, S as AMBIGUOUS_LATCH_TTL_MS, Sr as isAmbiguousOutcomeError, St as canonicalizeRoute53QueryName, T as ambiguousAttemptLead, Tr as isRetryableTransientError, Tt as compositeIdSkipResult, U as remedyLogicalId, Ut as isAuxiliaryFailure, V as quotedRemedyLogicalId, W as resolveExplicitPhysicalId, Xn as hasClauseBreak, Y as deleteWithProtectionCompensation, Yn as commandHole, Z as isProceedDbStatus, Zn as isInertUnquoted, b as withRemovalDefaults, bt as isInterruptedWaitError, ct as UNNAMEABLE_ID_CLAUSE, d as onlySecretDerived, dn as withPasteableAwsProfile, dt as pasteableAwsCommand, er as plainOrDescribed, et as logGroupProtectionSite, f as readPrincipalLists, fn as ambientClientDefaults, ft as protectedReplacementAdvice, g as clearOnUpdateRemoval, gn as AccountIdUnavailableError, hn as credentialFingerprint, hr as relayedNameCollision, ht as ElapsedBudgetRegistry, i as reportCreatedResource, ir as withheldTargetClause, j as withoutServerErrorRetries, jr as markNonRetryable, jt as createMaskedLogSinks, k as replayedSendWindow, kr as isMarkedNonRetryable, kt as segmentAfterAnchor, l as SECRET_DERIVED_READ_LIVE, lt as WITHHELD_AWS_COMMAND, m as recordedPrincipalsRepair, mn as clientDefaultsFor, mr as markReplayMayCollide, mt as ElapsedBudget, nt as protectionFlipKey, o as retractCreatedResource, on as injectiveKey, ot as userPoolProtectionSite, pn as ambientCredentialConfig, pr as markNameCollision, pt as renderDisableCommand, qt as markSupersedesEarlierCreate, rr as shellQuote, rt as rdsFamilyProtectionSite, sn as injectiveKeyPrefix, tt as observeThenDisableProtection, u as holdsSecretDerivedEntry, ut as isAwsCliLiteral, vn as CdkdError, w as RecentIdSet, wt as compositeIdSeparatorRefusal, xt as startInterruptWatch, y as removedTemplateKeys, yr as explicitDenyPolicyKind, z as isQuotableImportValue, zt as clearCreatedBeforeFailure } from "./created-resource-sink-BpB3iPvn.js";
4
4
  import { c as ambientRegion } from "./aws-client-defaults-BLXFsfMa.js";
5
- import { $ as sendTtlWaitingOutRateLimit, A as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Aa as isUsableAttemptedName, As as refuseMalformedResourcesForDestroy, B as deleteTableWithIndexBusyRetry, Ba as s3BucketDomainName, Bi as markDeleteStarted, Br as getStackRecords, C as planContributorInsightsOp, Ca as ec2InstanceProtectionSite, Cc as ecsServiceLaunchTypeSetOrChanged, Ct as enclosingDeadlineExpired, D as reverseMapTableContributorInsights, Da as reEnableInstanceApiTermination, Dc as sameLambdaFunctionAddress, E as reverseMapIndexContributorInsights, Ea as reDisableInstanceApiTermination, Ec as lambdaFunctionNameForMask, F as resolveDynamoDbDeleteBudgetClock, Fd as renderAssemblyPathEscape, Fi as acquireIdempotencyToken, Fo as accountArgs, G as readbackVectorIndexes, Gc as markSameGenerationBag, Gi as refuseMalformedDesiredTags, Gn as isRedactedRecordedValue, Gs as findSilentDropProperties, H as relayedIndexBusyDelete, Ha as s3BucketRegionalDomainName, Hi as DBPROXY_TAG_OPTIONS, Hn as getCurrentProducerRegions, Hr as replacedDeleteFailureVerdict, Hs as withheldAccountClause, I as resolveDynamoDbDeleteBudgetMs, Id as resolveAssemblyPath, J as vectorIndexesShapeDetail, Ja as outputReferenceProvenanceOf, Jc as snapshotPassProvenance, Ji as definedAttributes, Jt as getCurrentNestedStackContext, K as vectorIndexesForCreate, Kc as redactForState, Ki as tagMapAsList, Kn as redactedDeleteAddressFields, L as DELETE_INDEX_WAIT_PROCEED_NOTE, M as beginDeleteWait, N as compensateRemovedDeletionProtection, Nd as describeFileReadFailure, Ni as reserveStackCreateToken, O as stripIndexContributorInsights, Oo as passedParameterClassesOf, P as deleteBudgetKey, Pd as displayAssemblyPath, Q as readTtlSpec, R as INDEX_SETTLE_POLL_INTERVAL_MS, Ra as isSettledInstanceState, Rr as awaitInFlightSibling, S as indexDeclaresContributorInsights, Sl as recordAttributeIdCopy, T as readContributorInsightsSpec, Ta as observeThenDisableInstanceApiTermination, Tc as canonicalLambdaFunctionName, Tl as carriesSecretMask, To as parseWebACLArn, U as waitForIndexesSettled, Ua as s3BucketWebsiteUrl, Ui as planTagDiff, V as maskedLogger, Va as s3BucketDualStackDomainName, Vi as DBPROXY_TAGS_WHAT, Vt as getNestedRevertRun, W as planVectorIndexUpdates, Wi as readTagList, Wn as REDACTED_DELETE_ADDRESS_SKIP_REASON, Wt as revertNestedChildFromJournal, X as isTtlRateLimited, Y as isTtlAlreadyDisabled, Yi as stringifyIfAssigned, Yt as withNestedStackContext, Z as planTimeToLive, Zc as hasMaskableValues, _ as streamMemberRefusals, _t as renderNestedTemplateTreeDefect, _u as rewriteTemplateAssetReferences, aa as getCurrentResourceSecrets, ac as toCfnInteger, an as chunks, at as markRefusedBeforeApplying, b as CONTRIBUTOR_INSIGHTS_KEY, ba as isWaitAbandonedError, bc as withRetry, bd as derivePartitionAndUrlSuffix, bl as recoverMaskedOutput, c as DynamoDBGlobalTableProvider, cc as coerceCfnInteger, cn as withApiLimit, d as declaredStreamPolicyMember, da as slowCcOperationTimeoutMs, dc as configStringRefusal, dl as withoutPhysicalNameCopies, et as ECR_AUTO_DELETE_IMAGES_TAG, f as declaredStreamTagsMember, fa as onlySecretReferencesDiffer, fc as readConfigString, fu as stringifyValue, g as streamDeclaresTags, gc as requireConfigString, gd as decodeListingKey, gt as listNestedTemplateRows, h as streamDeclaresPolicy, hc as requireConfigObject, ht as isAbsoluteAssetPath, ic as isWarmThroughputDecrease, it as getPriorAttempts, j as DYNAMODB_DELETE_POLL_COST_MS, ji as earliestDefined, k as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, l as STREAM_POLICY_KEY, lc as configBooleanRefusal, lu as timePhase, m as reverseMapStreamPolicy, mc as requireConfigArray, mo as getAccountInfo, mt as findNestedTemplateTreeDefect, nc as WARM_THROUGHPUT_MEMBERS, nt as hasCdkAutoDeleteTag, oc as toFiniteNumber, on as isAccessDeniedError, p as planStreamMemberOps, pa as unchangedBehindSecretReference, pc as replayWarn, pl as dynamicReferenceTokens, q as vectorIndexesSettled, qc as recordReferenceProvenanceEntry, qi as tagPlanWarning, qn as redactedDeleteAddressSkip, qs as withoutSilentDropProperties, rc as coerceWarmThroughput$1, rt as isTruthyCfnBoolean, sc as coerceCfnBoolean, sn as lookupEachName, t as DeployEngine, ta as waitForLambdaFunctionActive, tt as S3_AUTO_DELETE_OBJECTS_TAG, u as STREAM_TAGS_KEY, uc as configIntegerRefusal, us as refuseMalformedNestedChildOutputs, v as streamPolicyMatchesDeclared, va as deleteSkipReason, vi as secretNamedAttributeNamesOf, w as planIndexContributorInsightsOps, wa as isTerminationProtectionPropagationError, wc as emrClusterInstancesReplaced, wt as enclosingDeadlineRemainingMs, x as contributorInsightsRefusals, xa as markWaitAbandoned, xc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, xl as physicalNameCopiesOf, y as streamTagsMatchDeclared, ya as withIndeterminateGuard, yd as canonicalizeRegion, z as TABLE_INDEX_NOUN, za as s3BucketArn, zc as passedNoEchoParametersOf, zi as isRefusedByName } from "./deploy-engine-b0rYBotL.js";
6
- import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-gTpDZhfz.js";
7
- import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-BZ-VVfXu.js";
5
+ import { $ as sendTtlWaitingOutRateLimit, A as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Aa as isUsableAttemptedName, As as refuseMalformedResourcesForDestroy, B as deleteTableWithIndexBusyRetry, Ba as s3BucketDomainName, Bi as markDeleteStarted, Br as getStackRecords, C as planContributorInsightsOp, Ca as ec2InstanceProtectionSite, Cc as ecsServiceLaunchTypeSetOrChanged, Ct as enclosingDeadlineExpired, D as reverseMapTableContributorInsights, Da as reEnableInstanceApiTermination, Dc as sameLambdaFunctionAddress, E as reverseMapIndexContributorInsights, Ea as reDisableInstanceApiTermination, Ec as lambdaFunctionNameForMask, F as resolveDynamoDbDeleteBudgetClock, Fd as renderAssemblyPathEscape, Fi as acquireIdempotencyToken, Fo as accountArgs, G as readbackVectorIndexes, Gc as markSameGenerationBag, Gi as refuseMalformedDesiredTags, Gn as isRedactedRecordedValue, Gs as findSilentDropProperties, H as relayedIndexBusyDelete, Ha as s3BucketRegionalDomainName, Hi as DBPROXY_TAG_OPTIONS, Hn as getCurrentProducerRegions, Hr as replacedDeleteFailureVerdict, Hs as withheldAccountClause, I as resolveDynamoDbDeleteBudgetMs, Id as resolveAssemblyPath, J as vectorIndexesShapeDetail, Ja as outputReferenceProvenanceOf, Jc as snapshotPassProvenance, Ji as definedAttributes, Jt as getCurrentNestedStackContext, K as vectorIndexesForCreate, Kc as redactForState, Ki as tagMapAsList, Kn as redactedDeleteAddressFields, L as DELETE_INDEX_WAIT_PROCEED_NOTE, M as beginDeleteWait, N as compensateRemovedDeletionProtection, Nd as describeFileReadFailure, Ni as reserveStackCreateToken, O as stripIndexContributorInsights, Oo as passedParameterClassesOf, P as deleteBudgetKey, Pd as displayAssemblyPath, Q as readTtlSpec, R as INDEX_SETTLE_POLL_INTERVAL_MS, Ra as isSettledInstanceState, Rr as awaitInFlightSibling, S as indexDeclaresContributorInsights, Sl as recordAttributeIdCopy, T as readContributorInsightsSpec, Ta as observeThenDisableInstanceApiTermination, Tc as canonicalLambdaFunctionName, Tl as carriesSecretMask, To as parseWebACLArn, U as waitForIndexesSettled, Ua as s3BucketWebsiteUrl, Ui as planTagDiff, V as maskedLogger, Va as s3BucketDualStackDomainName, Vi as DBPROXY_TAGS_WHAT, Vt as getNestedRevertRun, W as planVectorIndexUpdates, Wi as readTagList, Wn as REDACTED_DELETE_ADDRESS_SKIP_REASON, Wt as revertNestedChildFromJournal, X as isTtlRateLimited, Y as isTtlAlreadyDisabled, Yi as stringifyIfAssigned, Yt as withNestedStackContext, Z as planTimeToLive, Zc as hasMaskableValues, _ as streamMemberRefusals, _t as renderNestedTemplateTreeDefect, _u as rewriteTemplateAssetReferences, aa as getCurrentResourceSecrets, ac as toCfnInteger, an as chunks, at as markRefusedBeforeApplying, b as CONTRIBUTOR_INSIGHTS_KEY, ba as isWaitAbandonedError, bc as withRetry, bd as derivePartitionAndUrlSuffix, bl as recoverMaskedOutput, c as DynamoDBGlobalTableProvider, cc as coerceCfnInteger, cn as withApiLimit, d as declaredStreamPolicyMember, da as slowCcOperationTimeoutMs, dc as configStringRefusal, dl as withoutPhysicalNameCopies, et as ECR_AUTO_DELETE_IMAGES_TAG, f as declaredStreamTagsMember, fa as onlySecretReferencesDiffer, fc as readConfigString, fu as stringifyValue, g as streamDeclaresTags, gc as requireConfigString, gd as decodeListingKey, gt as listNestedTemplateRows, h as streamDeclaresPolicy, hc as requireConfigObject, ht as isAbsoluteAssetPath, ic as isWarmThroughputDecrease, it as getPriorAttempts, j as DYNAMODB_DELETE_POLL_COST_MS, ji as earliestDefined, k as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, l as STREAM_POLICY_KEY, lc as configBooleanRefusal, lu as timePhase, m as reverseMapStreamPolicy, mc as requireConfigArray, mo as getAccountInfo, mt as findNestedTemplateTreeDefect, nc as WARM_THROUGHPUT_MEMBERS, nt as hasCdkAutoDeleteTag, oc as toFiniteNumber, on as isAccessDeniedError, p as planStreamMemberOps, pa as unchangedBehindSecretReference, pc as replayWarn, pl as dynamicReferenceTokens, q as vectorIndexesSettled, qc as recordReferenceProvenanceEntry, qi as tagPlanWarning, qn as redactedDeleteAddressSkip, qs as withoutSilentDropProperties, rc as coerceWarmThroughput$1, rt as isTruthyCfnBoolean, sc as coerceCfnBoolean, sn as lookupEachName, t as DeployEngine, ta as waitForLambdaFunctionActive, tt as S3_AUTO_DELETE_OBJECTS_TAG, u as STREAM_TAGS_KEY, uc as configIntegerRefusal, us as refuseMalformedNestedChildOutputs, v as streamPolicyMatchesDeclared, va as deleteSkipReason, vi as secretNamedAttributeNamesOf, w as planIndexContributorInsightsOps, wa as isTerminationProtectionPropagationError, wc as emrClusterInstancesReplaced, wt as enclosingDeadlineRemainingMs, x as contributorInsightsRefusals, xa as markWaitAbandoned, xc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, xl as physicalNameCopiesOf, y as streamTagsMatchDeclared, ya as withIndeterminateGuard, yd as canonicalizeRegion, z as TABLE_INDEX_NOUN, za as s3BucketArn, zc as passedNoEchoParametersOf, zi as isRefusedByName } from "./deploy-engine-BnEvzfon.js";
6
+ import { n as collectInlinePolicyNamesManagedBySiblings, r as IamCreateClientCache, t as IAMRoleProvider } from "./iam-role-provider-3w71Eu4a.js";
7
+ import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, s as resolvedResourceTimeoutMs, t as canonicalizeIpv4Cidr } from "./program-CKm1Nk6t.js";
8
8
  import { n as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-CspmK57I.js";
9
- import { RDSProvider } from "./rds-provider-BUNLNluC.js";
10
- import { NeptuneProvider } from "./neptune-provider-BfzktOKC.js";
11
- import { ASGProvider } from "./asg-provider-WornuySB.js";
9
+ import { RDSProvider } from "./rds-provider-bEeid6uI.js";
10
+ import { NeptuneProvider } from "./neptune-provider-D8tkFP12.js";
11
+ import { ASGProvider } from "./asg-provider-kV8DYFjT.js";
12
12
  import { createHash, randomUUID } from "node:crypto";
13
13
  import { CreateBucketCommand, CreateBucketMetadataConfigurationCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetadataConfigurationCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAbacCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketMetadataConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAbacCommand, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, UpdateBucketMetadataAnnotationTableConfigurationCommand, UpdateBucketMetadataInventoryTableConfigurationCommand, UpdateBucketMetadataJournalTableConfigurationCommand } from "@aws-sdk/client-s3";
14
14
  import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateAccessKeyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateAccessKeyCommand, UpdateGroupCommand, UpdateLoginProfileCommand, UpdateUserCommand } from "@aws-sdk/client-iam";
15
15
  import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand, QueueDoesNotExist, SQSClient, SetQueueAttributesCommand, TagQueueCommand, UntagQueueCommand } from "@aws-sdk/client-sqs";
16
16
  import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
17
- import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCodeSigningConfigCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCodeSigningConfigCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, GetRuntimeManagementConfigCommand, LambdaClient, ListEventSourceMappingsCommand, ListLayerVersionsCommand, ListTagsCommand, PublishLayerVersionCommand, PutFunctionCodeSigningConfigCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, PutRuntimeManagementConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
17
+ import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCodeSigningConfigCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCodeSigningConfigCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionConfigurationCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionScalingConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, GetRuntimeManagementConfigCommand, LambdaClient, ListEventSourceMappingsCommand, ListLayerVersionsCommand, ListTagsCommand, PublishLayerVersionCommand, PublishVersionCommand, PutFunctionCodeSigningConfigCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, PutFunctionScalingConfigCommand, PutRuntimeManagementConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
18
18
  import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
19
19
  import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateNatGatewayAddressCommand, AssociateRouteTableCommand, AttachInternetGatewayCommand, AttachVpnGatewayCommand, AuthorizeSecurityGroupEgressCommand, AuthorizeSecurityGroupIngressCommand, CreateInternetGatewayCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, CreateNetworkAclEntryCommand, CreateRouteCommand, CreateRouteTableCommand, CreateSecurityGroupCommand, CreateSubnetCommand, CreateTagsCommand, CreateVpcCommand, DeleteInternetGatewayCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, DeleteNetworkAclEntryCommand, DeleteNetworkInterfaceCommand, DeleteRouteCommand, DeleteRouteTableCommand, DeleteSecurityGroupCommand, DeleteSubnetCommand, DeleteTagsCommand, DeleteVpcCommand, DescribeAddressesCommand, DescribeAvailabilityZonesCommand, DescribeIamInstanceProfileAssociationsCommand, DescribeInstanceAttributeCommand, DescribeInstanceCreditSpecificationsCommand, DescribeInstancesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand, DescribeNetworkAclsCommand, DescribeNetworkInterfacesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupRulesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcAttributeCommand, DescribeVpcsCommand, DescribeVpnGatewaysCommand, DetachInternetGatewayCommand, DetachVpnGatewayCommand, DisassociateAddressCommand, DisassociateIamInstanceProfileCommand, DisassociateNatGatewayAddressCommand, DisassociateRouteTableCommand, EC2Client, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, ModifyVpcTenancyCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceIamInstanceProfileAssociationCommand, ReplaceNetworkAclAssociationCommand, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, StartInstancesCommand, StopInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
20
20
  import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PolicyNotFoundException, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateKinesisStreamingDestinationCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
@@ -8334,6 +8334,26 @@ function withholdWaiterPayload(error, mask) {
8334
8334
  };
8335
8335
  }
8336
8336
  const LAMBDA_CLEANUP_DELETE_MAX_ATTEMPTS = 3;
8337
+ const LATEST_PUBLISHED = "$LATEST.PUBLISHED";
8338
+ function capacityProviderConfigForUpdate(config) {
8339
+ const managed = config?.LambdaManagedInstancesCapacityProviderConfig;
8340
+ if (managed === void 0) return config;
8341
+ return { LambdaManagedInstancesCapacityProviderConfig: {
8342
+ ...managed,
8343
+ ExecutionEnvironmentMemoryGiBPerVCpu: managed.ExecutionEnvironmentMemoryGiBPerVCpu ?? 2
8344
+ } };
8345
+ }
8346
+ function refuseManagedInstancesPropertiesWithoutCapacityProvider(logicalId, resourceType, properties, context, warn) {
8347
+ if (properties["CapacityProviderConfig"] !== void 0) return;
8348
+ const declared = [properties["PublishToLatestPublished"] !== void 0 ? "PublishToLatestPublished" : void 0, properties["FunctionScalingConfig"] !== void 0 ? "FunctionScalingConfig" : void 0].filter((key) => key !== void 0);
8349
+ if (declared.length === 0) return;
8350
+ const named = declared.join(" and ");
8351
+ if (context.replayingState === true) {
8352
+ warn(`Lambda function ${logicalId} records ${named} without CapacityProviderConfig; ignoring ${declared.length === 1 ? "it" : "them"} for this replay.`);
8353
+ return;
8354
+ }
8355
+ throw markNonRetryable(new ProvisioningError(`Lambda function ${logicalId} declares ${named} without CapacityProviderConfig: AWS applies ${declared.length === 1 ? "it" : "them"} to Lambda Managed Instances functions only. Add a capacity provider, or remove ${named}.`, resourceType, logicalId, context.physicalId));
8356
+ }
8337
8357
  function refuseImageFunctionUnsupported(logicalId, resourceType, properties, physicalId) {
8338
8358
  if (properties["PackageType"] !== "Image") return;
8339
8359
  const declared = [properties["CodeSigningConfigArn"] !== void 0 ? "CodeSigningConfigArn" : void 0, properties["RuntimeManagementConfig"] !== void 0 ? "RuntimeManagementConfig" : void 0].filter((key) => key !== void 0);
@@ -8349,7 +8369,8 @@ const SEPARATELY_APPLIED_KEYS = /* @__PURE__ */ new Set([
8349
8369
  "ReservedConcurrentExecutions",
8350
8370
  "RecursiveLoop",
8351
8371
  "CodeSigningConfigArn",
8352
- "RuntimeManagementConfig"
8372
+ "RuntimeManagementConfig",
8373
+ "FunctionScalingConfig"
8353
8374
  ]);
8354
8375
  var LambdaFunctionProvider = class {
8355
8376
  lambdaClient;
@@ -8384,7 +8405,10 @@ var LambdaFunctionProvider = class {
8384
8405
  "CodeSigningConfigArn",
8385
8406
  "RuntimeManagementConfig",
8386
8407
  "DurableConfig",
8387
- "TenancyConfig"
8408
+ "TenancyConfig",
8409
+ "CapacityProviderConfig",
8410
+ "FunctionScalingConfig",
8411
+ "PublishToLatestPublished"
8388
8412
  ])]]);
8389
8413
  removalDefaults = /* @__PURE__ */ new Map([["AWS::Lambda::Function", /* @__PURE__ */ new Map([
8390
8414
  ["Timeout", 3],
@@ -8415,14 +8439,18 @@ var LambdaFunctionProvider = class {
8415
8439
  "VpcConfig",
8416
8440
  "ReservedConcurrentExecutions",
8417
8441
  "CodeSigningConfigArn",
8418
- "RuntimeManagementConfig"
8442
+ "RuntimeManagementConfig",
8443
+ "CapacityProviderConfig",
8444
+ "FunctionScalingConfig",
8445
+ "PublishToLatestPublished"
8419
8446
  ])]]);
8420
- unhandledByDesign = /* @__PURE__ */ new Map([["AWS::Lambda::Function", /* @__PURE__ */ new Map([["PublishToLatestPublished", "CloudFormation-only version-publishing directive with no AWS SDK equivalent"]])]]);
8421
8447
  cleanupDeleteRetryDelayMs = 2e3;
8422
8448
  eniWaitTimeoutMs = 6e5;
8423
8449
  eniWaitInitialDelayMs = 1e4;
8424
8450
  eniWaitMaxDelayMs = 1e4;
8425
8451
  functionUpdateMaxWaitSeconds = 600;
8452
+ latestPublishedPollMs = 3e3;
8453
+ latestPublishedDeadlineMarginMs = 15e3;
8426
8454
  eniInitialSleepMs = 1e4;
8427
8455
  eniDeleteRetryBudgetMs = 18e5;
8428
8456
  eniDeleteRetryIntervalMs = 15e3;
@@ -8442,12 +8470,14 @@ var LambdaFunctionProvider = class {
8442
8470
  if (!code) throw new ProvisioningError(`Code is required for Lambda function ${logicalId}`, resourceType, logicalId);
8443
8471
  if (!role) throw new ProvisioningError(`Role is required for Lambda function ${logicalId}`, resourceType, logicalId);
8444
8472
  refuseImageFunctionUnsupported(logicalId, resourceType, properties);
8473
+ refuseManagedInstancesPropertiesWithoutCapacityProvider(logicalId, resourceType, properties, { replayingState: context?.replayingState }, log.warn);
8445
8474
  let functionCreated = false;
8446
8475
  let createdFunctionName;
8447
8476
  let createdFunctionIdentity;
8448
8477
  const postCreateCleanup = { deleted: false };
8449
8478
  try {
8450
8479
  const tags = properties["Tags"] ? Object.fromEntries(desiredTags.map((tag) => [tag.Key, tag.Value])) : void 0;
8480
+ const capacityProviderConfig = properties["CapacityProviderConfig"];
8451
8481
  const createParams = {
8452
8482
  FunctionName: functionName,
8453
8483
  Role: role,
@@ -8473,13 +8503,48 @@ var LambdaFunctionProvider = class {
8473
8503
  DurableConfig: properties["DurableConfig"],
8474
8504
  TenancyConfig: properties["TenancyConfig"],
8475
8505
  CodeSigningConfigArn: properties["CodeSigningConfigArn"],
8476
- Tags: tags
8506
+ Tags: tags,
8507
+ ...capacityProviderConfig !== void 0 && {
8508
+ CapacityProviderConfig: capacityProviderConfig,
8509
+ Publish: true,
8510
+ PublishTo: "LATEST_PUBLISHED"
8511
+ }
8477
8512
  };
8478
8513
  const response = await (await this.createClient.get()).send(new CreateFunctionCommand(createParams));
8479
8514
  functionCreated = true;
8480
8515
  createdFunctionName = response.FunctionName || functionName;
8481
8516
  createdFunctionIdentity = functionIdentityToken(response.FunctionArn, response.LastModified);
8482
8517
  reportCreatedResource(logicalId, resourceType, createdFunctionName, createdFunctionIdentity);
8518
+ if (capacityProviderConfig !== void 0) {
8519
+ createdFunctionIdentity = void 0;
8520
+ reportCreatedResource(logicalId, resourceType, createdFunctionName);
8521
+ const target = {
8522
+ logicalId,
8523
+ resourceType,
8524
+ functionName
8525
+ };
8526
+ await this.applyPostCreateConfig(() => this.waitForLatestPublishedSettled(target, log, "after"), {
8527
+ apiName: "GetFunctionConfiguration",
8528
+ propertyName: "CapacityProviderConfig",
8529
+ logicalId,
8530
+ resourceType,
8531
+ functionName,
8532
+ log,
8533
+ cleanup: postCreateCleanup,
8534
+ awaitGone: capacityProviderConfig !== void 0
8535
+ });
8536
+ const functionScalingConfig = properties["FunctionScalingConfig"];
8537
+ if (functionScalingConfig !== void 0) await this.applyPostCreateConfig(() => this.putFunctionScalingConfig(target, log, functionScalingConfig), {
8538
+ apiName: "PutFunctionScalingConfig",
8539
+ propertyName: "FunctionScalingConfig",
8540
+ logicalId,
8541
+ resourceType,
8542
+ functionName,
8543
+ log,
8544
+ cleanup: postCreateCleanup,
8545
+ awaitGone: capacityProviderConfig !== void 0
8546
+ });
8547
+ }
8483
8548
  const recursiveLoop = properties["RecursiveLoop"];
8484
8549
  if (recursiveLoop !== void 0) await this.applyPostCreateConfig(() => this.lambdaClient.send(new PutFunctionRecursionConfigCommand({
8485
8550
  FunctionName: functionName,
@@ -8491,7 +8556,8 @@ var LambdaFunctionProvider = class {
8491
8556
  resourceType,
8492
8557
  functionName,
8493
8558
  log,
8494
- cleanup: postCreateCleanup
8559
+ cleanup: postCreateCleanup,
8560
+ awaitGone: capacityProviderConfig !== void 0
8495
8561
  });
8496
8562
  const reservedConcurrentExecutions = properties["ReservedConcurrentExecutions"];
8497
8563
  if (reservedConcurrentExecutions !== void 0) await this.applyPostCreateConfig(() => this.lambdaClient.send(new PutFunctionConcurrencyCommand({
@@ -8504,11 +8570,12 @@ var LambdaFunctionProvider = class {
8504
8570
  resourceType,
8505
8571
  functionName,
8506
8572
  log,
8507
- cleanup: postCreateCleanup
8573
+ cleanup: postCreateCleanup,
8574
+ awaitGone: capacityProviderConfig !== void 0
8508
8575
  });
8509
8576
  const runtimeManagementConfig = properties["RuntimeManagementConfig"];
8510
8577
  if (runtimeManagementConfig !== void 0) await this.applyPostCreateConfig(async () => {
8511
- await waitUntilFunctionActiveV2({
8578
+ if (capacityProviderConfig === void 0) await waitUntilFunctionActiveV2({
8512
8579
  client: this.lambdaClient,
8513
8580
  maxWaitTime: this.functionUpdateMaxWaitSeconds,
8514
8581
  minDelay: 1,
@@ -8524,7 +8591,8 @@ var LambdaFunctionProvider = class {
8524
8591
  resourceType,
8525
8592
  functionName,
8526
8593
  log,
8527
- cleanup: postCreateCleanup
8594
+ cleanup: postCreateCleanup,
8595
+ awaitGone: capacityProviderConfig !== void 0
8528
8596
  });
8529
8597
  log.debug(`Successfully created Lambda function ${logicalId}: ${log.value(functionName)}`);
8530
8598
  return {
@@ -8579,7 +8647,12 @@ var LambdaFunctionProvider = class {
8579
8647
  if (!/currently in the following state|ResourceConflict/i.test(deleteMessage)) break;
8580
8648
  if (attempt < 2) await new Promise((resolve) => setTimeout(resolve, this.cleanupDeleteRetryDelayMs * (attempt + 1)));
8581
8649
  }
8582
- if (cleanupFailure === void 0) ctx.cleanup.deleted = true;
8650
+ if (cleanupFailure === void 0) {
8651
+ ctx.cleanup.deleted = true;
8652
+ if (ctx.awaitGone) await this.waitForFunctionGone(ctx, log).catch((goneError) => {
8653
+ log.warn(describeAwsFailure(goneError).summary);
8654
+ });
8655
+ }
8583
8656
  if (cleanupFailure !== void 0) {
8584
8657
  const cleanupHead = `Cleanup DeleteFunction failed for ${ctx.logicalId} after ${ctx.apiName} failure — function may be orphaned: `;
8585
8658
  if (cleanupFailure.redacted) this.logger.debug(log.mask(`${cleanupHead}${cleanupFailure.detail}`));
@@ -8597,6 +8670,42 @@ var LambdaFunctionProvider = class {
8597
8670
  RuntimeVersionArn: config["RuntimeVersionArn"]
8598
8671
  }));
8599
8672
  }
8673
+ async waitForLatestPublishedSettled(target, log, phase) {
8674
+ const { logicalId, resourceType, functionName } = target;
8675
+ const budgetMs = Math.min(this.functionUpdateMaxWaitSeconds * 1e3, enclosingDeadlineRemainingMs() - this.latestPublishedDeadlineMarginMs);
8676
+ const deadline = Date.now() + budgetMs;
8677
+ for (;;) {
8678
+ const cfg = await this.lambdaClient.send(new GetFunctionConfigurationCommand({
8679
+ FunctionName: functionName,
8680
+ Qualifier: LATEST_PUBLISHED
8681
+ }));
8682
+ if (phase === "after" && (cfg.State === "Failed" || cfg.LastUpdateStatus === "Failed")) throw this.wrapStatusReasonError(target, log, cfg);
8683
+ if (!(cfg.State === "Pending" || cfg.State === "Deactivating" || cfg.LastUpdateStatus === "InProgress")) return;
8684
+ if (Date.now() >= deadline) throw new ProvisioningError(`Lambda function ${logicalId}: ${LATEST_PUBLISHED} did not settle within ${Math.max(0, Math.round(budgetMs / 1e3))}s (State ${cfg.State}, LastUpdateStatus ${cfg.LastUpdateStatus})`, resourceType, logicalId, functionName);
8685
+ await new Promise((resolve) => setTimeout(resolve, this.latestPublishedPollMs));
8686
+ }
8687
+ }
8688
+ wrapStatusReasonError(target, log, cfg) {
8689
+ const { logicalId, resourceType, functionName } = target;
8690
+ const head = `Lambda function ${logicalId}: ${LATEST_PUBLISHED} failed: `;
8691
+ const text = describeAwsStatusReason({
8692
+ code: cfg.StateReasonCode ?? cfg.LastUpdateStatusReasonCode,
8693
+ message: cfg.StateReason ?? cfg.LastUpdateStatusReason
8694
+ }, "no reason given");
8695
+ const build = (detail, cause) => new ProvisioningError(`${head}${log.mask(detail)}`, resourceType, logicalId, functionName, cause);
8696
+ if (!text.redacted) return build(text.summary);
8697
+ log.debug(log.mask(`${head}${text.detail}`));
8698
+ return markRedactedCause(build(text.summary, new Error(text.detail)));
8699
+ }
8700
+ async putFunctionScalingConfig(target, log, config) {
8701
+ await this.waitForLatestPublishedSettled(target, log, "before");
8702
+ await this.lambdaClient.send(new PutFunctionScalingConfigCommand({
8703
+ FunctionName: target.functionName,
8704
+ Qualifier: LATEST_PUBLISHED,
8705
+ FunctionScalingConfig: config ?? {}
8706
+ }));
8707
+ await this.waitForLatestPublishedSettled(target, log, "after");
8708
+ }
8600
8709
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
8601
8710
  const markUnsettled = (key) => context?.markUnsettled?.(key);
8602
8711
  properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
@@ -8605,7 +8714,17 @@ var LambdaFunctionProvider = class {
8605
8714
  log.debug(`Updating Lambda function ${logicalId}: ${log.value(physicalId)}`);
8606
8715
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
8607
8716
  refuseImageFunctionUnsupported(logicalId, resourceType, properties, physicalId);
8608
- try {
8717
+ refuseManagedInstancesPropertiesWithoutCapacityProvider(logicalId, resourceType, properties, {
8718
+ replayingState: context?.replayingState,
8719
+ physicalId
8720
+ }, log.warn);
8721
+ try {
8722
+ const desiredCapacity = properties["CapacityProviderConfig"];
8723
+ const recordedCapacity = previousProperties["CapacityProviderConfig"];
8724
+ const liveManaged = desiredCapacity !== void 0 || recordedCapacity !== void 0 ? (await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: physicalId }))).Configuration?.CapacityProviderConfig !== void 0 : false;
8725
+ if (liveManaged && desiredCapacity === void 0) throw markNonRetryable(new ProvisioningError(`Lambda function ${logicalId} cannot lose its CapacityProviderConfig: AWS does not support removing it from a function. Keep the property, or replace the function under a new logical id.`, resourceType, logicalId, physicalId));
8726
+ const capacityNeverApplied = !liveManaged && desiredCapacity !== void 0 && recordedCapacity !== void 0;
8727
+ if (capacityNeverApplied) log.warn(`Lambda function ${logicalId} is not a Managed Instances function on AWS, so its CapacityProviderConfig and FunctionScalingConfig are not applied. Replace the function to apply them.`);
8609
8728
  const configFields = [
8610
8729
  "Role",
8611
8730
  "Handler",
@@ -8624,10 +8743,14 @@ var LambdaFunctionProvider = class {
8624
8743
  "ImageConfig",
8625
8744
  "SnapStart",
8626
8745
  "LoggingConfig",
8627
- "DurableConfig"
8746
+ "DurableConfig",
8747
+ "CapacityProviderConfig"
8628
8748
  ];
8629
8749
  const changedConfigFields = [];
8630
- for (const field of configFields) if (JSON.stringify(properties[field]) !== JSON.stringify(previousProperties[field])) changedConfigFields.push(field);
8750
+ for (const field of configFields) {
8751
+ if (field === "CapacityProviderConfig" && capacityNeverApplied) continue;
8752
+ if (JSON.stringify(properties[field]) !== JSON.stringify(previousProperties[field])) changedConfigFields.push(field);
8753
+ }
8631
8754
  if (changedConfigFields.length > 0) {
8632
8755
  const configParams = {
8633
8756
  FunctionName: physicalId,
@@ -8648,7 +8771,8 @@ var LambdaFunctionProvider = class {
8648
8771
  ImageConfig: properties["ImageConfig"],
8649
8772
  SnapStart: properties["SnapStart"],
8650
8773
  LoggingConfig: properties["LoggingConfig"],
8651
- DurableConfig: properties["DurableConfig"]
8774
+ DurableConfig: properties["DurableConfig"],
8775
+ CapacityProviderConfig: capacityProviderConfigForUpdate(capacityNeverApplied ? void 0 : desiredCapacity)
8652
8776
  };
8653
8777
  for (const field of changedConfigFields) markUnsettled(field);
8654
8778
  await this.lambdaClient.send(new UpdateFunctionConfigurationCommand(configParams));
@@ -8724,6 +8848,31 @@ var LambdaFunctionProvider = class {
8724
8848
  await this.putRuntimeManagementConfig(physicalId, newRuntimeManagementConfig ?? { UpdateRuntimeOn: "Auto" });
8725
8849
  log.debug(`Updated RuntimeManagementConfig for Lambda function ${log.value(physicalId)} to ${JSON.stringify(maskDeep(newRuntimeManagementConfig ?? { UpdateRuntimeOn: "Auto" }, operationMask))}`);
8726
8850
  }
8851
+ if (liveManaged && desiredCapacity !== void 0) {
8852
+ const target = {
8853
+ logicalId,
8854
+ resourceType,
8855
+ functionName: physicalId
8856
+ };
8857
+ const newScaling = properties["FunctionScalingConfig"];
8858
+ const prevScaling = previousProperties["FunctionScalingConfig"];
8859
+ const applyScaling = newScaling?.MinExecutionEnvironments !== prevScaling?.MinExecutionEnvironments || newScaling?.MaxExecutionEnvironments !== prevScaling?.MaxExecutionEnvironments || context?.unsettledProperties?.has("FunctionScalingConfig") === true;
8860
+ if (properties["PublishToLatestPublished"] !== false) {
8861
+ await this.waitForLatestPublishedSettled(target, log, "before");
8862
+ await this.lambdaClient.send(new PublishVersionCommand({
8863
+ FunctionName: physicalId,
8864
+ Description: properties["Description"],
8865
+ PublishTo: "LATEST_PUBLISHED"
8866
+ }));
8867
+ await this.waitForLatestPublishedSettled(target, log, "after");
8868
+ log.debug(`Published ${LATEST_PUBLISHED} of ${log.value(physicalId)}`);
8869
+ }
8870
+ if (applyScaling) {
8871
+ markUnsettled("FunctionScalingConfig");
8872
+ await this.putFunctionScalingConfig(target, log, newScaling);
8873
+ log.debug(`Updated FunctionScalingConfig of ${log.value(physicalId)}`);
8874
+ }
8875
+ }
8727
8876
  const getResponse = await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: physicalId }));
8728
8877
  const functionArn = getResponse.Configuration?.FunctionArn;
8729
8878
  await this.applyTagDiff(functionArn, physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"], log, {
@@ -8787,6 +8936,32 @@ var LambdaFunctionProvider = class {
8787
8936
  throw stripped ? markDeleteStarted(failure) : failure;
8788
8937
  }
8789
8938
  if (hasVpcConfig) await this.cleanupLambdaEnis(physicalId, Date.now() + enclosingDeadlineRemainingMs() - this.eniDeadlineMarginMs);
8939
+ if (properties?.["CapacityProviderConfig"] !== void 0) await this.waitForFunctionGone({
8940
+ logicalId,
8941
+ resourceType,
8942
+ functionName: physicalId
8943
+ }, createMaskedLogSinks(this.logger, context?.maskSecrets));
8944
+ }
8945
+ async waitForFunctionGone(target, log) {
8946
+ const { logicalId, resourceType, functionName } = target;
8947
+ const deadline = Date.now() + Math.min(this.functionUpdateMaxWaitSeconds * 1e3, enclosingDeadlineRemainingMs() - this.latestPublishedDeadlineMarginMs);
8948
+ for (;;) {
8949
+ try {
8950
+ await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: functionName }));
8951
+ } catch (error) {
8952
+ if (error instanceof ResourceNotFoundException) return;
8953
+ const failure = describeAwsFailure(error);
8954
+ log.debug(log.mask(`Waiting for Lambda function ${logicalId} to go: ${failure.detail}`));
8955
+ log.warn(`Waiting for Lambda function ${logicalId} to go failed: ${failure.summary}`);
8956
+ return;
8957
+ }
8958
+ if (Date.now() >= deadline) {
8959
+ const stillDeleting = new ProvisioningError(`Lambda function ${logicalId} is still being deleted`, resourceType, logicalId, functionName);
8960
+ markDeleteStarted(stillDeleting);
8961
+ throw stillDeleting;
8962
+ }
8963
+ await new Promise((resolve) => setTimeout(resolve, this.latestPublishedPollMs));
8964
+ }
8790
8965
  }
8791
8966
  buildVpcConfig(raw) {
8792
8967
  if (raw === void 0 || raw === null) return;
@@ -9092,6 +9267,13 @@ var LambdaFunctionProvider = class {
9092
9267
  });
9093
9268
  }
9094
9269
  if (names.has("CodeSigningConfigArn")) set("CodeSigningConfigArn", (await strict(() => this.lambdaClient.send(new GetFunctionCodeSigningConfigCommand({ FunctionName: physicalId }))))?.CodeSigningConfigArn);
9270
+ if (names.has("FunctionScalingConfig")) {
9271
+ const r = await strict(() => this.lambdaClient.send(new GetFunctionScalingConfigCommand({
9272
+ FunctionName: physicalId,
9273
+ Qualifier: LATEST_PUBLISHED
9274
+ })));
9275
+ set("FunctionScalingConfig", r?.RequestedFunctionScalingConfig ?? r?.AppliedFunctionScalingConfig);
9276
+ }
9095
9277
  return out;
9096
9278
  }
9097
9279
  async unsettledInTransition(physicalId, _logicalId, _resourceType, names) {
@@ -9157,6 +9339,19 @@ var LambdaFunctionProvider = class {
9157
9339
  if (Object.keys(dc).length > 0) result["DurableConfig"] = dc;
9158
9340
  }
9159
9341
  if (cfg.TenancyConfig?.TenantIsolationMode !== void 0) result["TenancyConfig"] = { TenantIsolationMode: cfg.TenancyConfig.TenantIsolationMode };
9342
+ if (cfg.CapacityProviderConfig !== void 0) {
9343
+ result["CapacityProviderConfig"] = cfg.CapacityProviderConfig;
9344
+ try {
9345
+ const scaling = await this.lambdaClient.send(new GetFunctionScalingConfigCommand({
9346
+ FunctionName: physicalId,
9347
+ Qualifier: LATEST_PUBLISHED
9348
+ }));
9349
+ const live = scaling.RequestedFunctionScalingConfig ?? scaling.AppliedFunctionScalingConfig;
9350
+ if (live !== void 0) result["FunctionScalingConfig"] = live;
9351
+ } catch (scalingErr) {
9352
+ if (!(scalingErr instanceof ResourceNotFoundException)) this.logger.warn(safeMsg`GetFunctionScalingConfig failed for ${physicalId} — FunctionScalingConfig omitted from the drift snapshot (may surface as a false removal): ${describeAwsFailure(scalingErr).summary}`);
9353
+ }
9354
+ }
9160
9355
  result["Tags"] = normalizeAwsTagsToCfn(resp.Tags);
9161
9356
  try {
9162
9357
  const rlResp = await this.lambdaClient.send(new GetFunctionRecursionConfigCommand({ FunctionName: physicalId }));
@@ -9201,7 +9396,8 @@ var LambdaFunctionProvider = class {
9201
9396
  "Code.S3ObjectVersion",
9202
9397
  "Code.S3ObjectStorageMode",
9203
9398
  "Code.ZipFile",
9204
- "Code.SourceKMSKeyArn"
9399
+ "Code.SourceKMSKeyArn",
9400
+ "PublishToLatestPublished"
9205
9401
  ];
9206
9402
  }
9207
9403
  async import(input) {
@@ -54718,4 +54914,4 @@ var ACMCertificateProvider = class {
54718
54914
  };
54719
54915
 
54720
54916
  export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, DLMLifecyclePolicyProvider, DocDBProvider, DocDBSubnetGroupProvider, DynamoDBGlobalTableProvider, DynamoDBTableProvider, EC2Provider, ECRProvider, ECSProvider, EFSProvider, ELBv2Provider, EMRClusterProvider, EMRInstanceFleetConfigProvider, EMRInstanceGroupConfigProvider, ElastiCacheProvider, EventBridgeBusProvider, EventBridgeRuleProvider, FSxFileSystemProvider, FirehoseProvider, GlueConnectionProvider, GlueCrawlerProvider, GlueJobProvider, GlueProvider, GlueSecurityConfigurationProvider, GlueTriggerProvider, GlueWorkflowProvider, IAMAccessKeyProvider, IAMInstanceProfileProvider, IAMManagedPolicyProvider, IAMPolicyProvider, IAMRoleProvider, IAMUserGroupProvider, KMSProvider, KinesisStreamConsumerProvider, KinesisStreamProvider, LambdaEventInvokeConfigProvider, LambdaEventSourceMappingProvider, LambdaFunctionProvider, LambdaLayerVersionProvider, LambdaMicrovmImageProvider, LambdaNetworkConnectorProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaWebFunctionEndpointProvider, LambdaWebFunctionRevisionProvider, LogsLogGroupProvider, NeptuneProvider, NestedStackProvider, PipesPipeProvider, RDSDBProxyEndpointProvider, RDSDBProxyProvider, RDSDBProxyTargetGroupProvider, RDSProvider, Route53Provider, S3BucketPolicyProvider, S3BucketProvider, S3DirectoryBucketProvider, S3TablesProvider, S3VectorsProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, SNSTopicProvider, SQSQueuePolicyProvider, SQSQueueProvider, SSMParameterProvider, SchedulerScheduleProvider, SecretsManagerSecretProvider, ServiceDiscoveryProvider, StepFunctionsProvider, WAFv2WebACLProvider, WaitConditionHandleProvider };
54721
- //# sourceMappingURL=provider-classes-DGFOKPO9.js.map
54917
+ //# sourceMappingURL=provider-classes-CbiecOol.js.map