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)
질문됨 일 년 전222회 조회
3개 답변
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
전문가
답변함 일 년 전
  • 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
전문가
kentrad
답변함 일 년 전
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

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