AWS Resource Access Manager: User Guide
AWS Resource Access Manager: User Guide
User Guide
AWS Resource Access Manager User Guide
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not
Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or
discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may
or may not be affiliated with, connected to, or sponsored by Amazon.
AWS Resource Access Manager User Guide
Table of Contents
What Is AWS RAM? ............................................................................................................................ 1
Benefits .................................................................................................................................... 1
How Resource Sharing Works ...................................................................................................... 1
Sharing Your Resources ....................................................................................................... 1
Using Shared Resources ...................................................................................................... 1
Shareable Resources ................................................................................................................... 1
Service Limits ............................................................................................................................ 2
Accessing AWS RAM ................................................................................................................... 2
Pricing ...................................................................................................................................... 3
Getting Started .................................................................................................................................. 4
Sharing Your Resources ............................................................................................................... 4
Enable Sharing with AWS Organizations ............................................................................... 4
Create a Resource Share ..................................................................................................... 5
Using Shared Resources .............................................................................................................. 6
Respond to the Resource Share Invitation ............................................................................. 6
Use the Resources that are Shared with You .......................................................................... 6
Working with Shared Resources ........................................................................................................... 7
Owned By You ........................................................................................................................... 7
Creating a Resource Share ................................................................................................... 7
Updating a Resource Share ................................................................................................. 8
Viewing a Resource Share ................................................................................................... 8
Viewing Your Shared Resources ............................................................................................ 9
Viewing Principals .............................................................................................................. 9
Deleting a Resource Share ................................................................................................. 10
Supported Actions on Shared Resources .............................................................................. 10
Shared With You ...................................................................................................................... 10
Accepting and Rejecting Invitations .................................................................................... 10
Viewing Resource Shares ................................................................................................... 11
Viewing Shared Resources ................................................................................................. 12
Viewing Principals Sharing With You ................................................................................... 12
Leaving a Resource Share .................................................................................................. 12
AZ IDs ..................................................................................................................................... 13
Authentication and Access Control ..................................................................................................... 14
IAM Policies for AWS RAM ......................................................................................................... 14
Effect .............................................................................................................................. 14
Action ............................................................................................................................. 14
Resource ......................................................................................................................... 14
Condition ........................................................................................................................ 15
Example IAM Policies ................................................................................................................ 15
Allow Sharing of Specific Resources .................................................................................... 15
Allow Sharing of Specific Resource Types ............................................................................ 16
Restrict Sharing with External AWS Accounts ....................................................................... 16
Disabling Sharing with AWS Organizations .................................................................................. 16
Monitoring AWS RAM ....................................................................................................................... 18
Monitoring with CloudWatch Events ........................................................................................... 18
Logging AWS RAM API Calls with AWS CloudTrail ......................................................................... 18
AWS RAM Information in CloudTrail ................................................................................... 18
Understanding AWS RAM Log File Entries ............................................................................ 19
Document History ............................................................................................................................ 21
iii
AWS Resource Access Manager User Guide
Benefits
Benefits
AWS RAM offers the following benefits:
• Reduces operational overhead—Create resources centrally and use AWS RAM to share those resources
with other accounts. This eliminates the need to provision duplicate resources in every account, which
reduces operational overhead.
• Provides security and consistency—Govern consumption of shared resources using existing policies
and permissions, to achieve security and control. AWS RAM offers a consistent experience for sharing
different types of AWS resources.
• Provides visibility and auditability—View usage details for shared resources through integration with
Amazon CloudWatch and AWS CloudTrail. AWS RAM provides comprehensive visibility into shared
resources and accounts.
Shareable Resources
To learn more about the AWS resources that can be shared using AWS RAM, see the following
documentation:
1
AWS Resource Access Manager User Guide
Service Limits
• Sharing Forwarding Rules with Other AWS Accounts and Using Shared Rules in the Amazon Route 53
Developer Guide
• Sharing a Transit Gateway in Amazon VPC Transit Gateways
• Working with VPC Sharing in the Amazon VPC User Guide
• Cross-Account Traffic Mirroring Targets in Amazon VPC Traffic Mirroring
• Configuring License Manager Settings in the AWS License Manager User Guide
• Working with Shared Capacity Reservations in the Amazon Elastic Compute Cloud User Guide
• Cross-Account Aurora DB Cluster Cloning in the Amazon Aurora User Guide
Service Limits
Your AWS account has the following limits related to AWS RAM. You can request an increase for some of
these limits. To request a limit increase, contact AWS Support.
AWS RAM provides a web-based user interface, the AWS RAM console. If you've signed up for an
AWS account, you can access the AWS RAM console by signing into the AWS Management Console
and selecting AWS RAM from the console home page.
AWS Command Line Interface (AWS CLI)
The AWS CLI provides direct access to the AWS RAM public API operations. It is supported on
Windows, macOS, and Linux. For more information about getting started, see the AWS Command
Line Interface User Guide. For more information about the commands for AWS RAM, see the AWS
CLI Command Reference.
AWS Tools for Windows PowerShell
AWS provides commands for a broad set of AWS products for those who script in the PowerShell
environment. For more information about getting started, see the AWS Tools for Windows
PowerShell User Guide. For more information about the cmdlets for AWS RAM, see the AWS Tools
for Windows PowerShell Cmdlet Reference.
Query API
The AWS RAM HTTPS Query API gives you programmatic access to AWS RAM and AWS. The AWS
RAM API lets you issue HTTPS requests directly to the service. When you use the AWS RAM API, you
must include code to digitally sign requests using your credentials. For more information, see the
AWS RAM API Reference.
2
AWS Resource Access Manager User Guide
Pricing
Pricing
There are no additional charges for creating resource shares and sharing your resources across accounts.
Resource usage charges vary depending on the resource type. For more information about about how
shareable resources are billed, refer to the respective service's documentation.
3
AWS Resource Access Manager User Guide
Sharing Your Resources
Topics
• Sharing Your Resources (p. 4)
• Using Shared Resources (p. 6)
When you share resources within your organization, AWS RAM does not send invitations to principals.
Principals in your organization get access to shared resources without exchanging invitations.
Important
If you do not enable sharing with AWS Organizations, you cannot share resources with your
organization or organizational units within your organization. However, you can still share
resources with individual AWS accounts in your organization. In this case, the accounts are
treated as external principals. They receive an invitation to join the resource share, and they
must accept the invitation to get access to the shared resources.
Requirements
• Only the master account can enable sharing with AWS Organizations.
• The organization must be enabled for all features. For more information, see Enabling All Features in
Your Organization in the AWS Organizations User Guide.
4
AWS Resource Access Manager User Guide
Create a Resource Share
This command can be used in any region, and it enables sharing with AWS Organizations in all regions in
which AWS RAM is supported.
Considerations
• You can share a resource only if you own it. You can't share a resource that is shared with you.
• If you are part of an organization in AWS Organizations and sharing within your organization is
enabled, principals in your organization are automatically granted access to the shared resources.
Otherwise, principals receive an invitation to join the resource share and are granted access to the
shared resources after accepting the invitation.
• After you add an organization to a resource share, changes to the OU or organization affect the
resource share. For example, if you add a new account to the organization, it has access to the shared
resources.
• You can't add the following to a resource share as principals: IAM users, IAM roles, or OUs or
organizations outside your organization in AWS Organizations.
a. For Select resource type, select the type of resource. This filters the list of shareable resources
to resources of the selected type.
b. Select the check boxes next to the resources. The selected resources are moved under Selected
resources.
If you are sharing zonal resources, using the Availability Zone ID (AZ ID) helps you determine the
relative location of these resources across accounts. For more information, see AZ IDs for Your
Resources (p. 13).
5. (Optional) Under Principals, do the following:
a. By default, you can share resources with any AWS account. To restrict resource sharing to your
organization in AWS Organizations, clear Allow external accounts.
b. For each principal, specify its ID and choose Add:
• To add an AWS account, type the 12-digit account ID. For example, 123456789012.
• To add an OU, type the ID of the OU. For example, ou-abcd1234-mnop5678qrst9098uv76.
• To add your entire organization, type the ID of the organization. For example, o-
abcd1234efgh5678.
6. (Optional) Under Tags, type a tag key and tag value. To add another tag, choose Add tag and type
a tag key and tag value pair. These tags are not applied to the resources included in the resource
share.
7. Choose Create resource share.
It can take a few minutes for the resource and principal associations to complete. Allow this process
to complete before attempting to use the resource share.
5
AWS Resource Access Manager User Guide
Using Shared Resources
8. You can add and remove resources and principals or apply custom tags to your resource share at any
time. You can delete your resource share when you no longer want to share the resources. For more
information, see Sharing Resources Owned by You (p. 7).
To respond to invitations
The Status column indicates your current participation status for the resource share. The Pending
status indicates that you have been added to a resource share, but you have not yet accepted or
rejected the invitation.
4. To respond to the resource share invitation, select the resource share ID and choose Accept resource
share to accept the invitation, or Reject resource share to decline the invitation. If you reject the
invitation, you do not get access to the resources. If you accept the invitation, you gain access to the
resources.
• Sharing Forwarding Rules with Other AWS Accounts and Using Shared Rules in the Amazon Route 53
Developer Guide
• Sharing a Transit Gateway in Amazon VPC Transit Gateways
• Working with VPC Sharing in the Amazon VPC User Guide
• Cross-Account Traffic Mirroring Targets in Amazon VPC Traffic Mirroring
• Configuring License Manager Settings in the AWS License Manager User Guide
• Working with Shared Capacity Reservations in the Amazon Elastic Compute Cloud User Guide
• Cross-Account Aurora DB Cluster Cloning in the Amazon Aurora User Guide
6
AWS Resource Access Manager User Guide
Owned By You
Contents
• Sharing Resources Owned by You (p. 7)
• Creating a Resource Share (p. 7)
• Updating a Resource Share (p. 8)
• Viewing a Resource Share (p. 8)
• Viewing Your Shared Resources (p. 9)
• Viewing the Principals with Whom You're Sharing (p. 9)
• Deleting a Resource Share (p. 10)
• Supported Actions on Shared Resources (p. 10)
• Accessing Resources Shared With You (p. 10)
• Accepting and Rejecting Invitations (p. 10)
• Viewing Resource Shares (p. 11)
• Viewing Shared Resources (p. 12)
• Viewing Principals Sharing With You (p. 12)
• Leaving a Resource Share (p. 12)
• AZ IDs for Your Resources (p. 13)
Contents
• Creating a Resource Share (p. 7)
• Updating a Resource Share (p. 8)
• Viewing a Resource Share (p. 8)
• Viewing Your Shared Resources (p. 9)
• Viewing the Principals with Whom You're Sharing (p. 9)
• Deleting a Resource Share (p. 10)
• Supported Actions on Shared Resources (p. 10)
To create a resource share, follow the directions in Sharing Your Resources (p. 4).
7
AWS Resource Access Manager User Guide
Updating a Resource Share
• associate-resource-share
• disassociate-resource-share
• tag-resource
• update-resource-share
• Summary—Lists information about the resource share, such as its name, ID, owner, Amazon
Resource Name (ARN), creation date, and current status.
• Shared resources—Lists the resources that are included in the resource share. Choose the ID of a
resource to view it in its service console.
• Shared principals—Lists the principals with whom the resources are shared.
8
AWS Resource Access Manager User Guide
Viewing Your Shared Resources
• Resource ID—The ID of the resource. Choose the ID of a resource to view it in its service console.
• Resource type—The type of resource.
• Last share date—The date on which the resource was last shared.
• Resource shares—The number of resource shares in which the resource is included. Choose the
value to list the resource shares.
• Principals—The number of principals with whom the resource is shared. Choose the value to view
the principals.
To view the resources that you're sharing using the AWS CLI
To view the principals with whom you're sharing using the console
To view the principals with whom you're sharing using the AWS CLI
9
AWS Resource Access Manager User Guide
Deleting a Resource Share
The deleted resource share remains visible in the console for a short period after deletion, but its status
changes to Deleted.
Contents
• Accepting and Rejecting Invitations (p. 10)
• Viewing Resource Shares (p. 11)
• Viewing Shared Resources (p. 12)
• Viewing Principals Sharing With You (p. 12)
• Leaving a Resource Share (p. 12)
If you were added to the resource share by an account in your organization in AWS Organizations, and
sharing within your organization is enabled, you are automatically get access to the shared resources.
If you were added to a resource share by one of the following, you receive an invitation to join the
resource share:
10
AWS Resource Access Manager User Guide
Viewing Resource Shares
• An account inside your organization, if sharing with AWS Organizations is not enabled
If you receive an invitation to join a resource share, you must accept it to access to the shared resources.
If you decline the invitation, you cannot access the shared resources.
You have seven days to accept an invitation to join a resource share. If you do not accept the invitation
within seven days, it is automatically declined.
To respond to invitations
The Status column indicates your current participation status for the resource share. The Pending
status indicates that you have been added to a resource share, but you have not yet accepted or
rejected the invitation.
4. To respond to the resource share invitation, select the resource share ID and choose Accept resource
share to accept the invitation, or Reject resource share to decline the invitation. If you reject the
invitation, you do not get access to the resources. If you accept the invitation, you gain access to the
resources.
• accept-resource-share-invitation
• reject-resource-share-invitation
11
AWS Resource Access Manager User Guide
Viewing Shared Resources
• Resource ID—The ID of the resource. Choose the ID of the resource to view it in its service console.
• Resource type—The type of resource.
• Last share date—The date on which the resource was shared with you.
• Resource shares—The number of resource shares in which the resource is included. Choose the
value to view the resource shares.
• Owner ID—The ID of the principal who owns the resource.
To view the principals that are sharing resources with you using the console
To view the principals that are sharing resources with you using the AWS CLI
You cannot leave a resource share if you were added to it by an account inside your organization and
sharing with AWS Organizations is enabled.
12
AWS Resource Access Manager User Guide
AZ IDs
To identify the location of your resources relative to your accounts, you must use the AZ ID, which is a
unique and consistent identifier for an Availability Zone. For example, use1-az1 is an AZ ID for the us-
east-1 Region and it is the same location in every AWS account.
Viewing AZ IDs enables you to determine the location of resources in one account relative to the
resources in another account. For example, if you share a subnet in the Availability Zone with the AZ ID
use-az2 with another account, this subnet is available to that account in the Availability Zone whose AZ
ID is also use-az2. The AZ ID for each virtual private cloud (VPC) and subnet is displayed in the Amazon
VPC console.
• describe-availability-zones
• DescribeAvailabilityZones
13
AWS Resource Access Manager User Guide
IAM Policies for AWS RAM
Contents
• IAM Policies for AWS RAM (p. 14)
• Example IAM Policies (p. 15)
• Disabling Sharing with AWS Organizations (p. 16)
An IAM policy is a JSON document that includes the following statements: Effect, Action, Resource, and
Condition. An IAM policy typically takes the following form:
{
"Statement":[{
"Effect":"effect",
"Action":"action",
"Resource":"arn",
"Condition":{
"condition":{
"key":"value"
}
}
}]
}
Effect
The Effect statement indicates whether the policy allows or denies a user permission to perform an
action. The possible values include: Allow and Deny.
Action
The Action statement specifies the AWS RAM API actions for which the policy is allowing or denying
permission. For a complete list of the allowed actions, see Actions Defined by AWS Resource Access
Manager in the IAM User Guide.
Resource
The Resource statement specifies the AWS RAM resources that are affected by the policy. To specify a
resource in the statement, you need to use its unique Amazon Resource Name (ARN). For a complete list
of the allowed resources, see Resources Defined by AWS Resource Access Manager in the IAM User Guide.
14
AWS Resource Access Manager User Guide
Condition
Condition
Condition statements are optional. They can be used to further refine the conditions under which the
policy applies. AWS RAM supports the following condition keys:
• aws:RequestTag/${TagKey} — Specifies a tag key and value pair that must be used when creating
or tagging a resource share.
• aws:ResourceTag/${TagKey} — Indicates that the action can be performed only on resources that
have the specified tag key and value pair.
• aws:TagKeys — Specifies the tag keys that can be used when creating or tagging a resource share.
• ram:AllowsExternalPrincipals — Indicates that the action can be performed only on resource
shares that allow or deny sharing with external principals. An external principal is an AWS account
outside of your AWS organization
• ram:Principal — Indicates that the action can be performed only on the specified principal.
• ram:RequestedResourceType — Indicates that the action can be performed only on the specified
resource type. Resource types must be specified in the following format:
• ec2:CapacityReservation
• ec2:Subnet
• ec2:TrafficMirrorTarget
• ec2:TransitGateway
• license-manager:LicenseConfiguration
• rds:Cluster
• route53resolver:ResolverRule
• ram:ResourceArn — Indicates that the action can be performed only on a resource with the
specified ARN.
• ram:ResourceShareName — Indicates that the action can be performed only on a resource share
with the specified name.
• ram:ShareOwnerAccountId — Indicates that the action can be performed only on resource shares
owned by a specific account.
For example, the following policy limits principals to sharing only the resolver rule with the specified
Amazon Resource Name (ARN).
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["ram:CreateResourceShare", "ram:AssociateResourceShare"],
"Resource": "*",
15
AWS Resource Access Manager User Guide
Allow Sharing of Specific Resource Types
"Condition": {
"StringEquals": {
"ram:ResourceArn": "arn:aws:route53resolver:us-
west-2:123456789012:resolver-rule/rslvr-rr-5328a0899aexample"
}
}
}]
}
For example, the following policy limits principals to sharing only resolver rules.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["ram:CreateResourceShare", "ram:AssociateResourceShare"],
"Resource": "*",
"Condition": {
"StringEquals": {
"ram:RequestedResourceType": "route53resolver:ResolverRule"
}
}
}]
}
For example, the following IAM policy prevents principals from adding external AWS accounts to
resource shares.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "ram:CreateResourceShare",
"Resource": "*",
"Condition": {
"Bool": {
"ram:AllowsExternalPrincipals": "false"
}
}
}]
}
16
AWS Resource Access Manager User Guide
Disabling Sharing with AWS Organizations
1. Disable trusted access to AWS Organizations using the AWS Organizations disable-aws-service-
access AWS CLI command.
Important
When you disable trusted access to AWS Organizations, principals within your organizations
are removed from all resource shares and lose access to those shared resources.
2. Use the IAM console, the IAM AWS CLI, or the IAM API to delete the
AWSServiceRoleForResourceAccessManager service-linked role. For more information, see Deleting
a Service-Linked Role in the IAM User Guide.
17
AWS Resource Access Manager User Guide
Monitoring with CloudWatch Events
For more information, see the Amazon CloudWatch Events User Guide.
For more information about CloudTrail, see the AWS CloudTrail User Guide.
For an ongoing record of events in your AWS account, including events for AWS RAM, create a trail.
A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a
trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the
AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can
configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs.
For more information, see the following:
18
AWS Resource Access Manager User Guide
Understanding AWS RAM Log File Entries
All AWS RAM actions are logged by CloudTrail and are documented in the AWS RAM API
Reference. For example, calls to the CreateResourceShare, AssociateResourceShare, and
EnableSharingWithAwsOrganization actions generate entries in the CloudTrail log files.
Every event or log entry contains information about who generated the request. The identity
information helps you determine the following:
• Whether the request was made with root or AWS Identity and Access Management (IAM) user
credentials.
• Whether the request was made with temporary security credentials for a role or federated user.
• Whether the request was made by another AWS service.
The following example shows a CloudTrail log entry for the CreateResourceShare action.
{
"eventVersion": "1.05",
"userIdentity": {
"type": "IAMUser",
"principalId": "NOPIOSFODNN7EXAMPLE",
"arn": "arn:aws:iam::111122223333:user/admin",
"accountId": "111122223333",
"accessKeyId": "BCDIOSFODNN7EXAMPLE",
"userName": "admin"
},
"eventTime": "2018-11-03T04:23:19Z",
"eventSource": "ram.amazonaws.com",
"eventName": "CreateResourceShare",
"awsRegion": "us-east-1",
"sourceIPAddress": "192.0.1.0",
"userAgent": "aws-cli/1.16.2 Python/2.7.10 Darwin/16.7.0 botocore/1.11.2",
"requestParameters": {
"name": "foo"
},
"responseElements": {
"resourceShare": {
"allowExternalPrincipals": true,
"name": "foo",
"owningAccountId": "111122223333",
"resourceShareArn": "arn:aws:ram:us-east-1:111122223333:resource-share/
EXAMPLE0-1234-abcd-1212-987656789098",
"status": "ACTIVE"
}
19
AWS Resource Access Manager User Guide
Understanding AWS RAM Log File Entries
},
"requestID": "EXAMPLE0-abcd-1234-mnop-987654567876",
"eventID": "EXAMPLE0-1234-abcd-hijk-543234565434",
"readOnly": false,
"eventType": "AwsApiCall",
"recipientAccountId": "111122223333"
}
20
AWS Resource Access Manager User Guide
Support for sharing On-Demand Use AWS RAM to share On- July 29, 2019
Capacity Reservations Demand Capacity Reservations.
Support for sharing Aurora DB Use AWS RAM to share Aurora July 2, 2019
clusters DB clusters.
Support for sharing Traffic Use AWS RAM to share Traffic June 25, 2019
Mirroring targets Mirroring targets.
Support for sharing subnets Use AWS RAM to share Amazon November 27, 2018
VPC subnets.
Support for sharing transit Use AWS RAM to share Amazon November 26, 2018
gateways VPC transit gateways.
Support for sharing forwarding Use AWS RAM to share Route 53 November 20, 2018
rules forwarding rules.
21