serverless / serverless/serverless
Serverless remove doesn't delete iam role
Open
@yerida is already working on this.
Since Mar 19, 2020.
question
- Dominant language
- JavaScript
- Stars
- 46.9k
- Forks
- 5.7k
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 57
Description
Bug Report
Description
I deploy a simple API via serverless with a custom log in serverless.yml. When I use 'serverless remove' to remove the API, I find the IAM role is not deleted. Not sure it is designed as expacted.
serverless version 1.6X
- What did you do?
- What happened?
When I run 'serverless remove' successfully, I still can find an IAM role from AWS console 'arn:aws:iam::XXX:role/serverlesstest-hello-dev-us-east-1-apiGatewayLogsRole', - What should've happened?
The IAM role is not deleted. - What's the content of your
serverless.ymlfile?
service: serverlesstest-hello
provider:
name: aws
runtime: nodejs10.x
region: us-east-1
stage: dev
timeout: 30
logs:
restApi:
format: '{"request_id":"$context.requestId","@env":"$context.stage","@gateway_id":"$context.apiId","method":"$context.httpMethod","path":"$context.resourcePath","api_key_id":"$context.identity.apiKeyId","status":"$context.status","xray_id":"$context.xrayTraceId","full_path":"$context.path","principal_id":"$context.authorizer.principalId","extended_request_id":"$context.extendedRequestId","caller":"$context.identity.caller","source_ip":"$context.identity.sourceIp","user":"$context.identity.user","user_agent":"$context.identity.userAgent","aws_endpoint_request_id":"$context.awsEndpointRequestId","resource_id":"$context.resourceId","request_time":"$context.requestTime","request_time_epoch":"$context.requestTimeEpoch","domain_name":"$context.domainName","authorizer_integration_latency":"$context.authorizer.integrationLatency","integration_latency":"$context.integrationLatency","integration_status":"$context.integrationStatus","response_latency":"$context.responseLatency","response_length":"$context.responseLength","error_message":"$context.error.message","error_response_type":"$context.error.responseType","error_validation_error":"$context.error.validationErrorString"}'
level: INFO
functions:
helloWorld:
handler: handler.helloWorld
events:
- http:
path: hello-world
method: get
cors: true
- What's the output you get when you use the
SLS_DEBUG=*environment variable (e.g.SLS_DEBUG=* serverless deploy)
Similar or dependent issues:
- #12345
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.