AWS connectors

There are four connectors that can be used to invoke different Amazon Web Services (AWS):

All Amazon connectors are displayed on the process diagram with their respective AWS logos.

Important: All AWS connectors require an AWS account with permission to access the features provided by Amazon. This account is separate to the Alfresco hosted environment and should be created and managed by customers.

Lambda

The INVOKE action is used by the Lambda connector to invoke Amazon Web Services (AWS) Lambda functions.

The input parameters to invoke a Lambda function are:

ParameterTypeDescription
functionStringRequired. The name of the Lambda function to invoke, for example lambda-2.
payloadJSONOptional. The payload that will be passed to the Lambda function as a JSON object.

The output parameters from invoking a Lambda function are:

ParameterTypeDescription
lambdaPayloadJSONOptional. The Lambda function results payload.
lambdaStatusIntegerOptional. The Lambda function invocation status code.
lambdaLogStringOptional. The log produced during the function invocation.

Lambda configuration parameters

The configuration parameters for the Lambda connector are:

ParameterDescription
AWS_LAMBDA_AWS_ACCESS_KEYRequired. The access key to authenticate against AWS with.
AWS_LAMBDA_AWS_SECRET_KEYRequired. The secret key to authenticate against AWS with.
AWS_LAMBDA_AWS_REGIONRequired. The region of AWS to invoke the Lambda functions in.

Lambda errors

The possible errors that can be handled by the Lambda connector are:

ErrorDescription
MISSING_INPUTA mandatory input variable was not provided.
INVALID_INPUTThe input variable has an invalid type.
SERVICE_ERRORThe service encountered an internal error.
INVALID_REQUESTThe request body could not be parsed as JSON.
REQUEST_TOO_LARGEThe request payload exceeded the Invoke request body JSON input limit.
UNKNOWN_ERRORUnexpected runtime error.
BAD_REQUESTThe server could not understand the request due to invalid syntax.
UNAUTHORIZEDThe request has not been applied because it lacks valid authentication.
FORBIDDENThe server understood the request but refuses to authorize it.
NOT_FOUNDThe server could not find what was requested.
METHOD_NOT_ALLOWEDThe request method is known by the server but is not supported.
NOT_ACCEPTABLEThe server cannot produce a response matching the list of acceptable values.
REQUEST_TIMEOUTThe server would like to shut down this unused connection.
CONFLICTThe request conflicts with current state of the server.
GONENo longer available.
UNPROCESSABLE_ENTITYThe server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
LOCKEDThe resource that is being accessed is locked.
FAILED_DEPENDENCYThe request failed due to failure of a previous request.
INTERNAL_SERVER_ERRORThe server has encountered a situation it doesn't know how to handle.
NOT_IMPLEMENTEDThe request method is not supported by the server and cannot be handled.
BAD_GATEWAYThe server got an invalid response.
SERVICE_UNAVAILABLEThe server is not ready to handle the request.
GATEWAY_TIMEOUTThe server is acting as a gateway and cannot get a response in time.

Comprehend

The ENTITY action is used by the Comprehend connector to execute Amazon Comprehend natural language processing (NLP) services and identify and analyze text from UTF-8 plain text files.

The Amazon Comprehend APIs that are called using the connector are:

The input parameters of the Comprehend connector are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to send for analysis.
textStringRequires one. Raw text to be sent for analysis.
mediaTypeStringOptional. The media type of the file to be analyzed, for example application/octect-stream.
maxEntitiesIntegerOptional. The maximum number of entities to be extracted, for example 5.
confidenceLevelStringOptional The confidence level to use in the analysis between 0 and 1, for example 0.75.
timeoutIntegerOptional. The timeout period for calling the Comprehend service in milliseconds, for example 910000.

The output parameters from the Comprehend analysis are:

ParameterTypeDescription
awsResponseJSONOptional. The result of the analysis from the Comprehend service.
aisResponseJSONOptional. The result of the analysis in Alfresco Intelligence Service format.
entitiesJSONOptional. The result object containing the entities detected.

Comprehend configuration parameters

The configuration parameters for the Comprehend connector are:

ParameterDescription
AWS_ACCESS_KEY_IDRequired. The access key to authenticate against AWS with.
AWS_SECRET_KEYRequired. The secret key to authenticate against AWS with.
AWS_REGIONRequired. The region of AWS to use the Comprehend service in.
AWS_S3_BUCKETRequired. The name of the S3 bucket to use.
AWS_COMPREHEND_ROLE_ARNRequired. The Amazon Resource Name for Comprehend to use.

