403 errors via user access keys (using serverless.js) and manually creating a basic lambda function via AWS console

0

Does anyone have any ideas on how the below might be happening? Its a relatively new free tier account with nothing on it so far, this is the first deployments I've been trying on this account.

Browser 403 errors:

403 errors in the browser

Serverless deployment 403 errors:

~/dev/my-serverless-backend-test ❯ sls deploy
Running "serverless" from node_modules
(node:1519) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created)
DOTENV: Could not find .env file.

Deploying my-serverless-backend-test to stage dev (eu-west-2)
Warning: Not authorized to perform: lambda:GetFunction for at least one of the lambda functions. Deployment will not be skipped even if service files did not change.

✖ Stack my-serverless-backend-test failed to deploy (71s)
Environment: darwin, node 18.13.0, framework 3.27.0 (local) 3.27.0v (global), plugin 6.2.3, SDK 4.3.2
Credentials: Local, "serverless-admin-test" profile
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
CREATE_FAILED: GetCurrentUserLambdaFunction (AWS::Lambda::Function)
Resource handler returned message: "Service returned error code AccessDeniedException (Service: Lambda, Status Code: 403, Request ID: 83a8a6d3-306d-43d2-9c68-d83195b25cc3)" (RequestToken: 6246c74b-5221-6aad-a27c-d28fa2e47540, HandlerErrorCode: GeneralServiceException)
demandé il y a un an222 vues
3 réponses
0

Although a little off-base: Check the time and timezone on your local machine and make sure that they are correct. Requests to AWS APIs are signed and are only valid in a very limited time range. If your clock is slightly in the future or the past then you can see errors like this.

profile pictureAWS
EXPERT
répondu il y a un an
  • I set my local date and timezone to 'Europe/London' and set my AWS account region to eu-west-2, no change, still unable to deploy.

0

It looks like you need to Configuring the AWS CLI so that your calls to the AWS API can be authenticated/authorized.

profile pictureAWS
EXPERT
kentrad
répondu il y a un an
0

In case anyone else is having this problem it looks like there may have been an issue with my account as I've contacted account support (tech support not available on free tier) and they are in the process of helping resolve a 'security related issue'. Will update when I know more

répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions