Your cloud (BYOC)

Connect AWS and create a setup

The checklist, the access stack, the errors you can see and the fix for each, before and while you connect an AWS account.

Deployment
BYOC

An owner, admin or Technical administrator connects one AWS account by creating a DiakrinAccess-<id> CloudFormation stack with an AWS administrator's help, then creates a setup on it; this page lists what the account must have first and what to do when a step stops.

Before you start

You supplyExampleComes from
The 12-digit AWS account ID123456789012AWS console, top right
An AWS person who can create CloudFormation stacks and named IAM roles and policiesAn AWS administratorAWS IAM. Diakrin does not check this beforehand
A home region for the access stackus-east-1You choose it on the Connect page. It only holds Diakrin's access stack
A choice on Show actual AWS costOn or offConnect page. Default on
A Diakrin role that can manage infrastructureOwner, admin or Technical administratorSettings → Members
A region for the setupeu-west-1One of the regions the New setup page offers (see Region)
A monthly budget ceiling for the setup300 US dollarsAn owner or admin saves it. A Technical administrator cannot

Checklist

Each row has its own section. Not checked means Diakrin does not read it; it can only show up as a failed step.

#PrerequisiteNeeded forWho checks it today
1Connection is verified (the access stack exists and matches)ConnectAWS itself, then Diakrin's check of the stack
2Access version is currentConnect and setupDiakrin, before anything is created
3No policy blocks Diakrin's rolesConnect and setupNot checked
4RegionSetupThe console and the server
5NetworkSetupThe console and the server
6Service quotasSetupNot checked
7Service-linked rolesSetupDiakrin creates them
8Budget ceiling and priceSetupDiakrin, before anything is created
9App address (nothing to provide)SetupDiakrin

Connection is verified

What: Cloud → Accounts → Connect AWS opens CloudFormation in the home region with the stack name DiakrinAccess-<id> (the first 8 characters of the connection ID) and every value filled in. The template creates three IAM roles and eleven managed policies and nothing else. The person who opens it must be signed in to the same AWS account, tick I acknowledge that AWS CloudFormation might create IAM resources, and choose Create stack. There is one stack per connection, not one per account.

How to check that the signed-in AWS identity belongs to the right account:

sh
aws sts get-caller-identity --query Account --output text

You should see the 12-digit ID you entered on the Connect page.

After you create the stack, the Connect page checks it by itself every 15 seconds while it is open, for up to 60 minutes; Check now checks at once. Diakrin also keeps checking for 60 minutes when the page is closed. The check reads the stack, the template bytes, each role's trust, each policy and the roles' identities; it never changes anything in your account.

If it fails: see the table at the end of this page.

Access update

What: the current access version is 1.1.1. A setup needs 1.1.0 or later; versions before 1.1.0 are retired. Version 1.1.0 cannot create new CloudFormation stacks, so choose the update when the account shows Update available; Diakrin does not force it today.

How to check: open Cloud → Accounts. A connection with a newer version shows "Version 1.1.1 of the access stack is available. Your current version keeps working until you update."

If it is retired: creating a setup answers ACCOUNT_ACCESS_UPGRADE_REQUIRED: "Open Cloud → Accounts, install and verify the new AWS access stack, then retry this setup." Retired stacks are not updated in place; you install the new per-connection stack beside the old one. For a current stack, choose Update in AWS: it opens a CloudFormation update with the saved values, you review the change set in AWS, and Diakrin makes no change itself.

Organization policies

What: Diakrin's roles and every role it creates must be allowed by your AWS Organizations service control policies (SCPs) and your IAM permissions boundaries. Diakrin does not read your SCPs. A policy that denies creating IAM roles or policies named DiakrinAccess-*, or any action in the access roles' permissions, shows up as a failed stack or as ACCESS_DENIED on a resource, with the denied AWS action named.

Two things Diakrin does check:

  • The three access roles must have no permissions boundary. If an organization adds one, verification fails with ACCOUNT_ACCESS_TRUST_MISMATCH.
  • The roles must be exactly as the template defines them. Anyone who edits a trust policy or attached policy gets ACCOUNT_ACCESS_TRUST_MISMATCH or ACCOUNT_ACCESS_POLICY_MISMATCH.

To compare your policies with what Diakrin needs, review the permissions Diakrin lists on the Connect page before you open AWS. It lists every role, every policy and what Diakrin can never do, and links the raw template.

If it fails: ask the owner of the SCP to allow the named action, or exempt the DiakrinAccess-* roles, then choose Update in AWS or try the setup again.

Region

The access stack's home region is yours to choose; the Connect page offers 34 commercial aws-partition regions.

A setup region is narrower: the New setup page offers only the regions the loaded release prices. Every reviewed release in the repository prices the same 17 regions: ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, eu-central-1, eu-north-1, eu-west-1, eu-west-2, eu-west-3, sa-east-1, us-east-1, us-east-2, us-west-1 and us-west-2. These are the regions AWS enables by default; an opt-in region such as ap-east-1, me-south-1, af-south-1 or eu-south-1 cannot host a setup today. Diakrin does not check whether a region is enabled in your account.

