Skip to content

Importing Existing Resources

Open in ChatGPTOpen in Claude

Not every resource is new. axs add import authors a config entry that points at a resource that already exists in your AWS account, in the same array the matching construct already reads.

  • Reference (default) — points at the resource via fromXxxArn. Axis creates nothing and never mutates it.
  • --adopt — writes importManaged: true, emitting a framework-default resource you then claim with cdk import. It succeeds cleanly only when the resource’s physical name matches the ${baseName}-${stageName} derivation. key (KMS) is reference-only.
Terminal window
# Reference an existing bucket by ARN — Axis creates nothing
axs add import bucket shared-logs arn:aws:s3:::shared-logs
# Adopt an existing queue under stack management, then `cdk import` to claim it
axs add import queue jobs arn:aws:sqs:us-east-1:123456789012:jobs --adopt

bucket (S3) · queue (SQS) · topic (SNS) · secret (Secrets Manager) · key (KMS). The entry lands in config/<domain>/index.ts and the domain’s feature is turned on if it was off. Re-running the same import is a no-op (No changes.); a different ARN under the same name is refused.

Use raw CDK — Xxx.fromArn(...) in your own bin/app.ts or a custom stack — which Axis never blocks. See Add Your Own Stack.

© 2026 Axis Tech. Powered by axis-tech.co.