hi! does somebody know how to configure checkpoin...
# troubleshooting
d
hi! does somebody know how to configure checkpointing to s3 using presto and aws iam without passing
Copy code
s3.access-key: your-access-key
s3.secret-key: your-secret-key
i have serviceAccount and has configured iam, but with default configuration receive 403 error currently i am trying to use
hive.s3.*
options to configure it, but still working on it and don`t sure it will help
s
How is it deployed? I have a similar setup with EKS, one of the node groups has permissions to write to S3 and it’s enough, no need to configure anything else.
c
create your s3 iam role to connect to said s3 bucket policy / permissions oidc auth to essentially limit access , please read up on how to limit access on basis of namespace + service account flink operator should create a service account by the name "flink" (*default name), in the ns that you are deploying flinkdeployment. Annotate that SA with you iam role. Update you checkpoint/savepoint/ha related path with appropriate s3 based path. Wait for you reconciler (in case you are using if not simply reapply flinkdeployment manifest). it should be working. Since you mentioned s3, i will only speak of aws.
d
@sap1ens thanks for your response! eks with jobmanager and taskamanger deployments (i am using standalone k8s approach) service account to access s3 it creates env vars inside pod, but i asked aws support for help and it looks that presto ignore this serviceAcc role and use another one IAM role for our ec2 instances (but if check inside the pod, all AWS env variables are set to the correct role) i suppose it is possible due to
presto.s3.use-instance-credentials
but i set it to false, so it is strange behaviour
@clen.moras thanks for you response i have single serviceAccount with crud permissions for configmap and it is also annotated with my iam role, the role have all required permissions for s3 bucket, moreover i have checked inside the pod that all requied AWS_ env initialized correctly but still jobmanager don`t use this iam to communicate with s3 it use our ec2 aim
c
in that case it should give you an error when it tried to checkpoint or start with ha options sayin access restriced. what is that error status code?
d
exactly, error while triggering checkpoint - 403 forbidden
huh) fixed, outplayed and destroyed myself with options maybe it will be useful for somebody here is code snippet of resolving AwsCredentialsProvider
Copy code
if (credentials.isPresent()) {
    return new AWSStaticCredentialsProvider((AWSCredentials)credentials.get());
} else if (this.useInstanceCredentials) {
    return InstanceProfileCredentialsProvider.getInstance();
} else if (this.s3IamRole != null) {
    return (new STSAssumeRoleSessionCredentialsProvider.Builder(this.s3IamRole, this.s3IamRoleSessionName)).build();
} else {
    String providerClass = conf.get("presto.s3.credentials-provider");
    return (AWSCredentialsProvider)(!Strings.isNullOrEmpty(providerClass) ? getCustomAWSCredentialsProvider(uri, conf, providerClass) : DefaultAWSCredentialsProviderChain.getInstance());
}
so as a fix you should set useInstanceCredentials to false and do not set s3IamRole