How to Create Resource Access Manager on Amazon Web Service(AWS).
AWS Resource Access Manager (RAM) is a service that enables you to easily and securely share AWS resources with any AWS account or within your AWS Organization.You can share AWS Transit Gateways, Subnets, AWS License Manager configurations, and Amazon Route 53 Resolver rules resources with RAM.
- Login to aws portal.
- Click on Services.
- Under Security, Identity, & Compliance select Resource Access Manager.
- Click on Create resource share.
- Provide resource share name.
- Select existing subnet.
- Provide Key name & value for resource share.
- Click on Next.
- Associate a permission with each resource type.
- Click on Next.
- Select Principals:AWS account,IAM role or IAM user.
- Click on Next.
- Review all configurations.
- Click on Create resource share.
- After sometime resource share created successfully.
Create Resource Share using Shell
- Setup aws-cli on your system so click on link https://www.hackerxone.com/blog/how-install-configure-aws-cli-ubuntu-1804
- Run the following command:
To create a resource share
aws ram create-resource-share –name resource-share-name
To create a resource share with AWS accounts as principals
aws ram create-resource-share –name resource-share-name –principals 0abcdef1234567890
To create a resource share restricted to your organization in AWS Organizations
aws ram create-resource-share –name resource-share-name –no-allow-external-principals –principals <value>
To associate a resource with a resource share
aws ram associate-resource-share –resource-arns arn:aws:ec2:us-west-2:123456789012:subnet/subnet-id –resource-share-arn <value>