If you pick a region the release does not price, the answer is REGION_NOT_SUPPORTED_IN_RELEASE: "Diakrin's current release has no reviewed AWS prices for this region yet. Choose a region from the offered list." Reviewed prices expire after 30 days; an expired price blocks the app address with GATEWAY_COST_REVIEW_REQUIRED, so ask your Diakrin contact.

The region of a setup is fixed once its foundation exists. CloudFront certificates always live in us-east-1, whatever the setup region.

Network

What: in Review you choose where the setup's network lives.

ChoiceWhat Diakrin does
Existing VPC (default)Uses your VPC. It needs at least two private subnets in different Availability Zones. A subnet is private only if its route table has no internet gateway route and it does not assign public addresses. Diakrin creates no subnets, routes or endpoints; it adds this setup's own security groups, database, internal load balancer and image registry
Create a new VPC for this setupCreates a private VPC with two private subnets and five endpoints. It creates no NAT gateway and no internet gateway of its own for the foundation

Diakrin lists the VPCs in the account and region and preselects the only eligible one. The default VPC rarely qualifies because its subnets are public.

Outbound access: apps pull images and read secrets over HTTPS. Your private subnets need either a default route (NAT gateway or equivalent) or all five endpoints (ecr.api, ecr.dkr, logs, secretsmanager and S3). Diakrin warns when it finds neither and does not block creation.

Internet gateway: apps are published through CloudFront, which needs an internet gateway on the VPC. Diakrin looks for the one your route tables already use and passes it to the setup stack for you; nothing is entered by hand. If your VPC has a gateway attached that no route table uses, Diakrin cannot see it, tries to attach a second one, AWS refuses, and the stack rolls back. Fix: give one of the VPC's route tables a route through that gateway, then try again.

The network is fixed once the setup exists. Refusals you can see:

CodeText
EXISTING_VPC_UNAVAILABLEThe chosen VPC is not available in this AWS account and region.
EXISTING_SUBNET_NOT_PRIVATEA chosen subnet routes to an internet gateway or assigns public addresses. Choose private subnets.
INVALID_DATABASE_SUBNET_ZONESChoose two private subnets in different Availability Zones.
NETWORK_IMMUTABLEA setup's network cannot change after its foundation exists.

Quotas

What: a setup creates an RDS PostgreSQL instance, an ECS cluster, an internal load balancer, a registry, a KMS key, a bucket and a log group. The app address adds a CloudFront distribution, a Lambda relay, an ECS service and a VPC endpoint. Diakrin does not read your quotas first. One quota failure is recognized after the fact: a brand-new account's Lambda concurrency quota is 10, which is too low for the gateway relay, so the gateway stack rolls back (GATEWAY_LAMBDA_CONCURRENCY_QUOTA) and the setup shows the gateway as not taking traffic. There is no dedicated message for it yet.

How to check, for the Lambda case: in the AWS console open Service Quotas → AWS services → AWS Lambda → Concurrent executions in the setup region. A value of 10 is the new-account default; request an increase before you create the setup.

Service-linked roles

Diakrin creates the ECS, Elastic Load Balancing and RDS service-linked roles itself, immediately before it creates each setup foundation, and never deletes them. If a stack event still reports a missing role, run the command the setup shows, for example:

sh
aws iam create-service-linked-role --aws-service-name ecs.amazonaws.com

You should see a role named AWSServiceRoleForECS. The other two services are elasticloadbalancing.amazonaws.com and rds.amazonaws.com. Then try the setup again. The CloudFront service-linked roles are created through the setup's Execution role.

Budget ceiling and price

What: the ceiling is the most Diakrin will approve for the shared foundation's estimated monthly cost. It is not an AWS billing cap.

  • A current owner or admin must save the ceiling; a Technical administrator cannot (FOUNDATION_BUDGET_REVIEW_REQUIRED).
  • Only seven-day database backups are priced; a longer retention answers COST_VERIFICATION_REQUIRED.
  • A known estimate above the ceiling blocks creation (FOUNDATION_BUDGET_EXCEEDED: "Approval cannot override this hard limit."). An unknown estimate does not block, and is never shown as zero.
  • The quote must be less than 15 minutes old; Create re-reads it.

App address

What: you provide no DNS and no certificate. Each setup gets its own address, <app>.<label>.p.diakrin.dev. Diakrin owns p.diakrin.dev and writes only one NS record there. In your account it creates a Route 53 public hosted zone for <label>.p.diakrin.dev (with a CAA record that allows only Amazon), an ACM wildcard certificate in us-east-1, and the CloudFront distribution. See App addresses and company domains.

Your own company domain on a setup is planned: the Connect a domain button answers "Available soon. This setup is updating automatically; nothing to do." today.

Connect, step by step

  1. Open Cloud → Accounts and choose Connect AWS.
  2. Enter the 12-digit account ID, choose the home region, choose whether to show actual AWS cost, and review the permissions Diakrin lists.
  3. Choose Open AWS. CloudFormation opens with the stack DiakrinAccess-<id> filled in.
  1. Choose Create stack. Leave every other field as it is. It takes 2 to 4 minutes.
  2. Return to Diakrin. The account turns Connected by itself.
  3. Open Cloud → Setups → New setup, choose the account, choose the region, a size (Starter or Resilient) and a ceiling, then follow Set up your company cloud.

To remove Diakrin's access, delete the DiakrinAccess-<id> stack in CloudFormation. Removing the account in the console is "coming soon"; deleting the connection in Diakrin never touches your stack.

What Diakrin asks for and why

Diakrin holds no long-lived AWS keys. It assumes roles in your account with an external ID.

RoleWho may assume itUsed for
ReaderDiakrin's reader role, with the external IDRead-only inventory and metrics; read of the cost export bucket when you allow cost
ControllerDiakrin's control role, with the external IDStarting reviewed change sets and builds, writing CNAME, A and AAAA DNS records, requesting tagged certificates. It cannot create resources itself
ExecutionOnly cloudformation.amazonaws.com, from your accountThe identity CloudFormation uses to create and change Diakrin's resources. Diakrin cannot assume it

What Diakrin never does:

  • It never creates IAM users or access keys.
  • It never changes the DiakrinAccess-* stack, roles or policies: an explicit deny blocks any write to them, so only you can edit your own access.
  • It never changes resources that do not carry the diakrin:managed and diakrin:connection tags it set, except where AWS cannot tag-fence an action (CloudFront, ACM, task definitions and a few others, which are limited by name instead).
  • It never reads secrets outside diakrin/*, or buckets outside diakrin-*.
  • It never touches AWS Organizations or CloudTrail.
  • Every role it creates is capped by a permissions boundary that also denies assuming roles outside your account.

With Show actual AWS cost, the Reader reads a cost export in a bucket named cur-export-<account id>, which needs a separate DiakrinCostExport stack in us-east-1. The console does not offer a link for that stack yet, so actual cost may show as unavailable until it does.

If it fails

SymptomCauseFix
"Diakrin can't find the stack yet" (ACCOUNT_ACCESS_NOT_FOUND)Stack not created, created in another region or account, or deletingOpen AWS again from the Connect page and create it in the home region
After 3 minutes: "Did AWS show an error?"The stack rolled backOpen the stack's Events in AWS; delete a rolled-back stack, then open AWS again
"AWS couldn't finish the stack and rolled it back" (ACCOUNT_ACCESS_STACK_FAILED)Usually a person without IAM permissions, a name clash, or an SCPDelete the failed stack, fix the permission, try again
"The stack is in a different AWS account" (ACCOUNT_ACCESS_WRONG_ACCOUNT)Signed in to another accountSign in to the account you entered, open AWS again
"The stack in AWS isn't the template Diakrin gave you" (ACCOUNT_ACCESS_TEMPLATE_MISMATCH)Template or parameters were changedChoose Update in AWS
"A role in AWS trusts something other than Diakrin" (ACCOUNT_ACCESS_TRUST_MISMATCH)Trust edited, a permissions boundary added, or a role deleted and recreatedChoose Update in AWS; a recreated role may need a new connection
"A role in AWS has permissions that differ from the template" (ACCOUNT_ACCESS_POLICY_MISMATCH)A policy or attachment was editedChoose Update in AWS
ACCOUNT_ACCESS_UPGRADE_REQUIREDAccess version before 1.1.0Install the new per-connection stack and verify
"AWS could not be reached. Nothing was changed; try again." (CLOUD_UNAVAILABLE)AWS error on Diakrin's side of the callTry again; the connection is not marked invalid
"A setup still uses this account. Archive its setups first." (CLOUD_ACCOUNT_IN_USE)Changing the home region or removing an account that setups useArchive the setups first
Setup: CONNECTION_VERIFICATION_REQUIREDThe 15-minute connection proof expired or is staleChoose Create again; it re-verifies
Setup: FOUNDATION_EXISTSA foundation with that identity already existsAn existing foundation cannot be imported or adopted; use a new setup
Setup stack failed with ACCESS_DENIED and an action nameA policy denies that actionSee Organization policies
Setup stack failed with SERVICE_LINKED_ROLE_NOT_READYThe service-linked role was not visible yetRun the command in Service-linked roles
Setup runtime stack rolled back, VPC reusedAn unrouted internet gateway is attachedSee Network
Update link says "The AWS stack is already up to date."UPDATE_NOT_NEEDEDNothing to update
After connect, "Setups keep running" but the account shows an errorThe stack or roles are goneCreate the stack again to restore it

Next

Continue to Set up your company cloud to create the setup, or compare with Connect Google Cloud and create a setup.

Next stepConnect Google Cloud and create a setup →