Summary:


in order to be able to automatize the integration of AWS CloudWatch this could be achieved by using our REST API



Environment:


Aqua CSP 4.6 / 5.0



Solution:

This could achieved by using the below REST API calls, 


1) In order to configure it you will need to use, 


PUT -- {{SERVER_URL}}/api/v1/settings/log_services/CloudWatch



Request payload:

{

    "enable": true,

    "name": "CloudWatch",

    "region": "{{AWS_REGION}}",

    "loggroup": "{{AWS_LOG_GROUP}}",

    "key": "{{Secret Access Key}}",

    "keyid": "{{Access Key ID}}",

    "logo": "awscloudwatch"

}



2) In order to check connectivity, 


POST -- {{SERVER_URL}}/api/v1/settings/log_services/CloudWatch/test



Request payload:

{

    "enable": true,

    "name": "CloudWatch",

    "region": "{{AWS_REGION}}",

    "loggroup": "{{AWS_LOG_GROUP}}",

    "key": "",

    "keyid": "{{Access Key ID}}",

    "displayName": "Amazon CloudWatch",

    "logo": "awscloudwatch"

}



Related Information:


https://docs.aquasec.com/v4.5/reference

https://docs.aquasec.com/v4.5/docs/cloudwatch-integration