{"id":32528,"date":"2026-11-30T22:08:09","date_gmt":"2026-11-30T22:08:09","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=32528"},"modified":"2026-11-30T22:08:09","modified_gmt":"2026-11-30T22:08:09","slug":"how-to-set-security-credentials-in-a-aws-code-build","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-set-security-credentials-in-a-aws-code-build\/","title":{"rendered":"How to set Security Credentials in a AWS Code Build"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">AWS CodeBuild should get its AWS credentials from an IAM service role attached to the build project, not from access keys typed into environment variables. This guide explains how to set up that role, check which identity a build uses, and load secrets such as API tokens and passwords from Parameter Store or Secrets Manager. It also corrects the insecure steps in the original post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To set security credentials in AWS CodeBuild, you can use the AWS CLI or the CodeBuild console.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using the AWS CLI:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Run the command <code>aws configure<\/code> to set up your credentials.<\/li>\n\n\n\n<li>Type in your AWS access key and secret key when prompted.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Using the CodeBuild console:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the CodeBuild console and select the project you want to set the credentials for.<\/li>\n\n\n\n<li>Click on the &#8220;Edit&#8221; button in the &#8220;Environment&#8221; section.<\/li>\n\n\n\n<li>In the &#8220;Environment Variables&#8221; section, click on the &#8220;Add environment variable&#8221; button.<\/li>\n\n\n\n<li>In the &#8220;Name&#8221; field, enter &#8220;AWS_ACCESS_KEY_ID&#8221; and in the &#8220;Value&#8221; field, enter your access key.<\/li>\n\n\n\n<li>Click on the &#8220;Add environment variable&#8221; button again and enter &#8220;AWS_SECRET_ACCESS_KEY&#8221; in the &#8220;Name&#8221; field and your secret key in the &#8220;Value&#8221; field.<\/li>\n\n\n\n<li>Click on the &#8220;Save&#8221; button to save your changes.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You can also use IAM roles to give CodeBuild access to other AWS resou<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Corrections to the steps above<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The steps above will work in a narrow sense, but they teach a pattern AWS advises against. Each problem and its fix is listed below.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Original step<\/th><th>Problem<\/th><th>Correct approach<\/th><\/tr><\/thead><tbody><tr><td>Run <code>aws configure<\/code> to set credentials<\/td><td>This writes <code>~\/.aws\/credentials<\/code> on the machine where you run it. It has no effect on CodeBuild containers. Inside a buildspec it also fails because it waits for interactive input.<\/td><td>Attach an IAM <strong>service role<\/strong> to the build project. CodeBuild provides temporary credentials for that role to the container automatically.<\/td><\/tr><tr><td>Add <code>AWS_ACCESS_KEY_ID<\/code> and <code>AWS_SECRET_ACCESS_KEY<\/code> as environment variables<\/td><td>Plaintext environment variables appear in the console and in <code>batch-get-projects<\/code> API output. The keys are long-lived, and they override the service role in the SDK credential chain.<\/td><td>Grant the needed permissions to the service role. Store any other secrets as <code>PARAMETER_STORE<\/code> or <code>SECRETS_MANAGER<\/code> variables.<\/td><\/tr><tr><td>Final sentence is cut off (&quot;other AWS resou&quot;)<\/td><td>The step that actually solves the problem is missing.<\/td><td>IAM roles are the main method, not an alternative. The sections below cover them in full.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> If you already put access keys into a CodeBuild project, delete those variables and <strong>deactivate and delete the keys<\/strong> in IAM. Anyone with <code>codebuild:BatchGetProjects<\/code> permission may already have read them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How CodeBuild gets AWS credentials<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every CodeBuild project has a service role. When a build starts, CodeBuild assumes that role and gives the container temporary, automatically rotated credentials through the container credentials endpoint (the <code>AWS_CONTAINER_CREDENTIALS_RELATIVE_URI<\/code> variable). The AWS CLI and all AWS SDKs read this endpoint by default. Commands like <code>aws s3 cp<\/code> or <code>aws ecr get-login-password<\/code> therefore work without any configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In short: <strong>decide what the build needs to do, and grant exactly those permissions to the service role.<\/strong> For credentials that are not from AWS, such as a Docker Hub token, a database password or a third-party API key, store the value in Systems Manager Parameter Store or Secrets Manager. The build then reads it through the role.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create a service role for CodeBuild<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The console can create a role for you when you create a project (&quot;New service role&quot;). Creating it yourself gives you control over the permissions. The trust policy below allows CodeBuild to assume the role:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JSON \/ JSON with Comments\" data-shcb-language-slug=\"json\"><span><code class=\"hljs language-json\">{\n  <span class=\"hljs-attr\">\"Version\"<\/span>: <span class=\"hljs-string\">\"2012-10-17\"<\/span>,\n  <span class=\"hljs-attr\">\"Statement\"<\/span>: &#91;\n    {\n      <span class=\"hljs-attr\">\"Effect\"<\/span>: <span class=\"hljs-string\">\"Allow\"<\/span>,\n      <span class=\"hljs-attr\">\"Principal\"<\/span>: { <span class=\"hljs-attr\">\"Service\"<\/span>: <span class=\"hljs-string\">\"codebuild.amazonaws.com\"<\/span> },\n      <span class=\"hljs-attr\">\"Action\"<\/span>: <span class=\"hljs-string\">\"sts:AssumeRole\"<\/span>\n    }\n  ]\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JSON \/ JSON with Comments<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">json<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The permissions policy below covers CloudWatch Logs (which every build needs), one S3 artifact bucket, and reading the specific parameters and secrets the build uses. Replace the region, account ID and resource names with your own.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JSON \/ JSON with Comments\" data-shcb-language-slug=\"json\"><span><code class=\"hljs language-json\">{\n  <span class=\"hljs-attr\">\"Version\"<\/span>: <span class=\"hljs-string\">\"2012-10-17\"<\/span>,\n  <span class=\"hljs-attr\">\"Statement\"<\/span>: &#91;\n    {\n      <span class=\"hljs-attr\">\"Effect\"<\/span>: <span class=\"hljs-string\">\"Allow\"<\/span>,\n      <span class=\"hljs-attr\">\"Action\"<\/span>: &#91;<span class=\"hljs-string\">\"logs:CreateLogGroup\"<\/span>, <span class=\"hljs-string\">\"logs:CreateLogStream\"<\/span>, <span class=\"hljs-string\">\"logs:PutLogEvents\"<\/span>],\n      <span class=\"hljs-attr\">\"Resource\"<\/span>: <span class=\"hljs-string\">\"arn:aws:logs:us-east-1:123456789012:log-group:\/aws\/codebuild\/my-app-build*\"<\/span>\n    },\n    {\n      <span class=\"hljs-attr\">\"Effect\"<\/span>: <span class=\"hljs-string\">\"Allow\"<\/span>,\n      <span class=\"hljs-attr\">\"Action\"<\/span>: &#91;<span class=\"hljs-string\">\"s3:GetObject\"<\/span>, <span class=\"hljs-string\">\"s3:PutObject\"<\/span>],\n      <span class=\"hljs-attr\">\"Resource\"<\/span>: <span class=\"hljs-string\">\"arn:aws:s3:::my-artifact-bucket\/*\"<\/span>\n    },\n    {\n      <span class=\"hljs-attr\">\"Effect\"<\/span>: <span class=\"hljs-string\">\"Allow\"<\/span>,\n      <span class=\"hljs-attr\">\"Action\"<\/span>: &#91;<span class=\"hljs-string\">\"ssm:GetParameters\"<\/span>],\n      <span class=\"hljs-attr\">\"Resource\"<\/span>: <span class=\"hljs-string\">\"arn:aws:ssm:us-east-1:123456789012:parameter\/myapp\/prod\/*\"<\/span>\n    },\n    {\n      <span class=\"hljs-attr\">\"Effect\"<\/span>: <span class=\"hljs-string\">\"Allow\"<\/span>,\n      <span class=\"hljs-attr\">\"Action\"<\/span>: &#91;<span class=\"hljs-string\">\"secretsmanager:GetSecretValue\"<\/span>],\n      <span class=\"hljs-attr\">\"Resource\"<\/span>: <span class=\"hljs-string\">\"arn:aws:secretsmanager:us-east-1:123456789012:secret:prod\/myapp\/*\"<\/span>\n    }\n  ]\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JSON \/ JSON with Comments<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">json<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Create the role and attach the policies with the AWS CLI. Run these commands on your workstation, not inside the build:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">aws iam create-role \\\n  --role-name codebuild-my-app-role \\\n  --assume-role-policy-<span class=\"hljs-built_in\">document<\/span> file:<span class=\"hljs-comment\">\/\/trust-policy.json<\/span>\n\naws iam put-role-policy \\\n  --role-name codebuild-my-app-role \\\n  --policy-name codebuild-my-app-permissions \\\n  --policy-<span class=\"hljs-built_in\">document<\/span> file:<span class=\"hljs-comment\">\/\/permissions-policy.json<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> If a parameter or secret is encrypted with a customer managed KMS key, the role also needs <code>kms:Decrypt<\/code> on that key. Secrets encrypted with the AWS managed key do not need this extra permission.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Attach the role to the build project<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the CodeBuild console, select the project and choose <strong>Edit<\/strong>.<\/li>\n\n\n<li>In the <strong>Environment<\/strong> section, under <strong>Service role<\/strong>, choose <strong>Existing service role<\/strong> and select <code>codebuild-my-app-role<\/code>.<\/li>\n\n\n<li>Remove any <code>AWS_ACCESS_KEY_ID<\/code>, <code>AWS_SECRET_ACCESS_KEY<\/code> or <code>AWS_SESSION_TOKEN<\/code> environment variables. If they are present, the CLI uses them instead of the role.<\/li>\n\n\n<li>Save the project.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The same change can be made from the CLI:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">aws codebuild update-project \\\n  --name my-app-build \\\n  --service-role arn:aws:iam::123456789012:role\/codebuild-my-app-role<\/code><\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Load secrets in the buildspec<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Reference secrets in the <code>env<\/code> block of <code>buildspec.yml<\/code>. CodeBuild fetches them with the service role when the build starts and exposes them as environment variables. Their values are masked in build logs.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">version: <span class=\"hljs-number\">0.2<\/span>\n\nenv:\n  variables:\n    APP_ENV: <span class=\"hljs-string\">\"prod\"<\/span>                          <span class=\"hljs-comment\"># non-sensitive, plaintext is fine<\/span>\n  parameter-store:\n    DB_PASSWORD: <span class=\"hljs-string\">\"\/myapp\/prod\/db_password\"<\/span>    <span class=\"hljs-comment\"># SecureString parameter name<\/span>\n  secrets-manager:\n    DOCKERHUB_TOKEN: <span class=\"hljs-string\">\"prod\/myapp\/dockerhub:token\"<\/span>   <span class=\"hljs-comment\"># secret-id:json-key<\/span>\n\nphases:\n  pre_build:\n    commands:\n      - aws sts get-caller-identity\n      - <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"$DOCKERHUB_TOKEN\"<\/span> | docker login -u myuser --password-stdin\n  build:\n    commands:\n      - .\/deploy.sh<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The full Secrets Manager reference format is <code>secret-id:json-key:version-stage:version-id<\/code>. Leave out the trailing parts to get the current version, or leave out the JSON key to get the whole secret string. If you prefer to keep secret references in the project instead of the buildspec, add environment variables in the console and set <strong>Type<\/strong> to <strong>Parameter<\/strong> or <strong>Secrets Manager<\/strong>. Set the value to the parameter name or secret ID, not the secret itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check which identity the build uses with the output of <code>aws sts get-caller-identity<\/code>. It should look like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JSON \/ JSON with Comments\" data-shcb-language-slug=\"json\"><span><code class=\"hljs language-json\">{\n    <span class=\"hljs-attr\">\"UserId\"<\/span>: <span class=\"hljs-string\">\"AROAEXAMPLEID:AWSCodeBuild-...\"<\/span>,\n    <span class=\"hljs-attr\">\"Account\"<\/span>: <span class=\"hljs-string\">\"123456789012\"<\/span>,\n    <span class=\"hljs-attr\">\"Arn\"<\/span>: <span class=\"hljs-string\">\"arn:aws:sts::123456789012:assumed-role\/codebuild-my-app-role\/AWSCodeBuild-...\"<\/span>\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JSON \/ JSON with Comments<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">json<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">If the ARN shows <code>:user\/<\/code> instead of <code>assumed-role<\/code>, static keys are still set somewhere in the project or in the buildspec.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Deploying to another AWS account<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use role assumption, not stored keys. In the target account, create a role whose trust policy allows the CodeBuild service role ARN to assume it. Give the CodeBuild service role <code>sts:AssumeRole<\/code> on that target role. Then use a named profile that sources its credentials from the container:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">phases:\n  pre_build:\n    commands:\n      - mkdir -p ~\/.aws\n      - |\n        cat &gt; ~\/.aws\/config &lt;&lt;<span class=\"hljs-string\">'EOF'<\/span>\n        &#91;profile target]\n        role_arn = arn:aws:iam::<span class=\"hljs-number\">210987654321<\/span>:role\/deploy-from-codebuild\n        credential_source = EcsContainer\n        EOF\n  build:\n    commands:\n      - aws sts get-caller-identity --profile target\n      - aws s3 sync .\/dist s3:<span class=\"hljs-comment\">\/\/target-site-bucket --profile target<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><code>credential_source = EcsContainer<\/code> tells the CLI to use the CodeBuild role credentials as the base identity and then assume <code>role_arn<\/code>. The CLI refreshes the temporary credentials automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common errors and fixes<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Error<\/th><th>Cause<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td><code>... is not authorized to perform: ssm:GetParameters<\/code><\/td><td>The service role cannot read the parameter<\/td><td>Add <code>ssm:GetParameters<\/code> for that parameter ARN to the role<\/td><\/tr><tr><td><code>Secrets Manager error<\/code> or <code>AccessDeniedException<\/code> on <code>GetSecretValue<\/code><\/td><td>Permission missing, wrong secret ID or JSON key, or a customer managed KMS key without <code>kms:Decrypt<\/code><\/td><td>Check the reference format and the role policy, and add KMS permissions if needed<\/td><\/tr><tr><td><code>ParameterNotFound<\/code><\/td><td>Wrong name, or the parameter exists in a different region from the project<\/td><td>Use the full name including the leading <code>\/<\/code>, in the same region<\/td><\/tr><tr><td><code>AccessDenied<\/code> even though the role has the permission<\/td><td>Static key variables override the role<\/td><td>Remove <code>AWS_ACCESS_KEY_ID<\/code> and <code>AWS_SECRET_ACCESS_KEY<\/code> from the project and the buildspec<\/td><\/tr><tr><td>Build hangs or fails at <code>aws configure<\/code><\/td><td>Interactive command with no input available<\/td><td>Remove it. CodeBuild does not need <code>aws configure<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Security best practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use one service role per project or pipeline stage, scoped to specific resource ARNs rather than <code>*<\/code>.<\/li>\n\n\n<li>Never put secrets in <code>env: variables<\/code> or plaintext project variables. Use <code>parameter-store<\/code> or <code>secrets-manager<\/code>.<\/li>\n\n\n<li>Avoid <code>echo<\/code>ing secrets or running <code>env<\/code> or <code>printenv<\/code> in build commands. Log masking helps but does not catch transformed values.<\/li>\n\n\n<li>Builds from pull requests on public repositories can run untrusted code with your role&#039;s permissions. Restrict webhook filters and keep those roles minimal.<\/li>\n\n\n<li>Review the role&#039;s activity with CloudTrail, and remove permissions that are no longer used.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For more on cloud security controls, see <a href=\"https:\/\/www.devopsschool.com\/blog\/category\/security\/\">More Security tutorials<\/a> and the <a href=\"https:\/\/www.devopsschool.com\/blog\/cybersecurity-and-information-security-complete-tutorial-collection\/\">Cybersecurity and Information Security tutorial collection<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need to run aws configure in CodeBuild?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. CodeBuild gives the build container temporary credentials for the project&#039;s service role, and the AWS CLI and SDKs pick them up automatically. Running <code>aws configure<\/code> in a buildspec fails because it waits for interactive input.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is it safe to store AWS access keys as CodeBuild environment variables?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Plaintext variables can be read in the console and through the API, and the keys are long-lived. Use the service role for AWS access, and Parameter Store or Secrets Manager variable types for other secrets.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I use a Secrets Manager secret in buildspec.yml?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add it under <code>env: secrets-manager:<\/code> as <code>VAR_NAME: secret-id:json-key<\/code>, and grant the service role <code>secretsmanager:GetSecretValue<\/code> on that secret. CodeBuild injects the value as an environment variable and masks it in logs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How can a CodeBuild project deploy to a different AWS account?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a role in the target account that trusts the CodeBuild service role, and allow <code>sts:AssumeRole<\/code> on it. In the build, use a CLI profile with <code>role_arn<\/code> and <code>credential_source = EcsContainer<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I check which credentials my build is using?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>aws sts get-caller-identity<\/code> in the build. The ARN should show <code>assumed-role\/&lt;your-codebuild-role&gt;<\/code>. If it shows an IAM user, static keys are overriding the role.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related tutorials<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/category\/cloud-computing\/aws\/\">More AWS tutorials<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/category\/security\/\">More Security tutorials<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/software-delivery-workflow-master-tutorial\/\">Software Delivery Workflow Master Tutorial<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/cybersecurity-and-information-security-complete-tutorial-collection\/\">Cybersecurity and Information Security \u2013 Complete Tutorial Collection<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>AWS CodeBuild should get its AWS credentials from an IAM service role attached to the build project, not from access keys typed into environment variables. This guide&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5633,24460],"tags":[1392,26242,1074],"class_list":["post-32528","post","type-post","status-publish","format-standard","hentry","category-aws","category-security","tag-aws-cli","tag-aws-iam","tag-environment-variables"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=32528"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32528\/revisions"}],"predecessor-version":[{"id":80466,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32528\/revisions\/80466"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=32528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=32528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=32528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}