[AWS] Solve Error: An error occurred (AccessDenied) when calling the CreateMultipartUpload operation: Access Denied


When you deploy with SAM CLI using sam deploy, you might get the following error:

Error: Unable to upload artifact <YourComponent> referenced by ContentUri parameter of <YourComponent> resource. 
An error occurred (AccessDenied) when calling the CreateMultipartUpload operation: Access Denied.

Try to solve this error by doing the following check:

  • Check your aws configuration by running aws configure list, if not, run aws configure to modify it, make sure your IAM user have all the necessary permissions.

  • Build your app first by running sam build --use-container, and then run sam deploy --guided if this is your first time to deploy.


Now if you see the following error:

Error: Failed to create changeset for the stack: <YourStack>, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state: For expression "Status" we matched expected path: "FAILED" Status: FAILED. Reason: Requires capabilities : [CAPABILITY_NAMED_IAM]

Try to run sam deploy --capabilities CAPABILITY_NAMED_IAM

posted @ 2022-09-02 13:40  Grandyang  阅读(817)  评论(0编辑  收藏  举报
Fork me on GitHub