06-12-2018 11:46 AM
Does anyone know what this error is about?
I am trying to use SAS Bulkload to write a dataset to Redshift. It is able to create the dataset but throws ERROR: Message from TKS3: Access Denied error at the end so table is not getting written to Redshift.
NOTE: There were 10 observations read from the data set SASHELP.CLASS.
NOTE: The data set AWSWRITE.RDBULKTEST3 has 10 observations and 5 variables.
REDSHIFT: Bulkload seconds used for writes: 0.000179
REDSHIFT: Bulkload seconds used for file close: 0.001464
REDSHIFT: Bulkload seconds used for file delete: 0.163959
REDSHIFT: Bulkload total seconds used: 0.167681
Summary Statistics for REDSHIFT are:
Total SQL execution seconds were: 0.093207
Total SQL prepare seconds were: 0.001904
Total seconds used by the REDSHIFT ACCESS engine were 0.263587
ERROR: Message from TKS3: Access Denied
NOTE: DATA statement used (Total process time):
real time 0.32 seconds
06-12-2018 12:05 PM
You may not have access to create tables or your giving the wrong credentials. Are you using the below code or if something different please post your code.
options sastrace=',,,ds' sastraceloc=saslog nostsuffix; libname libred redshift server=rsserver db=rsdb user=myuserID pwd=myPwd port=5439; data libred.myclass( bulkload=yes bl_bucket=myBucket bl_key=99999 bl_secret=12345 bl_default_dir='/tmp' bl_region='us-east-1'); set sashelp.class; run;
06-12-2018 04:18 PM
I am using the same code with correct access key and secrete access keys, and have access to create table or write to bucket - this is all verified by writing to bucket from the server and writing a table to redshift schema.
06-12-2018 04:20 PM
Here is my code if that makes any difference.
options sastrace=',,,ds' sastraceloc=saslog nostsuffix;
LIBNAME AWSWRITE SASIORST DATABASE="midasdr-test2-rs" SERVER="XXXXXXXXXXXXXXXXXX"
SCHEMA=saswork USER=saswork PASSWORD="XXXXXX" PORT=5439;
06-13-2018 10:55 PM
The issue was the keys. Keys were belong to a different user than the user id I was using in my libname. Make sure your AWS admin provides the key for the user that you are using in SAS to Redshift connectivity since that ID is being used to copy the data from S3 bucket to Redshift schema.