Cloud front signed cookie - resource path

Viewed 17

I am using below method to generate signed cookie. HLS files which I am trying to serve via CloudFront are stored in S3 bucket after many levels.

/vod/folder1/folder2/folder3/streams/master.m3u8

I want to know whether I am invoking the signer function in correct way. Specifically the wildcard given for resource path. The reason I am asking because I am getting access denied.

String s3ObjectKey="vod/*";            
CookiesForCustomPolicy cookies = CloudFrontCookieSigner
                .getCookiesForCustomPolicy(SignerUtils.Protocol.https,
                                            "d2xyz.cloudfront.net",
                                            privateKeyFile,
                                            s3ObjectKey,
                                            keyPairId,
                                            expiresOn,
                                            null,
                                            "0.0.0.0/0"
                                            );
0 Answers
Related