Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W-14550826-aws-service-role-kb-migration-kt #2693

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,38 @@ In the *Configuration XML* editor, the configuration looks like this:
</s3:config>
----

== Configure a Role using Amazon Web Services

The following example shows how to configure a role ARN (Amazon Resource Name) using Amazon Web Services. You use an AWS Service Role in CloudHub 2.0 private space for CloudHub 2.0 Mule apps to access AWS resources in another AWS account. Additionally, you configure Amazon S3 Connector and Amazon Secretes Manager Properties Provider.

. Enable AWS service role in CloudHub 2.0 Private space:

image::aws-sm-role-1.png[Enable AWS Service Role option in CloudHub 2.0 private space user interface]

[start=2]
. In your AWS account, create a new role `ch2-s3-servicerole-test` and then add the service role as a Trust Principal with `"Action": "sts:AssumeRole"`:

image::aws-sm-role-2.png[New role under Trust Relationships tab]

[start=3]
. In your AWS account, assign required policies for the new role `ch2-s3-servicerole-test`:

image::aws-sm-role-3.png[Assign policies for the new role]

[start=4]
. In your Amazon S3 Connector, set placeholder values for `accessKey` and `secretKey`. Additionally ensure `tryDefaultAWSCredentialsProviderChain` is set to `true.`

[source,xml,linenums]
----
<s3:config name="Amazon_S3_Configuration2" doc:name="Amazon S3 Configuration" doc:id="d72a7408-a62d-401d-a0a0-314936300bd4" >
<s3:role-connection roleARN="arn:aws:iam::111122223333:role/ch2-s3-servicerole-test" accessKey="dummyKey" secretKey="dummySecret" region="ap-southeast-2" tryDefaultAWSCredentialsProviderChain="true" />
</s3:config>
----

[start=5]
. In Anypoint Studio, open the *AWS Secrets Manager Properties Override Config* window, and set *Role ARN* (Amazon Resource Name) to the role in your AWS account:

image::aws-sm-role-4.png[Setting ROL ARN to the role in the AWS account]


== See Also
Expand Down