AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::RAM::ResourceShare

CfnResourceShare

Creates a resource share. You can provide a list of the Amazon Resource Names (ARNs) for the resources that you want to share, a list of principals you want to share the resources with, and the permissions to grant those principals. > Sharing a resource makes it available for use by principals outside of the AWS account that created the resource. Sharing doesn't change any permissions or quotas that apply to the resource in the account that created it.

Import

import { CfnResourceShare } from 'aws-cdk-lib/aws-ram';

Or use the module namespace:

import * as ram from 'aws-cdk-lib/aws-ram';
// ram.CfnResourceShare

Properties

Configuration passed to the constructor as CfnResourceShareProps.

nameRequired
string

Specifies the name of the resource share.

allowExternalPrincipalsOptional
boolean | IResolvable

Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share. A value of `true` lets you share with individual AWS accounts that are *not* in your organization. A value of `false` only has meaning if your account is a member of an AWS Organization. The default value is `true` .

permissionArnsOptional
string[]

Specifies the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com//general/latest/gr/aws-arns-and-namespaces.html) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.

principalsOptional
string[]

Specifies the principals to associate with the resource share. The possible values are:. - An AWS account ID - An Amazon Resource Name (ARN) of an organization in AWS Organizations - An ARN of an organizational unit (OU) in AWS Organizations - An ARN of an IAM role - An ARN of an IAM user > Not all resource types can be shared with IAM roles and users. For more information, see the column *Can share with IAM roles and users* in the tables on [Shareable AWS resources](https://docs.aws.amazon.com/ram/latest/userguide/shareable.html) in the *AWS Resource Access Manager User Guide* .

resourceArnsOptional
string[]

Specifies a list of one or more ARNs of the resources to associate with the resource share.

sourcesOptional
string[]

Specifies from which source accounts the service principal has access to the resources in this resource share.

tagsOptional
CfnTag[]

Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter