When I deploy my serverless framework project using AWS as the provider, I get:
You do not have permission to access this resource. – Please contact support and provide this identifier to reference this issue BLAHBLAH
I am logged in to the serverless framework serverless login
My serverless.yaml:
org: vladimirorg
app: vladimirapp
service: backend-rest
provider:
name: aws
runtime: nodejs12.x
apiGateway: {
shouldStartNameWithService: true
}
environment:
DYNAMODB_TABLE: ${self:service}-${opt:stage, self:provider.stage}
DYNAMODB_LOCAL_PORT: 9000
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: "arn:aws:dynamodb:#{AWS::Region}:#{AWS::AccountId}:table/${self:provider.environment.DYNAMODB_TABLE} "
functions:
create:
handler: src/handlers/create.create
events:
- http:
path: todos
method: post
cors : true
request:
schema:
application/json: ${file(src/schemas/create.json)}
...
Answer
I found the root cause – if you wish to deploy a serverless framework application, you must use the same The organization (organization) and application name (application) are exactly the same as the organization (organization) and application name (application).
To find your current application/organization names, change them or create new ones login to Serverless Framework’s dashboard account, https://app.serverless. com/
use the same credentials you used for deployment and make sure you are using the exact org and application in the serverless.yaml
file:
org: orgname <---
app: appname <---
service: backend-rest
...
so you can’t just use Arbitrary org/app name, you must use the exact org/app registered with the Serverless framework.