# NG SIEM- AWS CSPM Integration

##### **Introduction**

CSPM discovers and evaluates the services in your cloud environment, like storage, compute, IAM, and more, against hardening guidelines defined by the Center for Internet Security (CIS) to help you identify and remediate configurations risks like:

- Publicly exposed storage buckets
- IAM Users without MFA enabled
- Networking objects that allow ingress to remote server administration ports (22, 3389, etc.)

##### **Recommendation**

[](https://www.elastic.co/guide/en/security/current/cspm-get-started.html#cspm-set-up-cloud-access-section)**Set up cloud account access**

The CSPM integration requires access to AWS’s built-in [`SecurityAudit` IAM policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_security-auditor) in order to discover and evaluate resources in your cloud account. To provide access we need:

<div class="book" id="bkmrk-default-instance-rol" lang="en"><div class="section"><div class="ulist itemizedlist">- **IAM Role**
- **[Direct access keys](https://www.elastic.co/guide/en/security/current/cspm-get-started.html#cspm-use-keys-directly "Option 2 - Direct access keys")**

</div></div></div>[](https://www.elastic.co/guide/en/security/current/cspm-get-started.html#cspm-use-instance-role)**Create IAM User**

Follow AWS’s [IAM roles for Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html) documentation to create an IAM role using the IAM console, which automatically generates an instance profile.

<div class="book" id="bkmrk-create-an-iam-role%3A-" lang="en"><div class="section"><div class="olist orderedlist">1. Create an IAM role:
    
    <div class="olist orderedlist">
    1. In AWS, go to your IAM dashboard. Click <span class="strong strong">**Roles**</span>, then <span class="strong strong">**Create role**</span>.
    2. On the <span class="strong strong">**Select trusted entity**</span> page, under <span class="strong strong">**Trusted entity type**</span>, select <span class="strong strong">**AWS service**</span>.
    3. Under <span class="strong strong">**Use case**</span>, select <span class="strong strong">**EC2**</span>. Click <span class="strong strong">**Next**</span>.
    4. On the <span class="strong strong">**Add permissions**</span> page, search for and select `SecurityAudit`. Click <span class="strong strong">**Next**</span>.
    5. On the <span class="strong strong">**Name, review, and create**</span> page, name your role, then click <span class="strong strong">**Create role**</span>.
    
    </div>
2. Attach your new IAM role to an EC2 instance:
    
    <div class="olist orderedlist">
    1. In AWS, select an EC2 instance.
    2. Select <span class="strong strong">**Actions &gt; Security &gt; Modify IAM role**</span>.
    3. On the <span class="strong strong">**Modify IAM role**</span> page, search for and select your new IAM role.
    4. Click <span class="strong strong">**Update IAM role**</span>.
    
    </div>
3. **Create Direct access keys**
    
    Access keys are long-term credentials for an IAM user or AWS account root user. To use access keys as credentials, you must provide the `Access key ID` and the `Secret Access Key`. After you provide credentials, [finish manual setup](https://www.elastic.co/guide/en/security/current/cspm-get-started.html#cspm-finish-manual "Finish manual setup").
    
    For more details, refer to [Access Keys and Secret Access Keys](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html).
    
    <div class="book" id="bkmrk-access-key-id%3A-the-f" lang="en"><div class="section"><div class="ulist itemizedlist">
    - `Access key ID`: The first part of the access key.
    - `Secret Access Key`: The second part of the access key.
    
    </div></div></div>

</div></div></div><p class="callout info"><span class="TextRun SCXW161465391 BCX8" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXW161465391 BCX8" data-ccp-charstyle="eop">Please provide the following information to </span><span class="NormalTextRun SpellingErrorV2Themed SCXW161465391 BCX8" data-ccp-charstyle="eop">CyTech</span><span class="NormalTextRun SCXW161465391 BCX8" data-ccp-charstyle="eop">:</span></span><span class="EOP SCXW161465391 BCX8" data-ccp-props="{"201341983":0,"335559685":720,"335559739":160,"335559740":259}"> </span></p>

- **Access Key ID**
- **Secret Access Key**