amazon-connect / amazon-connect-salesforce-lambda

Apache License 2.0
45 stars 34 forks source link

Package Does Not Deploy If Call Recording set to False #30

Closed noce2 closed 3 years ago

noce2 commented 3 years ago

What happens

When the application, arn:aws:serverlessrepo:us-west-2:821825267871:applications/AmazonConnectSalesforceLambda is deployed with PostcallRecordingImportEnabled set to false, the deployment fails with:

Template format error: Unresolved resource dependencies [sfSig4RequestToS3Role] in the Resources block of the template

What I expect

The deployment should succeed.

Failure Reason

The role sfSig4RequestToS3Role is not created when the parameter PostcallRecordingImportEnabled is set to false. However, the Arn of the role is unconditionally referenced here:

https://github.com/amazon-connect/amazon-connect-salesforce-lambda/blob/e9279e5de237d6b178b224a73cc475526ec925e4/sam-app/lambda_functions/template.yaml#L1042

Further Info:

Full Param List

Param Value -
AmazonConnectInstanceId * -
AmazonConnectQueueMaxRecords 100 -
AmazonConnectQueueMetricsMaxRecords 100 -
CTREventSourceMappingMaximumRetryAttempts 100 -
CTRKinesisARN arn:aws:kinesis:::stream/connect-ctr-primary-stream -
ConnectRecordingS3BucketName * -
ConnectReportingS3BucketName * -
ContactLensImportEnabled false -
HistoricalReportingImportEnabled true -
LambdaLoggingLevel INFO -
PostcallCTRImportEnabled true -
PostcallRecordingImportEnabled false -
PostcallTranscribeEnabled true -
PrivateVpcEnabled false -
RealtimeReportingImportEnabled true -
SalesforceAdapterNamespace amazonconnect -
SalesforceCredentialsKMSKeyARN * -
SalesforceCredentialsSecretsManagerARN arn:aws:secretsmanager::secret: -
SalesforceHost https://*.my.salesforce.com -
SalesforceProduction false -
SalesforceUsername Salesforce API Username -
SalesforceVersion v42.0 -
TranscribeOutputS3BucketName - -
TranscriptionJobCheckWaitTime 20 -
VpcSecurityGroupList - -
VpcSubnetList -
ramaniad commented 3 years ago

Good catch. The fix for this should be in a future release. For now, a workaround could be to manually deploy the lambda package using the cli and edit the template.

noce2 commented 3 years ago

Thanks for replying @ramaniad . Any indication when we might expect a fix?

yiming-amzn commented 3 years ago

Fix released in v5.15.3. Please let me know if there is any issues. Thanks for reporting the bug!