# What to use for plugin.provider? Name | Provider Object?

**URL:** <https://forum.serverless.com/t/what-to-use-for-plugin-provider-name-provider-object/970>\
**Category:** Serverless Framework\
**Created:** [December 18, 2016, 10:09pm UTC](https://forum.serverless.com/t/what-to-use-for-plugin-provider-name-provider-object/970 "2016-12-18T22:09:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmetzker](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/gmetzker/32/338_2.png) [@gmetzker](https://forum.serverless.com/u/gmetzker)\
**Post date:** [December 18, 2016, 10:09pm UTC](https://forum.serverless.com/t/what-to-use-for-plugin-provider-name-provider-object/970/1 "2016-12-18T22:09:55Z")

</div>

I’m working on a serverless plugin that is AWS specific.  
According [to the documentation here,](https://serverless.com/framework/docs/providers/aws/guide/plugins#provider-specific-plugins) provider specific plugins should supply the provider name as a property on the plugin.

```
class ProviderDeploy {
  constructor(serverless, options) {
    this.serverless = serverless;
    this.options = options;

    // set the providers name here
    this.provider = 'providerName';

```

This seems to conflict with the built-in AWS plugins. These seem to call getProvider(‘aws’). [See the deploy plugin for example.](https://github.com/serverless/serverless/blob/1f3b88baa314e0ff0fdda0968ba0ccf0edd1a026/lib/plugins/aws/deploy/index.js)

```
class AwsDeploy {
  constructor(serverless, options) {
    this.serverless = serverless;
    this.options = options;
    this.provider = this.serverless.getProvider('aws');

```

Which is correct or am I confusing apples and oranges?

---

<div class="post-metadata">

**Author:** ![horike37](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/horike37/32/345_2.png) [@horike37](https://forum.serverless.com/u/horike37)\
**Post date:** [December 23, 2016, 4:20am UTC](https://forum.serverless.com/t/what-to-use-for-plugin-provider-name-provider-object/970/2 "2016-12-23T04:20:29Z")

</div>

I think the document is older.

Added the `getProvider` function as follow. But the document has not been updated.  
[https://github.com/serverless/serverless/commit/df7692ac809ead5febe1f59645ad9c3c901dcd3a#diff-f63d6ce6eb4e6337529123dd064ba480](https://github.com/serverless/serverless/commit/df7692ac809ead5febe1f59645ad9c3c901dcd3a#diff-f63d6ce6eb4e6337529123dd064ba480)

I think that it is better to use the function to confirm existence of the provider.
