DEV Community

Discussion on: Next.js CI / CD on AWS with GitHub Actions

Collapse
 
amatyas001 profile image
Mátyás Angyal

Hi, great article! A quick note, when you are using a simple serverless.yml without bucketName explicitly configured, the workflow will create a new origin for the brand new bucket on the CloudFront distro all the time when you push changes and reach the origin limit after several deploys. I made it working by setting the bucketName, though this results in an error saying "The bucket you want to delete is not empty...". This can be simply fixed by using serverless-s3-remover plugin. Now it works like charm!

Collapse
 
dabit3 profile image
Nader Dabit

Thanks for sharing Matyas, I need to look more into this and will consider updating the tutorial.