How to remove category Function in Amplify?

0

Hello everyone,

When I change Authorization modes on Amplify to Lambda and run a command Amplify push. I have a message error below:

LambdaFunction (AWS::Lambda::Function), Event Type: create, Reason: Resource handler returned message: "Your access has been denied by S3, please make sure your request credentials have permission to GetObject for amplify-133225-deployment/amplify-builds/graphQlLambdaAuthorizerae88f8f4-75757055505342576976-build.zip. S3 Error Code: AccessDenied. S3 Error Message: Access Denied (Service: Lambda, Status Code: 403, Request ID: 71023c52-851c-4924-853a-50543924b183)" (RequestToken: 22087c9e-4eee-fe51-0342-9c32b902c10d, HandlerErrorCode: AccessDenied)

This is command I implemented on Amplify:

  • amplify api update
amplify api update
? Select from one of the below mentioned services: GraphQL

General information
- Name: xxxxxxx
- API endpoint: XXXXXXXXXXXXXXXXXXXXXXXXXX

Authorization modes
- Default: Lambda

Conflict detection (required for DataStore)
- Disabled

? Select a setting to edit Authorization modes
? Choose the default authorization type for the API Lambda
? Choose a Lambda authorization function Create a new Lambda function
? Do you want to edit the local lambda function now? Yes
Edit the file in your editor: XXXXXXXXXXXXXX\App\amplify\backend\function\graphQlLambdaAuthorizer418f5645\src\index.js
? Press enter to continue
Successfully added graphQlLambdaAuthorizer418f5645 function locally
? How long should the authorization response be cached in seconds? 300
? Configure additional auth types? No
✅ GraphQL schema compiled successfully.
  • amplify push
Deployment failed.
Deploying root stack xxxx [ =============--------------------------- ] 1/3
        amplify-xxxx-xxxxx… AWS::CloudFormation::Stack     UPDATE_ROLLBACK_COMPLETE       Sat Feb 11 2023 09:23:58…
        apixxxx                AWS::CloudFormation::Stack     UPDATE_FAILED                  Sat Feb 11 2023 09:21:24…
        functiongraphQlLambdaAuthoriz… AWS::CloudFormation::Stack     CREATE_FAILED                  Sat Feb 11 2023 09:21:13…
Deploying api xxxx [ ===------------------------------------- ] 1/12
        GraphQLAPI                     AWS::AppSync::GraphQLApi       UPDATE_COMPLETE                Sat Feb 11 2023 09:22:14…
        GraphQLAPITransformerSchema3C… AWS::AppSync::GraphQLSchema    UPDATE_FAILED                  Sat Feb 11 2023 09:21:14…
Deploying function graphQlLambdaAuthorizer418f5645 [ ==========------------------------------ ] 1/4
        LambdaExecutionRole            AWS::IAM::Role                 CREATE_COMPLETE                Sat Feb 11 2023 09:21:05…
        LambdaFunction                 AWS::Lambda::Function          CREATE_FAILED                  Sat Feb 11 2023 09:21:11…

Can you support fixing issues above? Thank you so much.

1 Answer
0

Hello @AWS-User-7754781

Thank you for posting in re:Post

To Remove a layer To remove a Lambda layer, run the amplify function remove command and select Lambda layers. Next, you'll be prompted to select which layer to remove. You can delete specific layer versions or all of them.

Warning: When you delete a layer, you can no longer configure functions to use it. However, any function that already uses the layer continues to have access to it.

for more details- https://docs.amplify.aws/cli/function/layers/


If the Answer is helpful, please click Accept Answer & UPVOTE, this can be beneficial to other community members.

profile picture
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