A small Serverless plugin for ECR authentication
npm install serverless-ecr-login  
This repository contains a small Serverless plugin
to automatically login to ECR for Docker image deployments.
Normally the Serverless framework will handle logins automatically, but there
are occasionally bugs (12895
and 13116) which cause this
to not work. Using this plugin can act as a workaround for these issues.
This plugin is available via npm, so it can be installed as usual:
``bash`
$ npm i --save-dev serverless-ecr-login
There's no need to include it in your production bundle, so make sure it's saved
inside the development dependencies. Once installed, make sure to add it to your
Serverless plugins list:
`yaml``
plugins:
- serverless-ecr-login
The location within the plugin list shouldn't matter, as it monitors the framework
lifecycle for activation. Docker login will automatically occur prior to deployment.
This plugin has been tested against the Serverless v4 release, but will likely
work with many Serverless versions as it mainly uses the AWS CLI exposed by the
framework. If you have any issues, please do file an issue!