IAM
The IAM sample template creates roles, policies, users, and groups.
Create a user and add it to a group
Create users and groups, and add the created users to the created groups.
- AccountId, UserName, UserPassword are required.
- UserPassword is displayed with the input value masked (NoEcho). Do not write the password directly in the template; instead, provide it as a parameter when creating the stack.
- TemporaryPassword is set to
true, and it is recommended to change the password after the first login. - Changing UserName will replace the user resource.
SCPTemplateFormatVersion: '2026-01-01'
Description: 'IAM user/group creation and group enrollment sample'
Parameters:
AccountId:
Type: String
Description: 'Account ID for creating the user'
UserName:
Type: String
Description: 'User name (resource replacement when changed)'
UserPassword:
Type: String
NoEcho: true
Description: 'User password (change recommended after first login)'
GroupName:
Type: String
Default: example-group
Description: 'Group name (3~24 characters)'
Resources:
ExampleGroup:
Type: SCP::IAM::Group
Properties:
Name: !Ref GroupName
Description: 'Example Group'
UserIds:
- !Ref ExampleUser
ExampleUser:
Type: SCP::IAM::User
Properties:
AccountId: !Ref AccountId
UserName: !Ref UserName
TemporaryPassword: true
Password: !Ref UserPassword
Description: 'Example User'
Outputs:
UserId:
Description: 'ID of the created user'
Value: !Ref ExampleUser
GroupId:
Description: 'ID of the created group'
Value: !Ref ExampleGroupSCPTemplateFormatVersion: '2026-01-01'
Description: 'IAM user/group creation and group enrollment sample'
Parameters:
AccountId:
Type: String
Description: 'Account ID for creating the user'
UserName:
Type: String
Description: 'User name (resource replacement when changed)'
UserPassword:
Type: String
NoEcho: true
Description: 'User password (change recommended after first login)'
GroupName:
Type: String
Default: example-group
Description: 'Group name (3~24 characters)'
Resources:
ExampleGroup:
Type: SCP::IAM::Group
Properties:
Name: !Ref GroupName
Description: 'Example Group'
UserIds:
- !Ref ExampleUser
ExampleUser:
Type: SCP::IAM::User
Properties:
AccountId: !Ref AccountId
UserName: !Ref UserName
TemporaryPassword: true
Password: !Ref UserPassword
Description: 'Example User'
Outputs:
UserId:
Description: 'ID of the created user'
Value: !Ref ExampleUser
GroupId:
Description: 'ID of the created group'
Value: !Ref ExampleGroupCreate a policy and attach it to groups and roles
Create a policy and attach it to groups and roles.
- GroupName, RoleName, TrustedAccountId are required.
- In TrustedAccountId, enter the Account ID that will receive the delegated role.
SCPTemplateFormatVersion: '2026-01-01'
Description: 'IAM policy creation and group/role association sample'
Parameters:
PolicyName:
Type: String
Default: example-policy
Description: 'Policy name (3~128 characters)'
GroupName:
Type: String
Description: 'Group name to assign the policy (3~24 characters)'
RoleName:
Type: String
Description: 'Role name to which the policy will be granted (1~64 characters)'
TrustedAccountId:
Type: String
Description: 'Account ID to assume the role'
Resources:
ExamplePolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'Example Policy'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: ReadOnly
Effect: Allow
Action:
- 'iam:Get*'
Resource:
- *
ExampleGroup:
Type: SCP::IAM::Group
Properties:
Name: !Ref GroupName
Description: 'Group with attached policy'
PolicyIds:
- !Ref ExamplePolicy
ExampleRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'Roles attached to the policy'
PolicyIds:
- !Ref ExamplePolicy
Principals:
- Type: ACCOUNT
Value: !Ref TrustedAccountId
Outputs:
PolicyId:
Description: 'ID of the generated policy'
Value: !Ref ExamplePolicySCPTemplateFormatVersion: '2026-01-01'
Description: 'IAM policy creation and group/role association sample'
Parameters:
PolicyName:
Type: String
Default: example-policy
Description: 'Policy name (3~128 characters)'
GroupName:
Type: String
Description: 'Group name to assign the policy (3~24 characters)'
RoleName:
Type: String
Description: 'Role name to which the policy will be granted (1~64 characters)'
TrustedAccountId:
Type: String
Description: 'Account ID to assume the role'
Resources:
ExamplePolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'Example Policy'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: ReadOnly
Effect: Allow
Action:
- 'iam:Get*'
Resource:
- *
ExampleGroup:
Type: SCP::IAM::Group
Properties:
Name: !Ref GroupName
Description: 'Group with attached policy'
PolicyIds:
- !Ref ExamplePolicy
ExampleRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'Roles attached to the policy'
PolicyIds:
- !Ref ExamplePolicy
Principals:
- Type: ACCOUNT
Value: !Ref TrustedAccountId
Outputs:
PolicyId:
Description: 'ID of the generated policy'
Value: !Ref ExamplePolicyObject Storage bucket read-only role
Create a read‑only policy for an existing Object Storage bucket and create a role that is granted this policy.
- BucketSrn, TrustedAccountId are required.
- In BucketSrn, enter the SRN of the bucket to grant read permission in the format
srn:<환경>::<계정ID>:<리전>::objectstorage:bucket/<버킷이름>. - The policy allows bucket listing, information retrieval, and object download operations.
SCPTemplateFormatVersion: '2026-01-01'
Description: 'Object Storage read-only policy and role creation sample'
Parameters:
PolicyName:
Type: String
Default: ObjectStorageReadOnlyPolicy
Description: 'Policy name (3~128 characters)'
RoleName:
Type: String
Default: ObjectStorageReadRole
Description: 'Role name (1~64 characters)'
BucketSrn:
Type: String
Description: 'Bucket SRN to grant read permission (format: srn:<환경>::<계정ID>:<리전>::objectstorage:bucket/<버킷이름>)'
TrustedAccountId:
Type: String
Description: 'Account ID to assume the role'
Resources:
ReadOnlyPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'Read-only permission for a specific bucket'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: ReadBucket
Effect: Allow
Action:
- 'objectstorage:List*'
- 'objectstorage:Show*'
- objectstorage:DownloadBucketObject
Resource:
- !Ref BucketSrn
ReadOnlyRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'Bucket read-only role'
PolicyIds:
- !Ref ReadOnlyPolicy
Principals:
- Type: ACCOUNT
Value: !Ref TrustedAccountId
Outputs:
PolicyIdOutput:
Description: 'Generated policy ID'
Value: !Ref ReadOnlyPolicy
RoleIdOutput:
Description: 'ID of the created role'
Value: !Ref ReadOnlyRoleSCPTemplateFormatVersion: '2026-01-01'
Description: 'Object Storage read-only policy and role creation sample'
Parameters:
PolicyName:
Type: String
Default: ObjectStorageReadOnlyPolicy
Description: 'Policy name (3~128 characters)'
RoleName:
Type: String
Default: ObjectStorageReadRole
Description: 'Role name (1~64 characters)'
BucketSrn:
Type: String
Description: 'Bucket SRN to grant read permission (format: srn:<환경>::<계정ID>:<리전>::objectstorage:bucket/<버킷이름>)'
TrustedAccountId:
Type: String
Description: 'Account ID to assume the role'
Resources:
ReadOnlyPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'Read-only permission for a specific bucket'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: ReadBucket
Effect: Allow
Action:
- 'objectstorage:List*'
- 'objectstorage:Show*'
- objectstorage:DownloadBucketObject
Resource:
- !Ref BucketSrn
ReadOnlyRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'Bucket read-only role'
PolicyIds:
- !Ref ReadOnlyPolicy
Principals:
- Type: ACCOUNT
Value: !Ref TrustedAccountId
Outputs:
PolicyIdOutput:
Description: 'Generated policy ID'
Value: !Ref ReadOnlyPolicy
RoleIdOutput:
Description: 'ID of the created role'
Value: !Ref ReadOnlyRoleServiceWatch log integration role
Create a role to forward each account’s audit logs and system logs to ServiceWatch.
- All parameters have default values, so there are no required parameters to input.
SCPTemplateFormatVersion: '2026-01-01'
Description: 'ServiceWatch log collection role sample'
Parameters:
RoleName:
Type: String
Default: ServiceRoleForServiceWatchLogCollection
Description: 'Enter the role name.' (1~64 characters)
PolicyName:
Type: String
Default: servicewatch-log-collection-policy
Description: 'Enter the policy name.' (3~128 characters)
Resources:
ServiceWatchLogPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'ServiceWatch log collection and transmission permission'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: SendLogsToServiceWatch
Effect: Allow
Action:
- servicewatch:CollectLogGroupLogStream
- 'servicewatch:CreateBulkServiceLogEvents'
Resource:
- *
ServiceWatchLogRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'ServiceWatch log integration role'
PolicyIds:
- !Ref ServiceWatchLogPolicy
Principals:
- Type: SERVICE
Value: loggingaudit.samsungsdscloud.com
Outputs:
PolicyIdOutput:
Description: 'ID of the generated policy'
Value: !Ref ServiceWatchLogPolicy
RoleIdOutput:
Description: 'ID of the created role'
Value: !Ref ServiceWatchLogRoleSCPTemplateFormatVersion: '2026-01-01'
Description: 'ServiceWatch log collection role sample'
Parameters:
RoleName:
Type: String
Default: ServiceRoleForServiceWatchLogCollection
Description: 'Enter the role name.' (1~64 characters)
PolicyName:
Type: String
Default: servicewatch-log-collection-policy
Description: 'Enter the policy name.' (3~128 characters)
Resources:
ServiceWatchLogPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'ServiceWatch log collection and transmission permission'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: SendLogsToServiceWatch
Effect: Allow
Action:
- servicewatch:CollectLogGroupLogStream
- 'servicewatch:CreateBulkServiceLogEvents'
Resource:
- *
ServiceWatchLogRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'ServiceWatch log integration role'
PolicyIds:
- !Ref ServiceWatchLogPolicy
Principals:
- Type: SERVICE
Value: loggingaudit.samsungsdscloud.com
Outputs:
PolicyIdOutput:
Description: 'ID of the generated policy'
Value: !Ref ServiceWatchLogPolicy
RoleIdOutput:
Description: 'ID of the created role'
Value: !Ref ServiceWatchLogRoleServiceWatch Cross Account role
ServiceWatch creates a role that delegates permission to share the target account’s metrics and dashboards with the monitoring account.
- MonitoringAccountId is required. Enter the monitoring Account ID to receive shared metrics and dashboards.
- ServiceWatch-CrossAccountSharingPolicy is already created as a default policy, so creating a policy with the same name may cause a conflict. Use a different name for PolicyName. The default is
CustomServiceWatchCrossAccountSharingPolicy.
SCPTemplateFormatVersion: '2026-01-01'
Description: 'ServiceWatch Cross Account Shared Role Sample'
Parameters:
RoleName:
Type: String
Default: ServiceWatch-CrossAccountSharingRole
Description: 'Enter the role name.'
PolicyName:
Type: String
Default: CustomServiceWatchCrossAccountSharingPolicy
Description: 'Enter the policy name.' (3~128 characters)
MonitoringAccountId:
Type: String
Description: 'Monitoring Account ID to receive shared metrics and dashboards'
Resources:
CrossAccountSharingPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'ServiceWatch view permission to be shared with the Monitoring account'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: ShareServiceWatch
Effect: Allow
Action:
- servicewatch:ListDashboards
- 'servicewatch:ShowDashboard'
- servicewatch:ListSearchOptions
- servicewatch:ListSearchOptionTags
- servicewatch:ListMetricInfos
- servicewatch:ListMetricSeries
- 'servicewatch:ListDimensionValues'
- servicewatch:ListDimensionColumns
- 'servicewatch:ListKeyMetrics'
- 'servicewatch:ListMetricData'
- 'servicewatch:ShowMetricDataJson'
- servicewatch:DownloadMetricDataCsv
- servicewatch:DownloadMetricDataImage
- 'servicewatch:ExportMetricData'
- 'servicewatch:ListMetricComparePeriods'
- 'servicewatch:DownloadMetricComparePeriodsCsv'
- servicewatch:ExportMetricComparePeriods
- 'resourcemanager:ListResources'
- 'resourcemanager:ListTags'
Resource:
- *
CrossAccountSharingRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'ServiceWatch Cross Account shared role'
PolicyIds:
- !Ref CrossAccountSharingPolicy
Principals:
- Type: ACCOUNT
Value: !Ref MonitoringAccountId
Outputs:
PolicyIdOutput:
Description: 'Generated policy ID'
Value: !Ref CrossAccountSharingPolicy
RoleIdOutput:
Description: 'Generated role ID'
Value: !Ref CrossAccountSharingRoleSCPTemplateFormatVersion: '2026-01-01'
Description: 'ServiceWatch Cross Account Shared Role Sample'
Parameters:
RoleName:
Type: String
Default: ServiceWatch-CrossAccountSharingRole
Description: 'Enter the role name.'
PolicyName:
Type: String
Default: CustomServiceWatchCrossAccountSharingPolicy
Description: 'Enter the policy name.' (3~128 characters)
MonitoringAccountId:
Type: String
Description: 'Monitoring Account ID to receive shared metrics and dashboards'
Resources:
CrossAccountSharingPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'ServiceWatch view permission to be shared with the Monitoring account'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: ShareServiceWatch
Effect: Allow
Action:
- servicewatch:ListDashboards
- 'servicewatch:ShowDashboard'
- servicewatch:ListSearchOptions
- servicewatch:ListSearchOptionTags
- servicewatch:ListMetricInfos
- servicewatch:ListMetricSeries
- 'servicewatch:ListDimensionValues'
- servicewatch:ListDimensionColumns
- 'servicewatch:ListKeyMetrics'
- 'servicewatch:ListMetricData'
- 'servicewatch:ShowMetricDataJson'
- servicewatch:DownloadMetricDataCsv
- servicewatch:DownloadMetricDataImage
- 'servicewatch:ExportMetricData'
- 'servicewatch:ListMetricComparePeriods'
- 'servicewatch:DownloadMetricComparePeriodsCsv'
- servicewatch:ExportMetricComparePeriods
- 'resourcemanager:ListResources'
- 'resourcemanager:ListTags'
Resource:
- *
CrossAccountSharingRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'ServiceWatch Cross Account shared role'
PolicyIds:
- !Ref CrossAccountSharingPolicy
Principals:
- Type: ACCOUNT
Value: !Ref MonitoringAccountId
Outputs:
PolicyIdOutput:
Description: 'Generated policy ID'
Value: !Ref CrossAccountSharingPolicy
RoleIdOutput:
Description: 'Generated role ID'
Value: !Ref CrossAccountSharingRoleStack Set Administrator Role (Self Managed)
Create the Admin role required when using Self Managed as the permission model for a stack set. Configure the stack set service to assume this role and delegate tasks to the Execution role of the target account.
- All parameters have default values, so there are no required parameters to input.
- ExecutionRoleName specifies the name of the Execution role to be delegated, and the default is the role name generated by the 스택 세트 실행 역할(Self Managed) sample.
SCPTemplateFormatVersion: '2026-01-01'
Description: 'Sample Admin role for StackSet Self Managed permissions'
Parameters:
RoleName:
Type: String
Default: SCPInfrastructureBuilderStackSetAdministrationRole
Description: 'Enter the role name.' (1~64 characters)
PolicyName:
Type: String
Default: stackset-admin-policy
Description: 'Enter the policy name. (3~128 characters)
ExecutionRoleName:
Type: String
Default: SCPInfrastructureBuilderStackSetExecutionRole
Description: 'Assume target Execution role name'
Resources:
StackSetAdminPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'Policy for StackSet to assume the Execution Role'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: AssumeExecutionRole
Effect: Allow
Action:
- 'sts:AssumeRole'
Resource:
- *
Condition:
StringLike:
"scp:RequestAttribute/body['roleIndicator']"
- !Sub '*:*:${ExecutionRoleName}*'
StackSetAdminRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'Infrastructure Builder StackSet Self Managed Admin role'
PolicyIds:
- !Ref StackSetAdminPolicy
Principals:
- Type: SERVICE
Value: infrastructure-builder.samsungsdscloud.com
Outputs:
PolicyIdOutput:
Description: 'Generated policy ID'
Value: !Ref StackSetAdminPolicy
RoleIdOutput:
Description: 'ID of the created role'
Value: !Ref StackSetAdminRoleSCPTemplateFormatVersion: '2026-01-01'
Description: 'Sample Admin role for StackSet Self Managed permissions'
Parameters:
RoleName:
Type: String
Default: SCPInfrastructureBuilderStackSetAdministrationRole
Description: 'Enter the role name.' (1~64 characters)
PolicyName:
Type: String
Default: stackset-admin-policy
Description: 'Enter the policy name. (3~128 characters)
ExecutionRoleName:
Type: String
Default: SCPInfrastructureBuilderStackSetExecutionRole
Description: 'Assume target Execution role name'
Resources:
StackSetAdminPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'Policy for StackSet to assume the Execution Role'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: AssumeExecutionRole
Effect: Allow
Action:
- 'sts:AssumeRole'
Resource:
- *
Condition:
StringLike:
"scp:RequestAttribute/body['roleIndicator']"
- !Sub '*:*:${ExecutionRoleName}*'
StackSetAdminRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'Infrastructure Builder StackSet Self Managed Admin role'
PolicyIds:
- !Ref StackSetAdminPolicy
Principals:
- Type: SERVICE
Value: infrastructure-builder.samsungsdscloud.com
Outputs:
PolicyIdOutput:
Description: 'Generated policy ID'
Value: !Ref StackSetAdminPolicy
RoleIdOutput:
Description: 'ID of the created role'
Value: !Ref StackSetAdminRoleStack Set execution role (Self Managed)
Create an Execution role that, delegated from the Admin role, actually deploys resources in the target Account. It must be created for each target Account.
- AdminRoleSrn is required. Enter the SRN of the trusted Admin role.
*) and all resources (*). In production environments, limit the scope to allow only the permissions required for resources deployed with a stack set.SCPTemplateFormatVersion: '2026-01-01'
Description: 'Sample Execution role for StackSet Self Managed permissions'
Parameters:
RoleName:
Type: String
Default: SCPInfrastructureBuilderStackSetExecutionRole
Description: 'Enter the role name.' (1~64 characters)
PolicyName:
Type: String
Default: stackset-execution-policy
Description: 'Enter the policy name. (3~128 characters)
AdminRoleSrn:
Type: String
Description: 'Trusted Admin role SRN'
Resources:
StackSetExecutionPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'Full permission policy required for StackSet deployment'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: FullAccess
Effect: Allow
Action:
- *
Resource:
- *
StackSetExecutionRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'Infrastructure Builder StackSet Self Managed Execution role'
PolicyIds:
- !Ref StackSetExecutionPolicy
Principals:
- Type: SRN
Value: !Ref AdminRoleSrn
Outputs:
ExecutionRoleId:
Description: 'ID of the generated Execution role'
Value: !Ref StackSetExecutionRoleSCPTemplateFormatVersion: '2026-01-01'
Description: 'Sample Execution role for StackSet Self Managed permissions'
Parameters:
RoleName:
Type: String
Default: SCPInfrastructureBuilderStackSetExecutionRole
Description: 'Enter the role name.' (1~64 characters)
PolicyName:
Type: String
Default: stackset-execution-policy
Description: 'Enter the policy name. (3~128 characters)
AdminRoleSrn:
Type: String
Description: 'Trusted Admin role SRN'
Resources:
StackSetExecutionPolicy:
Type: SCP::IAM::Policy
Properties:
PolicyName: !Ref PolicyName
Description: 'Full permission policy required for StackSet deployment'
PolicyVersion:
PolicyVersionName: POLICY_VERSION_1
PolicyDocument:
Version: '2024-07-01'
Statement:
- Sid: FullAccess
Effect: Allow
Action:
- *
Resource:
- *
StackSetExecutionRole:
Type: SCP::IAM::Role
Properties:
Name: !Ref RoleName
Description: 'Infrastructure Builder StackSet Self Managed Execution role'
PolicyIds:
- !Ref StackSetExecutionPolicy
Principals:
- Type: SRN
Value: !Ref AdminRoleSrn
Outputs:
ExecutionRoleId:
Description: 'ID of the generated Execution role'
Value: !Ref StackSetExecutionRole