Skip to content

Receiving an error: Profile production does not exist #578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
richardjames27 opened this issue Dec 18, 2020 · 1 comment
Open

Receiving an error: Profile production does not exist #578

richardjames27 opened this issue Dec 18, 2020 · 1 comment

Comments

@richardjames27
Copy link

I'm using my dev credentials for AWS - and do not have production creds.

serverless --version:
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 14.8.0
Framework Version: 2.16.0
Plugin Version: 4.3.0
SDK Version: 2.3.2
Components Version: 3.4.3

serverless.yml:

plugins:

  • serverless-python-requirements

custom:
stage: ${opt:stage, self:provider.stage}
AccountId: 11111111111111
pythonRequirements:
layer: true
name: ${self:service}-${self:custom.stage}-layer
compatibleRuntimes:
- python3.8
noDeploy:
- pytest
- pytest-cov
- pytest-mock
- boto3

provider:
name: aws
runtime: python3.8
stage: dev
region: us-east-1
versionFunctions: false
environment:
ENVIR: ${self:custom.stage}
QUEUE_URL: !Ref SQSQueue
memorySize: 128
profile: dev

$ export SLS_DEBUG=*
$ sis deploy --stage dev -v
....
Error Message:

Error: Profile production does not exist
at Object.addProfileCredentials (/usr/local/lib/node_modules/serverless/lib/plugins/aws/provider.js:136:15)
at Object.addEnvironmentProfile (/usr/local/lib/node_modules/serverless/lib/plugins/aws/provider.js:150:12)
at AwsProvider.getCredentials (/usr/local/lib/node_modules/serverless/lib/plugins/aws/provider.js:1365:10)
at AwsProvider.request (/usr/local/lib/node_modules/serverless/lib/plugins/aws/provider.js:1204:48)
at AwsCompileLayers.compareWithLastLayer (/usr/local/lib/node_modules/serverless/lib/plugins/aws/package/compile/layers.js:124:26)
at /usr/local/lib/node_modules/serverless/lib/plugins/aws/package/compile/layers.js:166:54
at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
From previous event:
at /usr/local/lib/node_modules/serverless/lib/plugins/aws/package/compile/layers.js:166:38
at Array.map ()
at AwsCompileLayers.compileLayers (/usr/local/lib/node_modules/serverless/lib/plugins/aws/package/compile/layers.js:165:17)
From previous event:
at Object.package:compileLayers [as hook] (/usr/local/lib/node_modules/serverless/lib/plugins/aws/package/compile/layers.js:21:59)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:521:22)
at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:556:24
From previous event:
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:556:8)
at /usr/local/lib/node_modules/serverless/lib/Serverless.js:203:33
at processImmediate (internal/timers.js:458:21)
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:190:74)
at /usr/local/lib/node_modules/serverless/scripts/serverless.js:50:26

@richardjames27
Copy link
Author

Followup:

I made a fake AWS profile in my .aws/credentials file called [production] using my dev profile credentials - and it appears to work. This is a bug in the most recently available serverless-python-requirements code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant