{"id":13937,"date":"2022-03-09T20:29:06","date_gmt":"2022-03-09T20:29:06","guid":{"rendered":"https:\/\/exceptionly.com\/?p=13937"},"modified":"2022-06-29T16:34:11","modified_gmt":"2022-06-29T16:34:11","slug":"aws-iam-role-chaining-in-java-dynamodb-s3","status":"publish","type":"post","link":"https:\/\/exceptionly.com\/ar\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/","title":{"rendered":"AWS IAM Role Chaining in Java &#8211; DynamoDB, S3"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"13937\" class=\"elementor elementor-13937\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0b54aff elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0b54aff\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d380cf5\" data-id=\"d380cf5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-55ac891 elementor-widget elementor-widget-text-editor\" data-id=\"55ac891\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p dir=\"ltr\">Choosing between IAM roles or IAM users for accessing AWS resources is a matter of risk appetite you are taking. But for the fact, AWS encourages you to use IAM roles over the users.\u00a0<\/p><p dir=\"ltr\">IAM roles provide temporary credentials with the least privilege. However, unlike IAM users, it cannot make direct requests to an AWS resource; therefore, it is supposed to be assumed by an authorized entity such as IAM users, applications, or an EC2 service.<\/p><p dir=\"ltr\">This tutorial aims for a walkthrough guide about using the \u201cIAM role chaining between cross-accounts for accessing a resource such as DynamoDB or S3 Storage in Java language\u201d.<\/p><h2 id=\"tutorial_cross-account-with-roles-2\">Grant access to the IAM Roles\u00a0<\/h2><p>For the AWS role chaining example, I will proceed with the assumptions below;<\/p><ul><li aria-level=\"1\">I have two different AWS accounts that I named Account-A and Account-B<\/li><li aria-level=\"1\">The application instance is running in Account-A<\/li><li aria-level=\"1\">The resources I want to access are in Account-B (DynamoDB and S3)<\/li><\/ul><p>I imagine that I will need two different roles for such a scenario.<\/p><h3>Cross Account Sign Role<\/h3><p>Cross account access between Account-A and Account-B. This role provides the service instance access from Account-A to Account-B.<\/p><p>Role-1:\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2ff5b61 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2ff5b61\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-008836e\" data-id=\"008836e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c2cc1bc elementor-widget elementor-widget-code-highlight\" data-id=\"c2cc1bc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-dark copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-json \">\n\t\t\t\t<code readonly=\"true\" class=\"language-json\">\n\t\t\t\t\t<xmp>{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [{\n    \"Effect\": \"Allow\",\n    \"Action\": [\"sts:AssumeRole\"],\n    \"Resource\": \"arn:aws:iam::<Account-ID><\/Account-ID>:role\/CrossAccountSignRole\"\n  }]\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-62da139 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"62da139\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ea04442\" data-id=\"ea04442\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a8d593b elementor-widget elementor-widget-text-editor\" data-id=\"a8d593b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\u00a0** the permissions will be specified in the CrossAccountSignRole policy based on your needs!<\/p><h3>DynamoDB Execution Role<\/h3><p>This role will grant access to service instances for running queries over desired AWS resources such as DynamoDB or S3<\/p><p>Role-2:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-41e3172 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"41e3172\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e959200\" data-id=\"e959200\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5591da1 elementor-widget elementor-widget-code-highlight\" data-id=\"5591da1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-dark copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-json \">\n\t\t\t\t<code readonly=\"true\" class=\"language-json\">\n\t\t\t\t\t<xmp>   \"Statement\": [\n        {\n            \"Action\": [\n                \"dynamodb:DeleteItem\",\n                \"dynamodb:DescribeTable\",\n                \"dynamodb:GetItem\",\n                \"dynamodb:BatchGetItem\",\n                \"dynamodb:UpdateTimeToLive\",\n                \"dynamodb:BatchWriteItem\",\n                \"dynamodb:PutItem\",\n                \"dynamodb:Scan\",\n                \"dynamodb:Query\",\n                \"dynamodb:UpdateItem\",\n                \"dynamodb:UpdateTable\",\n                \"dynamodb:ListTables\",\n                \"dynamodb:List*\"\n            ],\n            \"Effect\": \"Allow\",\n            \"Resource\": [\n                \"arn:aws:dynamodb:eu-west-1:<Account-ID>:<Table-Name>\/\/index\/*\",\n                \"arn:aws:dynamodb:eu-west-1:<Account-ID>:table\/<Table-Name>\"\n            ],\n            \"Sid\": \"AllowDynamoDBReadWrite\"\n        }\n    ],\n    \"Version\": \"2012-10-17\"\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ed8d072 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ed8d072\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f83ca06\" data-id=\"f83ca06\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d527611 elementor-widget elementor-widget-text-editor\" data-id=\"d527611\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2>How does AWS IAM Role Chaining work?<\/h2><ol><li aria-level=\"1\">Create an Assume Role Provider for Role-A<\/li><li aria-level=\"1\">Create an Assume Role Provider for Role-B by giving Role-A credentials<\/li><li aria-level=\"1\">Use the Role-B provider as credentials for DynamoDB or S3 clients.<\/li><\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4c8ac67 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4c8ac67\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ee2d046\" data-id=\"ee2d046\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-152f287 elementor-widget elementor-widget-image\" data-id=\"152f287\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"420\" height=\"548\" src=\"https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws_role_chaining_1.png\" class=\"attachment-large size-large wp-image-13950\" alt=\"\" srcset=\"https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws_role_chaining_1.png 420w, https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws_role_chaining_1-230x300.png 230w\" sizes=\"(max-width: 420px) 100vw, 420px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b6942ab elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b6942ab\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ce37bb0\" data-id=\"ce37bb0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ca3e2ca elementor-widget elementor-widget-text-editor\" data-id=\"ca3e2ca\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2>AWS IAM Role Chaining Example in Java<\/h2><h3>Creating STS Client in Java<\/h3>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b94b703 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b94b703\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-30e64a8\" data-id=\"30e64a8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c1c985b elementor-widget elementor-widget-code-highlight\" data-id=\"c1c985b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-dark copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-java \">\n\t\t\t\t<code readonly=\"true\" class=\"language-java\">\n\t\t\t\t\t<xmp>private static AWSSecurityTokenServiceClientBuilder getStsClient(StsProperties props) {\n return AWSSecurityTokenServiceClientBuilder\n     .standard()\n     .withRegion(Regions.fromName(props.getRegion()))\n     .withClientConfiguration(getProxyClientConfig(props.getProxyHost(), props.getProxyPort()));\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-305eb2e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"305eb2e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3aca744\" data-id=\"3aca744\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7373e5f elementor-widget elementor-widget-text-editor\" data-id=\"7373e5f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>Creating Proxy Client<\/h3><p>Ideally, you will have a proxy server that brings an extra layer of security to protect you from data breaches and most hacker attacks, so the below code piece will show how to create a proxy client and attach it to the STS client later.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-70837f4 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"70837f4\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-561f56a\" data-id=\"561f56a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-aa5d76d elementor-widget elementor-widget-code-highlight\" data-id=\"aa5d76d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-dark copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-java \">\n\t\t\t\t<code readonly=\"true\" class=\"language-java\">\n\t\t\t\t\t<xmp>private static ClientConfiguration getProxyClientConfig(String proxyHost, String proxyPort) {\n ClientConfiguration clientConfiguration = new ClientConfiguration();\n clientConfiguration.setProxyHost(proxyHost);\n clientConfiguration.setProxyPort(Integer.parseInt(proxyPort));\n return clientConfiguration;\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f194ebe elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f194ebe\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9f7e4d5\" data-id=\"9f7e4d5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ca54d2a elementor-widget elementor-widget-text-editor\" data-id=\"ca54d2a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>Chaining Roles with AWS Assume Role Credentials Provider<\/h3><p>STSAssumeRoleSessionCredentialsProvider uses the AWS Security Token Service to assume a Role, and it creates temporary sessions for authentication. This provider will refresh credentials automatically with a background thread based on your duration specification. If you don&#8217;t want to use the auto-refresh mechanism that comes ready on your plate by AWS, you can create a custom credentials provider and override with your setup.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-276641d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"276641d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0670f3d\" data-id=\"0670f3d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c457bb6 elementor-widget elementor-widget-code-highlight\" data-id=\"c457bb6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-dark copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-java \">\n\t\t\t\t<code readonly=\"true\" class=\"language-java\">\n\t\t\t\t\t<xmp>public static STSAssumeRoleSessionCredentialsProvider getAWSCredentialsProviderChain(StsProperties props) {\n final String dynamoDbSessionName = \"dynamodb-session-\" + UUID.randomUUID();\n final String crossAccountSessionName = \"cross-account-session-\" + UUID.randomUUID();\n\n STSAssumeRoleSessionCredentialsProvider crossAccountProvider = new STSAssumeRoleSessionCredentialsProvider.Builder(props.getRoleArn(), crossAccountSessionName)\n     .withExternalId(props.getExternalId())\n     .withRoleSessionDurationSeconds(SESSION_DURATION_IN_SECONDS)\n     .withStsClient(getStsClient(props).build())\n     .build();\n\n return new STSAssumeRoleSessionCredentialsProvider.Builder(props.getExecutionRoleArn(), dynamoDbSessionName)\n     .withExternalId(props.getExecutionRoleExternalId())\n     .withRoleSessionDurationSeconds(SESSION_DURATION_IN_SECONDS)\n     .withStsClient(getStsClient(props).withCredentials(crossAccountProvider).build())\n     .build();\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ad82c1d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ad82c1d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-993b461\" data-id=\"993b461\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-276f505 elementor-widget elementor-widget-text-editor\" data-id=\"276f505\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2>How to Use AWS Credentials Provider in DynamoDB or S3?<\/h2><h3>Create DynamoDB Client with AWS Assume Role Credential Provider<\/h3>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-864c026 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"864c026\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a3947a0\" data-id=\"a3947a0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d52a53c elementor-widget elementor-widget-code-highlight\" data-id=\"d52a53c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-dark copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-java \">\n\t\t\t\t<code readonly=\"true\" class=\"language-java\">\n\t\t\t\t\t<xmp>public AmazonDynamoDB amazonDynamoDB() {\n return AmazonDynamoDBClientBuilder.standard()\n     .withRegion(Regions.EU_WEST_1)\n     .withCredentials(getAWSCredentialsProviderChain(props))\n     .build();\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3ac481d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3ac481d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3904041\" data-id=\"3904041\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-869aa63 elementor-widget elementor-widget-text-editor\" data-id=\"869aa63\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3>Create S3 Client with AWS Assume Role Credential Provider<\/h3>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ce42a5d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ce42a5d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e833e14\" data-id=\"e833e14\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e6b9162 elementor-widget elementor-widget-code-highlight\" data-id=\"e6b9162\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-dark copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-java \">\n\t\t\t\t<code readonly=\"true\" class=\"language-java\">\n\t\t\t\t\t<xmp>public AmazonS3 getS3Client(StsProperties stsProperties) {\n   return AmazonS3Client.builder()\n           .withCredentials(getAWSCredentialsProviderChain(props))\n           .withRegion(Regions.EU_WEST_1)\n           .build();\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e94fdd0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e94fdd0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a82401f\" data-id=\"a82401f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1569104 elementor-widget elementor-widget-text-editor\" data-id=\"1569104\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2 data-id=\"conclusion\"><strong>Conclusion<\/strong><\/h2><p>Exceptionly blog has excellent tutorials for challenging languages methodologies or tools.\u00a0<\/p><p>Feel free to explore some of my other posts in Java language;\u00a0<\/p><ul><li aria-level=\"1\"><a href=\"https:\/\/exceptionly.com\/2021\/12\/12\/welcome-to-quarkus-supersonic-kubernetes-native-java-framework\/\">Welcome to Quarkus: Supersonic, Kubernetes-Native Java Framework<\/a><\/li><li aria-level=\"1\"><a href=\"https:\/\/exceptionly.com\/2021\/07\/07\/how-to-start-coding-java-in-60-minutes\/\">Start Coding Java in 60 minutes<\/a><\/li><li aria-level=\"1\"><a href=\"https:\/\/exceptionly.com\/2021\/11\/29\/dockerize-a-spring-boot-application\/\">Dockerize a Spring Boot Application<\/a><\/li><li aria-level=\"1\"><a href=\"https:\/\/exceptionly.com\/2021\/10\/09\/concurrency-and-multithreading-in-java\/\">Concurrency and Multithreading in Java<\/a><\/li><li aria-level=\"1\"><a href=\"https:\/\/exceptionly.com\/2021\/08\/01\/5-top-common-mistakes-every-beginner-java-programmer-makes\/\">5 Top Common Mistakes Every Beginner Java Programmer Makes<\/a><\/li><li aria-level=\"1\"><a href=\"https:\/\/exceptionly.com\/2022\/02\/09\/swagger-2-with-spring-boot\/\">Setting Up Swagger 2 with Spring Boot<\/a><\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Choosing between IAM roles or IAM users for accessing AWS resources is a matter of the risk appetite you are taking. But for the fact, AWS encourages you to use IAM roles over the users.&nbsp; IAM roles provide temporary credentials with the least privilege. However, unlike IAM users, it cannot make direct requests to an [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":14049,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82],"tags":[187,138,206,212,185,183,184,143,217,186,216,215],"class_list":["post-13937","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-assume-role-credentials-provider","tag-aws","tag-backend","tag-devops","tag-dynamodb-client","tag-iam-role-chaining","tag-iam-users","tag-java","tag-reliability","tag-s3","tag-site","tag-site-reliability"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v18.5 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>AWS IAM Role Chaining in Java - DynamoDB, S3 - Exceptionly<\/title>\n<meta name=\"description\" content=\"This tutorial is aiming for a walkthrough guide about how to use the AWS IAM role chaining between cross-accounts for accessing a resource such as DynamoDB or S3 Storage in Java language\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/exceptionly.com\/ar\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/\" \/>\n<meta property=\"og:locale\" content=\"ar_AR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AWS IAM Role Chaining in Java - DynamoDB, S3\" \/>\n<meta property=\"og:description\" content=\"Choosing between IAM roles or IAM users for accessing AWS resources is a matter of the risk appetite you are taking. But for the fact, AWS encourages you\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exceptionly.com\/ar\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/\" \/>\n<meta property=\"og:site_name\" content=\"Exceptionly\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/exceptionly\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-09T20:29:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-29T16:34:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1930\" \/>\n\t<meta property=\"og:image:height\" content=\"766\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fatma Elverir\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@exceptionly\" \/>\n<meta name=\"twitter:site\" content=\"@exceptionly\" \/>\n<meta name=\"twitter:label1\" content=\"\u0643\u064f\u062a\u0628 \u0628\u0648\u0627\u0633\u0637\u0629\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatma Elverir\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0648\u0642\u062a \u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u064f\u0642\u062f\u0651\u0631\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u062f\u0642\u0627\u0626\u0642\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/\"},\"author\":{\"name\":\"Fatma Elverir\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#\\\/schema\\\/person\\\/a2600170dfb4513350affede916c0ccf\"},\"headline\":\"AWS IAM Role Chaining in Java &#8211; DynamoDB, S3\",\"datePublished\":\"2022-03-09T20:29:06+00:00\",\"dateModified\":\"2022-06-29T16:34:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/\"},\"wordCount\":499,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/exceptionly.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg\",\"keywords\":[\"Assume Role Credentials Provider\",\"AWS\",\"Backend\",\"DevOps\",\"DynamoDB Client\",\"IAM Role Chaining\",\"IAM Users\",\"Java\",\"Reliability\",\"S3\",\"Site\",\"Site Reliability\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"ar\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/\",\"url\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/\",\"name\":\"AWS IAM Role Chaining in Java - DynamoDB, S3 - Exceptionly\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/exceptionly.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg\",\"datePublished\":\"2022-03-09T20:29:06+00:00\",\"dateModified\":\"2022-06-29T16:34:11+00:00\",\"description\":\"This tutorial is aiming for a walkthrough guide about how to use the AWS IAM role chaining between cross-accounts for accessing a resource such as DynamoDB or S3 Storage in Java language\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/#breadcrumb\"},\"inLanguage\":\"ar\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/#primaryimage\",\"url\":\"https:\\\/\\\/exceptionly.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg\",\"contentUrl\":\"https:\\\/\\\/exceptionly.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg\",\"width\":1930,\"height\":766,\"caption\":\"AWS IAM Role Chaining Using Java, S3, and Dynamodb\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/2022\\\/03\\\/09\\\/aws-iam-role-chaining-in-java-dynamodb-s3\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/exceptionly.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS IAM Role Chaining in Java &#8211; DynamoDB, S3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#website\",\"url\":\"https:\\\/\\\/exceptionly.com\\\/\",\"name\":\"Exceptionly\",\"description\":\"Remote software talent acquisition at scale\",\"publisher\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/exceptionly.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ar\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#organization\",\"name\":\"Exceptionly\",\"url\":\"https:\\\/\\\/exceptionly.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/exceptionly.com\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/exceptionly-search-logo.png\",\"contentUrl\":\"https:\\\/\\\/exceptionly.com\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/exceptionly-search-logo.png\",\"width\":400,\"height\":400,\"caption\":\"Exceptionly\"},\"image\":{\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/exceptionly\\\/\",\"https:\\\/\\\/x.com\\\/exceptionly\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/exceptionly\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCet5wATTyif6knI0h4vUkNA\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/exceptionly.com\\\/#\\\/schema\\\/person\\\/a2600170dfb4513350affede916c0ccf\",\"name\":\"Fatma Elverir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93179e5b3e943c5bcda6ea20d6b37723c01dedb150ab7724bb4fb9af22eb3de6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93179e5b3e943c5bcda6ea20d6b37723c01dedb150ab7724bb4fb9af22eb3de6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93179e5b3e943c5bcda6ea20d6b37723c01dedb150ab7724bb4fb9af22eb3de6?s=96&d=mm&r=g\",\"caption\":\"Fatma Elverir\"},\"sameAs\":[\"https:\\\/\\\/exceptionly.com\"],\"url\":\"https:\\\/\\\/exceptionly.com\\\/ar\\\/author\\\/fatmaelverir\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"AWS IAM Role Chaining in Java - DynamoDB, S3 - Exceptionly","description":"This tutorial is aiming for a walkthrough guide about how to use the AWS IAM role chaining between cross-accounts for accessing a resource such as DynamoDB or S3 Storage in Java language","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/exceptionly.com\/ar\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/","og_locale":"ar_AR","og_type":"article","og_title":"AWS IAM Role Chaining in Java - DynamoDB, S3","og_description":"Choosing between IAM roles or IAM users for accessing AWS resources is a matter of the risk appetite you are taking. But for the fact, AWS encourages you","og_url":"https:\/\/exceptionly.com\/ar\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/","og_site_name":"Exceptionly","article_publisher":"https:\/\/www.facebook.com\/exceptionly\/","article_published_time":"2022-03-09T20:29:06+00:00","article_modified_time":"2022-06-29T16:34:11+00:00","og_image":[{"width":1930,"height":766,"url":"https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg","type":"image\/jpeg"}],"author":"Fatma Elverir","twitter_card":"summary_large_image","twitter_creator":"@exceptionly","twitter_site":"@exceptionly","twitter_misc":{"\u0643\u064f\u062a\u0628 \u0628\u0648\u0627\u0633\u0637\u0629":"Fatma Elverir","\u0648\u0642\u062a \u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u064f\u0642\u062f\u0651\u0631":"3 \u062f\u0642\u0627\u0626\u0642"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/#article","isPartOf":{"@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/"},"author":{"name":"Fatma Elverir","@id":"https:\/\/exceptionly.com\/#\/schema\/person\/a2600170dfb4513350affede916c0ccf"},"headline":"AWS IAM Role Chaining in Java &#8211; DynamoDB, S3","datePublished":"2022-03-09T20:29:06+00:00","dateModified":"2022-06-29T16:34:11+00:00","mainEntityOfPage":{"@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/"},"wordCount":499,"commentCount":1,"publisher":{"@id":"https:\/\/exceptionly.com\/#organization"},"image":{"@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/#primaryimage"},"thumbnailUrl":"https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg","keywords":["Assume Role Credentials Provider","AWS","Backend","DevOps","DynamoDB Client","IAM Role Chaining","IAM Users","Java","Reliability","S3","Site","Site Reliability"],"articleSection":["Tutorials"],"inLanguage":"ar","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/","url":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/","name":"AWS IAM Role Chaining in Java - DynamoDB, S3 - Exceptionly","isPartOf":{"@id":"https:\/\/exceptionly.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/#primaryimage"},"image":{"@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/#primaryimage"},"thumbnailUrl":"https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg","datePublished":"2022-03-09T20:29:06+00:00","dateModified":"2022-06-29T16:34:11+00:00","description":"This tutorial is aiming for a walkthrough guide about how to use the AWS IAM role chaining between cross-accounts for accessing a resource such as DynamoDB or S3 Storage in Java language","breadcrumb":{"@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/#breadcrumb"},"inLanguage":"ar","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/"]}]},{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/#primaryimage","url":"https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg","contentUrl":"https:\/\/exceptionly.com\/wp-content\/uploads\/2022\/03\/aws-iam-role-chaining-using-s3-java-dynamodb.jpg","width":1930,"height":766,"caption":"AWS IAM Role Chaining Using Java, S3, and Dynamodb"},{"@type":"BreadcrumbList","@id":"https:\/\/exceptionly.com\/2022\/03\/09\/aws-iam-role-chaining-in-java-dynamodb-s3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/exceptionly.com\/"},{"@type":"ListItem","position":2,"name":"AWS IAM Role Chaining in Java &#8211; DynamoDB, S3"}]},{"@type":"WebSite","@id":"https:\/\/exceptionly.com\/#website","url":"https:\/\/exceptionly.com\/","name":"Exceptionly","description":"Remote software talent acquisition at scale","publisher":{"@id":"https:\/\/exceptionly.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exceptionly.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ar"},{"@type":"Organization","@id":"https:\/\/exceptionly.com\/#organization","name":"Exceptionly","url":"https:\/\/exceptionly.com\/","logo":{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/exceptionly.com\/#\/schema\/logo\/image\/","url":"https:\/\/exceptionly.com\/wp-content\/uploads\/2021\/05\/exceptionly-search-logo.png","contentUrl":"https:\/\/exceptionly.com\/wp-content\/uploads\/2021\/05\/exceptionly-search-logo.png","width":400,"height":400,"caption":"Exceptionly"},"image":{"@id":"https:\/\/exceptionly.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/exceptionly\/","https:\/\/x.com\/exceptionly","https:\/\/www.linkedin.com\/company\/exceptionly\/","https:\/\/www.youtube.com\/channel\/UCet5wATTyif6knI0h4vUkNA"]},{"@type":"Person","@id":"https:\/\/exceptionly.com\/#\/schema\/person\/a2600170dfb4513350affede916c0ccf","name":"Fatma Elverir","image":{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/secure.gravatar.com\/avatar\/93179e5b3e943c5bcda6ea20d6b37723c01dedb150ab7724bb4fb9af22eb3de6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/93179e5b3e943c5bcda6ea20d6b37723c01dedb150ab7724bb4fb9af22eb3de6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93179e5b3e943c5bcda6ea20d6b37723c01dedb150ab7724bb4fb9af22eb3de6?s=96&d=mm&r=g","caption":"Fatma Elverir"},"sameAs":["https:\/\/exceptionly.com"],"url":"https:\/\/exceptionly.com\/ar\/author\/fatmaelverir\/"}]}},"_links":{"self":[{"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/posts\/13937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/comments?post=13937"}],"version-history":[{"count":0,"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/posts\/13937\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/media\/14049"}],"wp:attachment":[{"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/media?parent=13937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/categories?post=13937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exceptionly.com\/ar\/wp-json\/wp\/v2\/tags?post=13937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}