App Engine fails to connect to mysql cloud sql (failed to refresh the ephemeral certificate)

Viewed 343

Been using App Engine Standard for years, connecting to mysql via socket without issue.

Today, started seeing this error in the logs:

failed to refresh the ephemeral certificate for xxxxx:us-east1:xxxxx: Post "https://sqladmin.googleapis.com/sql/v1beta4/projects/xxxxx/instances/us-east1~xxxxx-db:generateEphemeralCert?alt=json&prettyPrint=false": rpc error: code = PermissionDenied desc = IAM permission denied for service account xxxxxx@appspot.gserviceaccount.com.

Nothing has changed with permissions and I have verified the service account has "Editor" and "Cloud SQL Client" roles.

1 Answers

This issue was resolved for me by enabling Cloud SQL Admin API.

Related