Prerequisites for Creating a Connection
You must satisfy the following prerequisites to create a connection with the Amazon Simple Storage Service (S3) Adapter:
Create an AWS Account
- Go to https://aws.amazon.com.
- Click Create an AWS Account.
- Enter a root user email address.
- Enter a name for your account in the AWS account name field.
- Click Verify email address.
- Once the email address is verified, create your root user password.
- In the subsequent steps, enter your contact information and billing information details.
- Complete the transaction to successfully create a root user account.
You can now sign in to your AWS Account using the root user credentials.
Note:
The root user possesses unrestricted access to AWS resources. It is necessary to create an Oracle Identity and Access Management (IAM) user.
Create an Inline Policy
- Click IAM and select Policies under Access management.
- Select Attach policies directly on the Set permissions page.
- In the Permissions policies section, click Create policy.
- On the Specify permissions page that opens, select S3 as a Service.
- In the Actions allowed section, select the
ListAllMyBuckets check box as the Access
level for your resource in S3.
Note:
This is the minimum permission required for you to create the connection. You can add more permissions as per the actions you want to invoke. For example, if you want to create a bucket, the corresponding permission (create bucket) must be added to the new or existing policy. - Click Next.
- Enter the policy name and click Create
Policy.
The newly created policy is added to the list on the Policies Page.
Create an Oracle IAM User and Obtain the Access Key and Secret Access Key
- Log in to an AWS account using the root user credential.
- In the search bar, enter
IAM. - Click IAM and select Users under Access management.
- Click Create user.
- Enter a name for the user and click Next.
- On the Set Permissions page that appears, perform the following:
- Select Attach policies directly as the Permissions Options.
- Select the permission policies that you created for this user and click Next. See Create an Inline Policy.
- (Optional step) Set a permissions boundary under Set permissions boundary, and click Next.
- (Optional step) Add tags to AWS resources.
- Click Create User.
- Navigate to Dashboard, then Access management, and then Users. The newly created user appears in the list.
- Select the user in the User name column.
- On the User Info page, select Create access key in the Summary section.
- Under Access key best practices & alternatives, select the use case according to your requirement, and click Next.
- (Optional step) Provide a description tag, if required, and click
Next.
The
Access key createdmessage appears.The Access Key and Secret Access Key are displayed.
- Copy the access key ID and secret key.
Note:
You must enter the access key in the Access Key field and the secret key in the Secret Access Key field on the Connections page. See Configure Connection Security. - Alternatively, you can click Download .csv file to download a file that contains the access key ID and the secret key.
- Click Done.
Create a Role for an Oracle IAM User
- Create an Oracle IAM user. See Create an IAM User and Obtain the Access Key and Secret Access key.
- Return to Oracle IAM and in the left sidebar under Access management, click Roles.
- Click Create Role.
- Select AWS Account from the Trusted Entity Type list.
- Create a new permission using existing policies or create an inline policy (for example, AmazonS3FullAccess) for this role.
- Give the role a meaningful name and description.
- Click Create Role.
A role is successfully created.
Edit Trust Relationships for a Role
- Browse Oracle IAM users from Access Management.
- Select the necessary Oracle IAM user.
- Copy the Amazon Resource Name (ARN) value from the Summary tab. You need the user ARN value to edit the trust relationship of a role.
- Navigate to Roles and select the role that you created for your Oracle IAM user.
- Go to the Trust Relationships tab.
- Edit the trust relationship by writing a JSON entry. For example:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "ARN of IAM User " //Paste the ARN of IAM user which you have retrieved in steps mentioned above }, "Action": "sts:AssumeRole" } ] }
Create Policies for a Role
- Go to Access Management, then Policies.
- Click Create Policy.
- Click JSON.
- Add a policy JSON here. The ARN used here is from the role. To retrieve it, navigate to Access Management, then Role, then summary, and then Role ARN. For example:
- role-sts-policy
{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAssumeSpecificRole", "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "PASTE_ROLE_ARN_HERE" //role ARN u can get from role dashboard which u created } ] } - user-sts-policy
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "PASTE_ROLE_ARN_HERE" //role ARN u can get from role dashboard which u created } ] }
- role-sts-policy
- Save the JSON file.
Configure the External ID for a Role
Follow these steps if you want to configure the external ID for a role.
- Navigate to Roles under Access Management and select the role you had created.
- Edit the existing trust relationship by adding the external ID as shown below. For example:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": “ARN of IAM User " //Paste the ARN of IAM user which you had retrieved earlier }, "Action": "sts:AssumeRole", "Condition": { "StringEquals": { "sts:ExternalId": "give-meaningful-value-to-it-eg-OICEXT" } } } ] } - Click Update Policy.
Your role is now configured to use the external ID.
Note:
Save the external ID. You need it on the Connections page.