Comprehend errors

The possible errors that can be handled by the Comprehend connector are:

ErrorDescription
MISSING_INPUTA mandatory input variable was not provided.
INVALID_INPUTThe input variable has an invalid type.
INVALID_RESULT_FORMATThe REST service result payload cannot be parsed.
TEXT_SIZE_LIMIT_EXCEEDEDThe size of the input text exceeds the limit.
TOO_MANY_REQUESTThe request throughput limit was exceeded.
UNSUPPORTED_LANGUAGEThe language of the input text can't be processed.
CLIENT_EXECUTION_TIMEOUTThe execution ends because of timeout.
UNKNOWN_ERRORUnexpected runtime error.
BAD_REQUESTThe server could not understand the request due to invalid syntax.
UNAUTHORIZEDThe request has not been applied because it lacks valid authentication.
FORBIDDENThe server understood the request but refuses to authorize it.
NOT_FOUNDThe server could not find what was requested.
METHOD_NOT_ALLOWEDThe request method is known by the server but is not supported.
NOT_ACCEPTABLEThe server cannot produce a response matching the list of acceptable values.
REQUEST_TIMEOUTThe server would like to shut down this unused connection.
CONFLICTThe request conflicts with current state of the server.
GONENo longer available.
UNPROCESSABLE_ENTITYThe server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
LOCKEDThe resource that is being accessed is locked.
FAILED_DEPENDENCYThe request failed due to failure of a previous request.
INTERNAL_SERVER_ERRORThe server has encountered a situation it doesn't know how to handle.
NOT_IMPLEMENTEDThe request method is not supported by the server and cannot be handled.
BAD_GATEWAYThe server got an invalid response.
SERVICE_UNAVAILABLEThe server is not ready to handle the request.
GATEWAY_TIMEOUTThe server is acting as a gateway and cannot get a response in time.

Rekognition

The LABEL action is used by the Rekognition connector to execute Amazon Rekognition services to identify and label the objects in JPEG and PNG files that are less than 15mb in size.

The Amazon Rekognition API that is called is the Detect Labels API.

Files between 5mb and 15mb are uploaded to an Amazon S3 bucket before processing. The IAM user configured to run the Rekognition service requires access to this bucket, the Rekognition service itself and to have the rekognition:DetectLabels permission.

The input parameters of the Rekognition connector are:

ParameterTypeDescription
fileFileRequired. A variable of type file to send for analysis.
mediaTypeStringOptional. The media type of the file to be analyzed, for example application/octect-stream.
maxLabelsIntegerOptional. The maximum number of labels to be return. The default value is 10.
confidenceLevelStringOptional The confidence level to use in the analysis between 0 and 1, for example 0.75.
timeoutIntegerOptional. The timeout period for calling the Rekognition service in milliseconds, for example 910000.

The output parameters from the Rekognition analysis are:

ParameterTypeDescription
awsResponseJSONOptional. The result of the analysis from the Rekognition service.
aisResponseJSONOptional. The result of the image analysis in Alfresco Intelligence Service format.
labelsJSONOptional. The result object containing the labels detected.

Rekognition configuration parameters

The configuration parameters for the Rekognition connector are:

ParameterDescription
AWS_ACCESS_KEY_IDRequired. The access key to authenticate against AWS with.
AWS_SECRET_KEYRequired. The secret key to authenticate against AWS with.
AWS_REGIONRequired. The region of AWS to use the Rekognition service in.
AWS_S3_BUCKETRequired. The name of the S3 bucket to use.

Rekognition errors

The possible errors that can be handled by the Rekognition connector are:

