Skip to content
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

not able to use existing logging role #646

Open
droger88 opened this issue Nov 8, 2024 · 1 comment
Open

not able to use existing logging role #646

droger88 opened this issue Nov 8, 2024 · 1 comment

Comments

@droger88
Copy link

droger88 commented Nov 8, 2024

we would like to use an existing role for logging configuration because our permission setup, but when the attribute is set, it is still trying to create a new role
appsync configuration

appSync:
  name: demo-post-api
  logging:
    level: ALL
    retentionInDays: 14
    enabled: true
    roleArn: "arn:aws:iam::12345:role/appsync-datasource"
....

here is the output

✖ Stack test-api failed to deploy (46s)
Environment: darwin, node 18.12.1, framework 3.39.0, plugin 7.2.3, SDK 4.5.1
Credentials: Local, environment variables
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
CREATE_FAILED: GraphQlApiLogGroupRole (AWS::IAM::Role)
Resource handler returned message: "Encountered a permissions error performing a tagging operation,
@zjawol
Copy link

zjawol commented Feb 12, 2025

Same here.

Works fine with v1 but currently upgrading to v2 and I have to comment logging part as cause an error:

...
  logging:
    roleArn: !Sub arn:aws:iam::${AWS::AccountId}:role/${self:service}-${self:provider.stage}-appsync-cloudwatch-role
    enable: true
    level: ALL # Logging Level: NONE | ERROR | ALL
...

Getting error

CREATE_FAILED: GraphQlApiLogGroupRole (AWS::IAM::Role)
Resource handler returned message: "Encountered a permissions error performing a tagging operation, please add required tag permissions. See https://repost.aws/knowledge-center/cloudformation-tagging-permission-error for how to resolve. Resource handler returned message: "User: arn:aws:sts::xxxxxxxxxxxx:assumed-role/serverless-cloudformation-execution-role/AWSCloudFormation is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::xxxxxxxxxxx:role/app-GraphQlApiLogGroupRole-MJ5cSpD5M4a7 because no identity-based policy allows the iam:CreateRole action 

For some reasons try to create a new role name.

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

2 participants