Skip to content
cdkd

Creates on a held key

What each SDK provider's create does when another record of the same stack already holds the key it writes (go-to-k/cdkd#7372), as after a construct is renamed: its new logical id is created before the old one is deleted. An adopts-same-id or upserts-other-id row names the guard that keeps the delete of either record from removing what the other describes. Its last column says what CloudFormation does when the key is held by an object OUTSIDE the stack (go-to-k/cdkd#7433); where it refuses, so does cdkd.

152 types: 86 refuses, 23 adopts-same-id, 6 upserts-other-id, 37 unique.

Type On a held key What the create does Guard Held outside the stack
AWS::ApiGateway::Account adopts-same-id UpdateAccount overwrites the one account setting; fixed id ApiGatewayAccount #7322: its delete sends nothing, so no record removes the shared object cfn-adopts: a region singleton every stack writes; CloudFormation updates it in place too (#7322)
AWS::ApiGateway::Authorizer unique an AWS-minted id per create
AWS::ApiGateway::Deployment unique an AWS-minted id per create
AWS::ApiGateway::Method refuses PutMethod answers ConflictException for a method the resource has
AWS::ApiGateway::Resource refuses CreateResource answers ConflictException for a path part the parent has
AWS::ApiGateway::RestApi unique an AWS-minted id per create
AWS::ApiGateway::Stage refuses CreateStage: a key its parent already holds is refused (conflict)
AWS::ApiGatewayV2::Api unique an AWS-minted id per create
AWS::ApiGatewayV2::Authorizer unique an AWS-minted id per create
AWS::ApiGatewayV2::Integration unique an AWS-minted id per create
AWS::ApiGatewayV2::Route refuses CreateRoute: a key its parent already holds is refused (conflict) (route key)
AWS::ApiGatewayV2::Stage refuses CreateStage: a key its parent already holds is refused (conflict)
AWS::AppConfig::Environment unique an AWS-minted id per create
AWS::AppSync::ApiKey unique an AWS-minted id per create
AWS::AppSync::DataSource refuses CreateDataSource: a key its parent already holds is refused (conflict) (name)
AWS::AppSync::GraphQLApi unique an AWS-minted id per create
AWS::AppSync::GraphQLSchema adopts-same-id StartSchemaCreation replaces the one schema of the API; the id is the API id schema deleted with its API: its delete sends nothing, so no record removes the shared object cfn-adopts: StartSchemaCreation replaces the API's schema under both (measured, A/B comments on #7433)
AWS::AppSync::Resolver refuses CreateResolver: a key its parent already holds is refused (conflict) (type and field)
AWS::AutoScaling::AutoScalingGroup refuses CreateAutoScalingGroup: a taken name is refused (already-exists)
AWS::BedrockAgentCore::Browser adopts-same-id reads the AWS-managed default browser; nothing is created AWS-managed default: its delete sends nothing, so no record removes the shared object no-outside-holder: reads the AWS-managed default; nothing is created or deleted
AWS::BedrockAgentCore::CodeInterpreter adopts-same-id reads the AWS-managed default code interpreter; nothing is created AWS-managed default: its delete sends nothing, so no record removes the shared object no-outside-holder: reads the AWS-managed default; nothing is created or deleted
AWS::BedrockAgentCore::Evaluator refuses CreateEvaluator: a taken name is refused (already-exists) (ConflictException, SDK model)
AWS::BedrockAgentCore::Runtime refuses CreateAgentRuntime: a taken name is refused (ConflictException); a template-declared ClientToken reused inside the service idempotency window is answered with the runtime it made, as CloudFormation sends it too
AWS::Budgets::Budget refuses CreateBudget: a taken name is refused (already-exists) (DuplicateRecordException)
AWS::CertificateManager::Certificate unique an AWS-minted id per create (the idempotency token is per create)
AWS::CloudFormation::Stack unique a cdkd child stack keyed on the parent and the logical id
AWS::CloudFormation::WaitCondition unique a cdkd id with a random part per create
AWS::CloudFormation::WaitConditionHandle unique a signal URL with a random key per create
AWS::CloudFront::CloudFrontOriginAccessIdentity unique an AWS-minted id per create (a fresh CallerReference)
AWS::CloudFront::Distribution unique an AWS-minted id per create (a fresh CallerReference); a taken alias is refused
AWS::CloudFront::OriginAccessControl refuses CreateOriginAccessControl: a taken name is refused (already-exists)
AWS::CloudTrail::Trail refuses CreateTrail: a taken name is refused (already-exists)
AWS::CloudWatch::Alarm adopts-same-id PutMetricAlarm overwrites the alarm of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::CloudWatch::AnomalyDetector adopts-same-id PutAnomalyDetector upserts the model of a metric descriptor, which the id encodes (measured) delete asks the surviving records (src/provisioning/providers/cloudwatch-anomaly-detector-provider.ts) cfn-adopts: PutAnomalyDetector upserts under both, and both deletes remove it (measured on #7432)
AWS::CodeBuild::Project refuses CreateProject: a taken name is refused (already-exists)
AWS::CodeCommit::Repository refuses CreateRepository: a taken name is refused (already-exists)
AWS::Cognito::UserPool unique an AWS-minted id per create
AWS::Connect::Instance unique an AWS-minted id per create; a taken InstanceAlias is refused
AWS::DLM::LifecyclePolicy unique an AWS-minted id per create; a second default policy of a resource type is refused
AWS::DocDB::DBCluster refuses CreateDBCluster: a taken name is refused (already-exists)
AWS::DocDB::DBInstance refuses CreateDBInstance: a taken name is refused (already-exists)
AWS::DocDB::DBSubnetGroup refuses CreateDBSubnetGroup: a taken name is refused (already-exists)
AWS::DynamoDB::GlobalTable refuses CreateTable: a taken name is refused (already-exists) (ResourceInUseException)
AWS::DynamoDB::Table refuses CreateTable: a taken name is refused (already-exists) (ResourceInUseException)
AWS::EC2::EIP unique an AWS-minted id per create
AWS::EC2::Instance unique an AWS-minted id per create
AWS::EC2::InternetGateway unique an AWS-minted id per create
AWS::EC2::NatGateway unique an AWS-minted id per create
AWS::EC2::NetworkAcl unique an AWS-minted id per create
AWS::EC2::NetworkAclEntry refuses CreateNetworkAclEntry refuses a rule number the ACL has
AWS::EC2::Route refuses CreateRoute answers RouteAlreadyExists
AWS::EC2::RouteTable unique an AWS-minted id per create
AWS::EC2::SecurityGroup refuses CreateSecurityGroup: a taken name is refused (already-exists) (InvalidGroup.Duplicate); a generated name carries the logical id
AWS::EC2::SecurityGroupIngress adopts-same-id an identical rule is shared: the create meets InvalidPermission.Duplicate and adopts the rule a stack record holds #4492: its delete leaves a rule a surviving record of the stack holds cfn-refuses: a duplicate rule is InvalidPermission.Duplicate; cdkd takes one back only on its own evidence (#4355, #4492)
AWS::EC2::Subnet refuses CreateSubnet refuses an overlapping CIDR (InvalidSubnet.Conflict)
AWS::EC2::SubnetNetworkAclAssociation upserts-other-id ReplaceNetworkAclAssociation moves the subnet whatever association it is on, and mints a new association id delete asks the surviving records (src/provisioning/providers/ec2/network-acl.ts) cfn-refuses: a subnet on a non-default network ACL refuses with AlreadyExists (measured, A/B comments on #7433)
AWS::EC2::SubnetRouteTableAssociation refuses AssociateRouteTable answers Resource.AlreadyAssociated
AWS::EC2::VPC unique an AWS-minted id per create
AWS::EC2::VPCEndpoint unique an AWS-minted id per create
AWS::EC2::VPCGatewayAttachment adopts-same-id AttachVpnGateway succeeds on a gateway attached to the same VPC (measured); AttachInternetGateway answers Resource.AlreadyAssociated (measured) delete asks the surviving records (src/provisioning/providers/ec2/gateway-attachment.ts) aws-refuses: AttachInternetGateway refuses a gateway already attached (measured, A/B comments on #7433)
AWS::EC2::VPNGatewayRoutePropagation upserts-other-id EnableVgwRoutePropagation succeeds on a table already propagating the gateway (measured) delete asks the surviving records (src/provisioning/providers/ec2-vpn-gateway-route-propagation-provider.ts) cfn-adopts: EnableVgwRoutePropagation succeeds on a propagation already enabled under both (measured, A/B comments on #7433)
AWS::ECR::Repository refuses CreateRepository: a taken name is refused (already-exists)
AWS::ECS::Cluster adopts-same-id CreateCluster hands back the cluster of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::ECS::Service adopts-same-id CreateService with identical parameters hands back the ACTIVE service of that name delete asks the surviving records (src/provisioning/providers/ecs/service-delete.ts) aws-refuses: CreateService refuses a service name the cluster holds, even with identical settings (AWS refusal measured live, comment on #7433)
AWS::ECS::TaskDefinition unique RegisterTaskDefinition mints a new revision
AWS::EFS::AccessPoint unique an AWS-minted id per create (the client token carries the logical id)
AWS::EFS::FileSystem unique an AWS-minted id per create (the creation token carries the logical id)
AWS::EFS::MountTarget refuses CreateMountTarget answers MountTargetConflict for an AZ the file system has one in
AWS::ElastiCache::CacheCluster refuses CreateCacheCluster: a taken name is refused (already-exists)
AWS::ElastiCache::SubnetGroup refuses CreateCacheSubnetGroup: a taken name is refused (already-exists)
AWS::ElasticLoadBalancingV2::Listener adopts-same-id CreateListener with identical settings hands back the listener on the port; other settings answer DuplicateListener delete asks the surviving records (src/provisioning/providers/elbv2/listener.ts) cfn-refuses: an identical listener on the port refuses with AlreadyExists (measured, A/B comments on #7433)
AWS::ElasticLoadBalancingV2::ListenerCertificate upserts-other-id AddListenerCertificates succeeds on a certificate the listener holds delete asks the surviving records (src/provisioning/providers/elbv2-listener-certificate-provider.ts) cfn-adopts: AddListenerCertificates succeeds on a certificate already added, and both deletes remove it (measured, A/B comments on #7433)
AWS::ElasticLoadBalancingV2::LoadBalancer adopts-same-id CreateLoadBalancer with identical settings hands back the load balancer of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::ElasticLoadBalancingV2::TargetGroup adopts-same-id CreateTargetGroup with identical settings hands back the target group of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::EMR::Cluster unique an AWS-minted id per create
AWS::EMR::InstanceFleetConfig refuses AddInstanceFleet refuses a second fleet of a type
AWS::EMR::InstanceGroupConfig refuses AddInstanceGroups refuses a second MASTER / CORE group; a TASK group is new each time
AWS::Events::Archive refuses CreateArchive: a taken name is refused (already-exists)
AWS::Events::EventBus refuses CreateEventBus: a taken name is refused (already-exists)
AWS::Events::Rule adopts-same-id PutRule overwrites the rule of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::FSx::FileSystem unique an AWS-minted id per create (the client token carries the logical id)
AWS::GameLift::GameServerGroup refuses CreateGameServerGroup: a taken name is refused (already-exists) (ConflictException)
AWS::Glue::Connection refuses CreateConnection: a taken name is refused (already-exists)
AWS::Glue::Crawler refuses CreateCrawler: a taken name is refused (already-exists)
AWS::Glue::Database refuses CreateDatabase: a taken name is refused (already-exists)
AWS::Glue::Job refuses CreateJob: a taken name is refused (already-exists)
AWS::Glue::SecurityConfiguration refuses CreateSecurityConfiguration: a taken name is refused (already-exists)
AWS::Glue::Table refuses CreateTable: a taken name is refused (already-exists)
AWS::Glue::Trigger refuses CreateTrigger: a taken name is refused (already-exists)
AWS::Glue::Workflow refuses CreateWorkflow: a taken name is refused (already-exists)
AWS::IAM::AccessKey unique an AWS-minted id per create
AWS::IAM::Group refuses CreateGroup: a taken name is refused (already-exists) (EntityAlreadyExists)
AWS::IAM::InstanceProfile refuses CreateInstanceProfile: a taken name is refused (already-exists) (EntityAlreadyExists)
AWS::IAM::ManagedPolicy refuses CreatePolicy: a taken name is refused (already-exists) (EntityAlreadyExists)
AWS::IAM::Policy adopts-same-id Put*Policy overwrites an inline policy of an explicit name on a shared principal #4156: its delete keeps a policy name another resource of the deploy has written cfn-refuses: a principal holding the inline policy name refuses ("The policy X already exists on the role Y", measured on #7432)
AWS::IAM::Role refuses CreateRole: a taken name is refused (already-exists) (EntityAlreadyExists)
AWS::IAM::User refuses CreateUser: a taken name is refused (already-exists) (EntityAlreadyExists)
AWS::IAM::UserToGroupAddition upserts-other-id AddUserToGroup succeeds for a member of the group (measured); the id is the logical id delete asks the surviving records (src/provisioning/providers/iam-user-group/user-to-group-addition.ts) cfn-adopts: AddUserToGroup succeeds on a member, and both deletes remove it (measured, A/B comments on #7433)
AWS::Kinesis::Stream refuses CreateStream: a taken name is refused (already-exists) (ResourceInUseException)
AWS::Kinesis::StreamConsumer refuses RegisterStreamConsumer: a taken name is refused (already-exists) (ResourceInUseException)
AWS::KinesisFirehose::DeliveryStream refuses CreateDeliveryStream: a taken name is refused (already-exists) (ResourceInUseException)
AWS::KMS::Alias refuses CreateAlias: a taken name is refused (already-exists)
AWS::KMS::Key unique an AWS-minted id per create
AWS::Lambda::EventInvokeConfig adopts-same-id PutFunctionEventInvokeConfig upserts the configuration of a function + qualifier, which the id names delete asks the surviving records (src/provisioning/providers/lambda-event-invoke-config-provider.ts) cfn-adopts: PutFunctionEventInvokeConfig upserts under both, and both deletes remove it (measured on #7432)
AWS::Lambda::EventSourceMapping refuses an AWS-minted id per create; a second mapping of one source and function is refused (ResourceConflictException)
AWS::Lambda::Function refuses CreateFunction: a taken name is refused (already-exists) (ResourceConflictException)
AWS::Lambda::LayerVersion unique PublishLayerVersion mints a new version
AWS::Lambda::MicrovmImage refuses CreateMicrovmImage: a taken name is refused (already-exists) (ConflictException, SDK model)
AWS::Lambda::NetworkConnector refuses CreateNetworkConnector: a taken name is refused (already-exists) (conflict)
AWS::Lambda::Permission unique the statement id carries the logical id
AWS::Lambda::Url refuses CreateFunctionUrlConfig refuses a function that has one (ResourceConflictException)
AWS::Lambda::WebFunctionEndpoint refuses CreateWebFunctionEndpoint: a key its parent already holds is refused (conflict) (ConflictException, SDK model)
AWS::Lambda::WebFunctionRevision unique CreateWebFunctionRevision mints a new revision
AWS::Lightsail::Alarm adopts-same-id PutAlarm overwrites the alarm of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::Logs::Delivery refuses CreateDelivery refuses a source and destination pair that has one (ConflictException)
AWS::Logs::DeliveryDestination refuses PutDeliveryDestination would upsert, so cdkd reads the name first and refuses a taken one refuseExisting: its create refuses a name any resource holds
AWS::Logs::DeliverySource refuses PutDeliverySource would upsert, so cdkd reads the name first and refuses a taken one refuseExisting: its create refuses a name any resource holds
AWS::Logs::LogGroup adopts-same-id CreateLogGroup refuses a taken name itself (#6655); kept in the set for the create-time question an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::Neptune::DBCluster refuses CreateDBCluster: a taken name is refused (already-exists)
AWS::Neptune::DBInstance refuses CreateDBInstance: a taken name is refused (already-exists)
AWS::Neptune::DBSubnetGroup refuses CreateDBSubnetGroup: a taken name is refused (already-exists)
AWS::Pipes::Pipe refuses CreatePipe: a taken name is refused (already-exists) (ConflictException)
AWS::RDS::DBCluster refuses CreateDBCluster: a taken name is refused (already-exists)
AWS::RDS::DBInstance refuses CreateDBInstance: a taken name is refused (already-exists)
AWS::RDS::DBProxy refuses CreateDBProxy: a taken name is refused (already-exists)
AWS::RDS::DBProxyEndpoint refuses CreateDBProxyEndpoint: a taken name is refused (already-exists)
AWS::RDS::DBProxyTargetGroup refuses RegisterDBProxyTargets refuses a target the proxy has (DBProxyTargetAlreadyRegisteredFault, SDK model); a group declaring no target registers and deregisters nothing
AWS::RDS::DBSubnetGroup refuses CreateDBSubnetGroup: a taken name is refused (already-exists)
AWS::Route53::HostedZone unique an AWS-minted id per create (the CallerReference carries the logical id)
AWS::Route53::RecordSet refuses ChangeResourceRecordSets CREATE refuses a record that exists
AWS::Route53::RecordSetGroup refuses ChangeResourceRecordSets CREATE refuses a record that exists
AWS::S3::Bucket adopts-same-id CreateBucket answers BucketAlreadyOwnedByYou for a bucket of this account an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::S3::BucketPolicy refuses another record holding the bucket policy is refused before PutBucketPolicy #6109: its create refuses a bucket whose policy another record holds
AWS::S3Express::DirectoryBucket refuses CreateBucket: a taken name is refused (already-exists)
AWS::S3Tables::Namespace refuses CreateNamespace: a key its parent already holds is refused (conflict)
AWS::S3Tables::Table refuses CreateTable: a key its parent already holds is refused (conflict)
AWS::S3Tables::TableBucket refuses CreateTableBucket: a taken name is refused (already-exists)
AWS::S3Vectors::VectorBucket refuses CreateVectorBucket: a taken name is refused (already-exists)
AWS::Scheduler::Schedule refuses CreateSchedule: a taken name is refused (already-exists) (ConflictException)
AWS::SecretsManager::Secret refuses CreateSecret: a taken name is refused (already-exists) (ResourceExistsException)
AWS::ServiceDiscovery::HttpNamespace refuses CreateHttpNamespace: a taken name is refused (already-exists)
AWS::ServiceDiscovery::PrivateDnsNamespace refuses CreatePrivateDnsNamespace: a taken name is refused (already-exists)
AWS::ServiceDiscovery::PublicDnsNamespace refuses CreatePublicDnsNamespace: a taken name is refused (already-exists)
AWS::ServiceDiscovery::Service refuses CreateService: a taken name is refused (already-exists) in the namespace
AWS::SNS::Subscription adopts-same-id Subscribe hands back the subscription of a topic + endpoint (#7371) delete asks the surviving records (src/provisioning/providers/sns-subscription-provider.ts) cfn-adopts: Subscribe hands back the existing subscription under both, and both deletes unsubscribe it (measured, A/B comments on #7433)
AWS::SNS::Topic adopts-same-id CreateTopic hands back the topic of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::SNS::TopicPolicy upserts-other-id SetTopicAttributes overwrites the one policy of each topic (#7371) delete asks the surviving records (src/provisioning/providers/sns-topic-policy-provider.ts) cfn-adopts: SetTopicAttributes overwrites the policy under both (measured, A/B comments on #7433)
AWS::SQS::Queue adopts-same-id CreateQueue hands back the queue of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::SQS::QueuePolicy upserts-other-id SetQueueAttributes overwrites the one policy of each queue (#7371) delete asks the surviving records (src/provisioning/providers/sqs-queue-policy-provider.ts) cfn-adopts: SetQueueAttributes overwrites the policy under both (measured, A/B comments on #7433)
AWS::SSM::Parameter refuses PutParameter with Overwrite false answers ParameterAlreadyExists
AWS::StepFunctions::StateMachine adopts-same-id CreateStateMachine hands back an identical state machine of that name an explicit name any resource holds is refused before the create (#4180) cfn-refuses: an explicit name any resource holds is refused (#4180); a generated name carries the stack instance id (#5064)
AWS::WAFv2::WebACL refuses CreateWebACL: a taken name is refused (already-exists) (WAFDuplicateItemException)

Cloud Control types measured

Outside the population above (no SDK provider). A Cloud Control delete leaves a record whose identifier another surviving Cloud Control record of the type carries. A Cloud Control-routed AWS::SNS::Subscription leaves an ARN a surviving record of either route carries (#7394). AWS::SQS::QueuePolicy and AWS::SNS::TopicPolicy are NON_PROVISIONABLE: no record of theirs is on the Cloud Control route.

Type On a held key What the create does
AWS::EC2::VPCDHCPOptionsAssociation adopts-same-id the create answers SUCCESS with the held identifier, and a delete puts the VPC back on the default options (measured)
AWS::EC2::EIPAssociation refuses the create answers AlreadyExists for an address already associated (measured)
AWS::ECS::ClusterCapacityProviderAssociations refuses the create answers AlreadyExists for a cluster that has associations (measured)
AWS::Logs::ResourcePolicy refuses the create answers AlreadyExists for a taken PolicyName (measured)

Last updated: