Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Amazon Web Services Foundations v7.0.0 · 2.20

The AWSCloudShellFullAccess policy should not be attached to users, groups or roles

  • Level 1

This check looks at where the AWS managed policy AWSCloudShellFullAccess is attached in your account. The safe setting is that it is attached to no identity, and people who need CloudShell get a narrower custom policy instead.

Why it matters

AWSCloudShellFullAccess uses a wildcard to give an identity every CloudShell action. That includes generating pre-signed URLs to upload and download files and forwarding your console credentials into the shell, which widens what a user can do with the shell beyond what most roles need.

AWS documents that CloudShell permissions can be restricted with custom policies, for example by denying the file upload and download actions, or by denying credential forwarding. Using the full-access policy skips that choice. Granting only the actions people need is the usual least-privilege approach.

Source: AWS documentation, Managing AWS CloudShell access and usage with IAM policies.

How to check it yourself

In the IAM console open Policies, search for AWSCloudShellFullAccess, select it and open the Entities attached tab. The list should be empty.

Read-only with the AWS CLI:

aws iam list-entities-for-policy \
  --policy-arn arn:aws:iam::aws:policy/AWSCloudShellFullAccess

The output lists PolicyGroups, PolicyUsers and PolicyRoles. Any entry in one of them means the policy is attached. Also look for inline or copied policies that grant cloudshell:*, since those give the same access.

How to fix it

Replace the managed policy with a custom one that grants only what people need. AWS documents the four actions required to launch CloudShell: cloudshell:CreateEnvironment, cloudshell:CreateSession, cloudshell:GetEnvironmentStatus and cloudshell:StartEnvironment. A custom policy might look like this:

{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid": "CloudShellUser",
    "Effect": "Allow",
    "Action": [
      "cloudshell:CreateEnvironment",
      "cloudshell:CreateSession",
      "cloudshell:GetEnvironmentStatus",
      "cloudshell:StartEnvironment"
    ],
    "Resource": "*"
  }]
}
  • In IAM, create a customer managed policy with the statement above.
  • Attach it to the groups or roles that need CloudShell.
  • Detach AWSCloudShellFullAccess from every entity listed by the check.

The detach step is a change to your account, for example aws iam detach-role-policy, so run it yourself once the replacement is in place. ConfigCobra never changes your AWS account; it reports the finding and suggests the steps.

What changes when you fix it

People who relied on the full-access policy lose the actions that are not in the narrower policy. With the example above that means no file upload or download through the CloudShell web interface and no automatic forwarding of console credentials, so they must configure credentials inside the shell themselves.

Users who still need file transfer or credential forwarding can be given just those actions. Existing CloudShell environments keep running, and AWS notes that restricting environment creation does not remove an environment that already exists. Tell the affected teams before you detach the policy, because a missing permission shows up to them as an access-denied error when they open CloudShell.

Included in

BenchmarkCIS IDProfile
CIS Amazon Web Services Foundations v7.0.02.20Level 1

Check this on your AWS

ConfigCobra runs this check with every other control of the CIS Amazon Web Services Benchmarks, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial