examples icon indicating copy to clipboard operation
examples copied to clipboard

getting 403 error during deployment (not able to create lamba function) while using stripe example

Open kirthiss opened this issue 5 years ago • 5 comments

example: aws-node-stripe-integration error: `Serverless: Packaging service... Serverless: Excluding development dependencies... Serverless: Creating Stack... Serverless: Checking Stack create progress... ........ Serverless: Stack create finished... Serverless: Uploading CloudFormation file to S3... Serverless: Uploading artifacts... Serverless: Uploading service aws-node-stripe-integration.zip file to S3 (567.36 KB)... Serverless: Validating template... Serverless: Updating Stack... Serverless: Checking Stack update progress... .................... Serverless: Operation failed! Serverless: View the full error output: https://ap-south-1.console.aws.amazon.com/cloudformation/home?region=ap-south-1#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3Aap-south-1%3A263089580701%3Astack%2Faws-node-stripe-integration-dev2%2F312d4770-f2dc-11eb-86dd-06777a0f3b80

Serverless Error ----------------------------------------

An error occurred: IncomingLambdaFunction - Resource handler returned message: "null (Service: Lambda, Status Code: 403, Request ID: 5cd73a06-d0ac-4bc2-b23b-1e96decc9755, Extended Request ID: null)" (RequestToken: 6a65bb5c-f366-2463-f6a3-7f5e0487f25c, HandlerErrorCode: AccessDenied).

Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Issues: forum.serverless.com

Your Environment Information --------------------------- Operating System: linux Node Version: 14.17.3 Framework Version: 2.52.1 Plugin Version: 5.4.3 SDK Version: 4.2.6 Components Version: 3.14.2

Serverless: Deprecation warnings:

Support for "package.include" and "package.exclude" will be removed with next major release. Please use "package.patterns" instead More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_PACKAGE_PATTERNS

Resolution of lambda version hashes was improved with better algorithm, which will be used in next major release. Switch to it now by setting "provider.lambdaHashingVersion" to "20201221" More Info: https://www.serverless.com/framework/docs/deprecations/#LAMBDA_HASHING_VERSION_V2`

any thoughts? I'm not able to deploy the function at all...

kirthiss avatar Aug 01 '21 15:08 kirthiss

Hello @kirthiss - I've tested it and I was able to deploy it without any issues. Are you sure that AWS credentials that you're using don't have limited capabilities that doesn't allow you to deploy?

pgrzesik avatar Aug 02 '21 16:08 pgrzesik

Hello @kirthiss - I've tested it and I was able to deploy it without any issues. Are you sure that AWS credentials that you're using don't have limited capabilities that doesn't allow you to deploy?

I checked that. The deployment fails while creating lamba function. I was able to create one manually. I also gave admin permission to the serverless role.

kirthiss avatar Aug 02 '21 17:08 kirthiss

Are you able to share what permissions does your role/user has?

pgrzesik avatar Aug 02 '21 19:08 pgrzesik

I removed all prior resources and started afresh - and it worked. Thanks, @pgrzesik for helping out. Sorry for the trouble...

kirthiss avatar Aug 03 '21 05:08 kirthiss

No worries, happy to hear that you managed to make it work :raised_hands: I'm going to close this issue

pgrzesik avatar Aug 03 '21 10:08 pgrzesik