尝试运行 aws cli 时 S3 访问被拒绝

hon*_*let 4 amazon-s3 validationerror aws-cli aws-lambda aws-appsync

使用我尝试运行的 AWS CLI

aws cloudformation create-stack --stack-name FullstackLambda --template-url https://s3-us-west-2.amazonaws.com/awsappsync/resources/lambda/LambdaCFTemplate.yam --capabilities CAPABILITY_NAMED_IAM --region us-west-2
Run Code Online (Sandbox Code Playgroud)

但我得到了错误

An error occurred (ValidationError) when calling the CreateStack operation: S3 error: Access Denied 
Run Code Online (Sandbox Code Playgroud)

我已经设置了我的凭证

aws configure
Run Code Online (Sandbox Code Playgroud)

PS我从AppSync文档中获得了create-stack命令(https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html

Mic*_* Z. 7

看起来您不小心跳过了模板文件名末尾的l字母:

LambdaCFTemplate.yam -> LambdaCFTemplate.yam l