
[英]What's the difference between AWS sam build and sam package when using SAM?
[英]Deploying AWS Lambda "Hello World" using sam init, sam build sam deploy defaults fails with Failed to create changeset for sam-app
我按照最简单的方法在我的 PC 上创建了一个基本的 AWS lambda function - 但是当我尝试部署它时失败并显示一条模糊消息。
错误:无法为堆栈创建变更集:sam-app,调用 CreateChangeSet 操作时发生错误(InternalFailure)(达到最大重试次数:4):未知
我相信我已经提供了所有必需的权限:
另外:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:DetachRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:CreateRole"
],
"Resource": "*"
}
]
}
我的终端 session 命令和响应是:
c:\My Projects\Nuzum-AWS\sam-app>sam deploy --guided --template-file.aws-sam\build\template.yaml
Looking for config file [samconfig.toml] : Not found
Setting default arguments for 'sam deploy'
=========================================
Stack Name [sam-app]:
AWS Region [eu-west-1]:
#Shows you resources changes to be deployed and require a 'Y' to initiate deploy
Confirm changes before deploy [y/N]:
#SAM needs permission to be able to create roles to connect to the resources in your template
Allow SAM CLI IAM role creation [Y/n]:
#Preserves the state of previously provisioned resources when an operation fails
Disable rollback [y/N]:
HelloWorldFunction may not have authorization defined, Is this okay? [y/N]: y
Save arguments to configuration file [Y/n]:
SAM configuration file [samconfig.toml]:
SAM configuration environment [default]:
Looking for resources needed for deployment:
Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-dee0ker00dts
A different default S3 bucket can be set in samconfig.toml
Saved arguments to config file
Running 'sam deploy' for future deployments will use the parameters saved above.
The above parameters can be changed by modifying samconfig.toml
Learn more about samconfig.toml syntax at
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html
上传到 sam-app/7b33e513850748d9482c8e504aacefb2 533 / 533 (100.00%)
Deploying with following values
===============================
Stack name : sam-app
Region : eu-west-1
Confirm changeset : False
Disable rollback : False
Deployment s3 bucket : aws-sam-cli-managed-default-samclisourcebucket-dee0ker00dts
Capabilities : ["CAPABILITY_IAM"]
Parameter overrides : {}
Signing Profiles : {}
上传到 sam-app/4e272b888be3f30dedd7ac0cf77b1925.template 1361 / 1361 (100.00%) 错误:无法为堆栈创建变更集:sam-app,调用 CreateChangeSet 操作时发生错误(InternalFailure)(达到最大重试次数:4):未知
您将 confirm change set 的值设为 false。 你必须把它当作真的。 您可以在部署时尝试提供这些值吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.