amazon-connect / amazon-connect-salesforce-scv

This repository contains resources, examples, and projects to help Service Cloud Voice customers address some common requirements as they deploy Service Cloud Voice.
Apache License 2.0
52 stars 54 forks source link

CTRLogger Template Deployment Error #145

Open brandon-hall1 opened 2 years ago

brandon-hall1 commented 2 years ago

On line 87 of awsscv-ctr-logger.yaml, the role "awsscv_common_role" is referred to however the common role was created with the Connect Instance alias appended to the end using the format "awsscv_common_role_ConnectInstanceAlias".

This caused the entire stack to fail unless the role name was manually changed within the template.

brandon-hall1 commented 2 years ago

Also, the S3 access policy created didn't seem to provide appropriate access to the ctr-logger bucket. Adding another resource with /* appended to the end of the bucket ARN seems to have fixed this.

S3 Access Error: [ERROR] ClientError: An error occurred (AccessDenied) when calling the PutObject operation: Access Denied Traceback (most recent call last): File "/var/task/awsscv_ctr_logger.py", line 22, in lambda_handler log_to_s3(payload) File "/var/task/awsscv_ctr_logger.py", line 30, in log_to_s3 s3_client.put_object(Body=json.dumps(record, skipkeys = True, indent = 2), Bucket=s3_bucket, Key=contactId + '.json') File "/var/runtime/botocore/client.py", line 391, in _api_call return self._make_api_call(operation_name, kwargs) File "/var/runtime/botocore/client.py", line 719, in _make_api_call raise error_class(parsed_response, operation_name)