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, runaws 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 runsam deploy --guided
if this is your first time to deploy.
`