Generate S3 signature in snaplogic

I am trying to generate S3 signature for pre-signed URL, expression below

Digest.sha256(Digest.sha256(Digest.sha256(Digest.sha256(Digest.sha256(“AWS4” + “>SecretKey<”,“20180226”),“us-east-1”),“s3”),“aws4_request”),encodeURIComponent(“AWS4-HMAC-SHA256\n20180226T000000Z\n20180226/us-east-1/s3/aws4_request\n”+Digest.sha256(“GET\n/gis-integration-snaplogic-expressions/MaterialMasterToETQ.expr\nX-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=”>AccessKey<"%2F20180226%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180226T000000Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host\nhost:s3.amazonaws.com\n\nhost\nUNSIGNED-PAYLOAD")))

But I receive error from S3 saying invalid signature, any help on this is greatly appreciated.