Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

sls deploy throws error #9

Open
VinayBhalerao opened this issue Aug 23, 2019 · 3 comments
Open

sls deploy throws error #9

VinayBhalerao opened this issue Aug 23, 2019 · 3 comments

Comments

@VinayBhalerao
Copy link
Collaborator

After editing the serverless.yaml with correct provider_key and service_id, sls_deploy thorws below error

sls deploy                                                                                    (*master+30) 14:27:04

  Serverless Error ---------------------------------------

  iamRoleStatements should be an array of objects, where each object has Effect, Action, Resource fields. Specifically, it is not an array

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              12.4.0
     Framework Version:         1.50.0
     Plugin Version:            1.3.8
     SDK Version:               2.1.0
@VinayBhalerao
Copy link
Collaborator Author

After formating iamRoleStatements.json, the error is still reproducible. Not sure if anything changed in the serverless version.

Fix:
Correct the serverless.yaml with correct values from iamRoleStatements.json. Got it working.

@fcastrocl
Copy link

Hi,

I'm facing the same issue doing the sls_deploy. Did you find the workaround ?

Best Regards,

@fcastrocl
Copy link

fcastrocl commented Jan 16, 2020

Hi,

Changed the original serverless.yaml where the iamRoleStatements aimed to a file and put the following code:

provider:
profile: 3scale
name: aws
runtime: nodejs12.x
region: us-east-1 #CHANGE IT TO YOUR OWN
stage: dev
iamRoleStatements:
- Effect: 'Allow'
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource: "arn:aws:logs:${self:provider.region}::"
- Effect: 'Allow'
Action:
- ec2:CreateNetworkInterface
- ec2:DescribeNetworkInterfaces
- ec2:DeleteNetworkInterface
Resource: "*"
- Effect: 'Allow'
Action:
- sns:Publish
Resource:
- Ref: "SNSAuthRepTopic"
- Effect: 'Allow'
Action:
- sns:Publish
Resource:
- Ref: "SNSCacheTokenTopic"

Regards,

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

No branches or pull requests

2 participants