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)
asked a year ago206 views
3 Answers
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
answered a year ago
  • 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
answered a year ago
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

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions