Skip to content

Organizations

CloudMock emulates AWS Organizations, supporting organization management, organizational units, accounts, policies (including SCPs), and tagging.

OperationStatusNotes
CreateOrganizationSupportedCreates an organization
DescribeOrganizationSupportedReturns organization details
DeleteOrganizationSupportedDeletes the organization
ListRootsSupportedLists organization roots
CreateOrganizationalUnitSupportedCreates an OU
DescribeOrganizationalUnitSupportedReturns OU details
ListOrganizationalUnitsForParentSupportedLists OUs under a parent
DeleteOrganizationalUnitSupportedDeletes an OU
CreateAccountSupportedCreates a member account
DescribeCreateAccountStatusSupportedReturns account creation status
DescribeAccountSupportedReturns account details
ListAccountsSupportedLists all accounts
ListAccountsForParentSupportedLists accounts under a parent
MoveAccountSupportedMoves an account between OUs
CreatePolicySupportedCreates a policy (e.g., SCP)
DescribePolicySupportedReturns policy details
ListPoliciesSupportedLists policies
UpdatePolicySupportedUpdates a policy
DeletePolicySupportedDeletes a policy
AttachPolicySupportedAttaches a policy to a target
DetachPolicySupportedDetaches a policy
ListTargetsForPolicySupportedLists targets for a policy
EnablePolicyTypeSupportedEnables a policy type on a root
DisablePolicyTypeSupportedDisables a policy type
TagResourceSupportedAdds tags to a resource
UntagResourceSupportedRemoves tags from a resource
ListTagsForResourceSupportedLists tags for a resource
import { OrganizationsClient, CreateOrganizationCommand, CreateAccountCommand } from '@aws-sdk/client-organizations';
const client = new OrganizationsClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new CreateOrganizationCommand({ FeatureSet: 'ALL' }));
const { CreateAccountStatus } = await client.send(new CreateAccountCommand({
AccountName: 'dev-account',
Email: 'dev@example.com',
}));
console.log(CreateAccountStatus.AccountId);
import boto3
client = boto3.client('organizations',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.create_organization(FeatureSet='ALL')
response = client.create_account(
AccountName='dev-account',
Email='dev@example.com')
print(response['CreateAccountStatus']['AccountId'])
cloudmock.yml
services:
organizations:
enabled: true
  • Member accounts are stubs and do not have real AWS resources
  • SCPs are stored and attached but not enforced on API calls
  • Account creation completes immediately