Quick tip: AWS S3 invalid certificate

Published on

If you are getting invalid SSL certificate error in the browser when serving assets from the s3 bucket and using s3 bucket name as a subdomain. This quick tip might be a help.

In my case, I had a dot in the bucket name so the domain created was like https://akhil.bansal.s3.amazo…… I removed the dot from the bucket name and it worked perfectly. Looks like S3 ssl certificate does not support a dot in the subdomain.

ActiveRecord after_commit hook

Published on

Most developers use ActiveRecord callbacks after_create/after_update/after_destroy to generate background job, expire cache, etc., but they don’t realize these callbacks are still wrapped in database transaction, they probably got unexpected results like the app queued a job but the record is not created/updated(transaction rolled back). For such situations after_commit callback should be used. after_commit is introduced … Continue reading ActiveRecord after_commit hook