leftclickben / serverless-api-stage

AWS API Gateway stage plugin for serverless framework
MIT License
47 stars 17 forks source link

Role issues #15

Open hamecodedVia opened 6 years ago

hamecodedVia commented 6 years ago

I mainly installed the plugin to set stage variables, logging is a bonus in my case, however it seems to fail the deployment. An error occurred: LogStack - Embedded stack arn:aws:cloudformation:us-east-xxx was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to create: [IamRoleApiGatewayCloudwatchLogRole].

Using only:

custom:
  stageSettings:
    Variables:
      vpcLinkId:123
leftclickben commented 6 years ago

Hi... are there other resources that are conflicting? Did you try deleting the stack manually and then redeploying? Any logs you can provide?

etgrieco commented 6 years ago

@hamecodedVia if you are only planning on dealing with stage variables using exclusively https://github.com/svdgraaf/serverless-plugin-stage-variables may fit your use-case. The README isn't very detailed, but actually the plugin gives you a lot of access to staging variables. For example, with the plugin enabled you can access the staging properties through 'resources'

resources:
  Resources:
    ApiGatewayStage:
      Properties:
        CacheClusterEnabled: true
        CacheClusterSize: '0.5'
        MethodSettings:
          - CacheTtlInSeconds: 5
            CachingEnabled: true
            HttpMethod: "GET"
            ResourcePath: '/*'
            MetricsEnabled: false