ErrorDescription
MISSING_INPUTA mandatory input variable was not provided.
INVALID_INPUTThe input variable has an invalid type.
INVALID_RESULT_FORMATThe REST service result payload cannot be parsed.
PROVISIONED_THROUGHPUT_EXCEEDEDThe number of requests exceeded your throughput limit.
ACCESS_DENIEDThe user is not authorized to perform the action.
IMAGE_TOO_LARGEThe input image size exceeds the allowed limit.
INVALID_IMAGE_FORMATThe provided image format is not supported.
LIMIT_EXCEEDEDThe service limit was exceeded.
THROTTLING_ERRORThe service is temporarily unable to process the request.
UNKNOWN_ERRORUnexpected runtime error.
BAD_REQUESTThe server could not understand the request due to invalid syntax.
UNAUTHORIZEDThe request has not been applied because it lacks valid authentication.
FORBIDDENThe server understood the request but refuses to authorize it.
NOT_FOUNDThe server could not find what was requested.
METHOD_NOT_ALLOWEDThe request method is known by the server but is not supported.
NOT_ACCEPTABLEThe server cannot produce a response matching the list of acceptable values.
REQUEST_TIMEOUTThe server would like to shut down this unused connection.
CONFLICTThe request conflicts with current state of the server.
GONENo longer available.
UNPROCESSABLE_ENTITYThe server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
LOCKEDThe resource that is being accessed is locked.
FAILED_DEPENDENCYThe request failed due to failure of a previous request.
INTERNAL_SERVER_ERRORThe server has encountered a situation it doesn't know how to handle.
NOT_IMPLEMENTEDThe request method is not supported by the server and cannot be handled.
BAD_GATEWAYThe server got an invalid response.
SERVICE_UNAVAILABLEThe server is not ready to handle the request.
GATEWAY_TIMEOUTThe server is acting as a gateway and cannot get a response in time.

Textract

The EXTRACT action is used by the Textract connector to execute Amazon Textract to extract text and metadata from JPEG and PNG files that are less than 5mb in size.

The Amazon Textract APIs called are the Detect Document Text API which joins all LINE block objects with a line separator between them and the Analyze Document API with FORM and TABLES analysis.

The IAM user configured to run the Textract services needs to have the textract:DetectDocumentText and textract:AnalyzeDocument permissions.

The input parameters of the Textract connector are:

ParameterTypeDescription
fileFileRequired. A variable of type file to send for extraction.
outputFormatStringOptional. The format of the output file. Possible values are JSON and TXT. The default value is JSON.
confidenceLevelStringOptional The confidence level to use in the analysis between 0 and 1, for example 0.75.
timeoutIntegerOptional. The timeout period for calling the Textract service in milliseconds, for example 910000.

The output parameters from the Textract analysis are:

ParameterTypeDescription
awsResultJSONOptional. The result of the analysis from the Textract service.

Textract configuration parameters

The configuration parameters for the Textract connector are:

ParameterDescription
AWS_ACCESS_KEY_IDRequired. The access key to authenticate against AWS with.
AWS_SECRET_KEYRequired. The secret key to authenticate against AWS with.
AWS_REGIONRequired. The region of AWS to use the Textract service in.
AWS_S3_BUCKETRequired. The name of the S3 bucket to use.

Textract errors

The possible errors that can be handled by the Textract connector are:

ErrorDescription
MISSING_INPUTA mandatory input variable was not provided.
INVALID_INPUTThe input variable has an invalid type.
INVALID_RESULT_FORMATThe REST service result payload cannot be parsed.
PROVISIONED_THROUGHPUT_EXCEEDEDThe number of requests exceeded your throughput limit.
ACCESS_DENIEDThe user is not authorized to perform the action.
IMAGE_TOO_LARGEThe input image size exceeds the allowed limit.
INVALID_IMAGE_FORMATThe provided image format is not supported.
LIMIT_EXCEEDEDThe service limit was exceeded.
THROTTLING_ERRORThe service is temporarily unable to process the request.
UNKNOWN_ERRORUnexpected runtime error.
BAD_REQUESTThe server could not understand the request due to invalid syntax.
UNAUTHORIZEDThe request has not been applied because it lacks valid authentication.
FORBIDDENThe server understood the request but refuses to authorize it.
NOT_FOUNDThe server could not find what was requested.
METHOD_NOT_ALLOWEDThe request method is known by the server but is not supported.
NOT_ACCEPTABLEThe server cannot produce a response matching the list of acceptable values.
REQUEST_TIMEOUTThe server would like to shut down this unused connection.
CONFLICTThe request conflicts with current state of the server.
GONENo longer available.
UNPROCESSABLE_ENTITYThe server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
LOCKEDThe resource that is being accessed is locked.
FAILED_DEPENDENCYThe request failed due to failure of a previous request.
INTERNAL_SERVER_ERRORThe server has encountered a situation it doesn't know how to handle.
NOT_IMPLEMENTEDThe request method is not supported by the server and cannot be handled.
BAD_GATEWAYThe server got an invalid response.
SERVICE_UNAVAILABLEThe server is not ready to handle the request.
GATEWAY_TIMEOUTThe server is acting as a gateway and cannot get a response in time.

© 2023 Alfresco Software, Inc. All Rights Reserved.