- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试逐步重现此视频中的说明“安装 AWS SAM CLI 并创建 S3 存储桶”(来自 youtube,https://www.youtube.com/watch?v=EeLdSO6LHW0m) ,了解如何使用 SAM 作为基础设施即代码来创建 S3 存储桶。
我已按照视频的说明一步一步进行操作;但是,当我运行 aws-vault 命令来创建 S3 存储桶时,我收到以下错误消息:
% aws-vault exec my-user --no-session -- sam deploy
File with same data already exists at resume-stack/445f94158914d32693176a0725a98472, skipping upload
Deploying with following values
===============================
Stack name : resume-stack
Region : us-east-1
Confirm changeset : False
Disable rollback : False
Deployment s3 bucket : aws-sam-cli-managed-default-samclisourcebucket-rzqvgcwwyja9
Capabilities : ["CAPABILITY_IAM"]
Parameter overrides : {}
Signing Profiles : {}
Initiating deployment
=====================
Uploading to resume-stack/e89cc5a3136547707b1bcb1032c2d3b0.template 1350 / 1350 (100.00%)
Waiting for changeset to be created..
CloudFormation stack changeset
-----------------------------------------------------------------------------------------------------------------------------------------------------
Operation LogicalResourceId ResourceType Replacement
-----------------------------------------------------------------------------------------------------------------------------------------------------
+ Add MyWebsite AWS::S3::Bucket N/A
-----------------------------------------------------------------------------------------------------------------------------------------------------
Changeset created successfully. arn:aws:cloudformation:us-east-1:053806060854:changeSet/samcli-deploy1671330287/7674b5d9-9fb6-4187-8208-150664530af4
2022-12-17 21:25:00 - Waiting for stack create/update to complete
CloudFormation events from stack operations (refresh every 0.5 seconds)
-----------------------------------------------------------------------------------------------------------------------------------------------------
ResourceStatus ResourceType LogicalResourceId ResourceStatusReason
-----------------------------------------------------------------------------------------------------------------------------------------------------
CREATE_IN_PROGRESS AWS::S3::Bucket MyWebsite -
CREATE_FAILED AWS::S3::Bucket MyWebsite my-resume-website already exists
UPDATE_ROLLBACK_IN_PROGRESS AWS::CloudFormation::Stack resume-stack The following resource(s) failed to
create: [MyWebsite].
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN AWS::CloudFormation::Stack resume-stack -
_PROGRESS
DELETE_COMPLETE AWS::S3::Bucket MyWebsite -
UPDATE_ROLLBACK_COMPLETE AWS::CloudFormation::Stack resume-stack -
-----------------------------------------------------------------------------------------------------------------------------------------------------
Error: Failed to create/update the stack: resume-stack, Waiter StackUpdateComplete failed: Waiter encountered a terminal failure state: For expression "Stacks[].StackStatus" we matched expected path: "UPDATE_ROLLBACK_COMPLETE" at least once
我的 IAM 用户拥有以下权限:
我的 template.yaml 文件:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
cloud-resume
Sample SAM Template for cloud-resume
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 3
MemorySize: 128
Resources:
MyWebsite:
Type: AWS::S3::Bucket
Properties:
BucketName: my-resume-website
HelloWorldFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
CodeUri: hello_world/
Handler: app.lambda_handler
Runtime: python3.9
Architectures:
- x86_64
Events:
HelloWorld:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /hello
Method: get
Outputs:
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
# Find out more about other implicit resources you can reference within SAM
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api
HelloWorldApi:
Description: "API Gateway endpoint URL for Prod stage for Hello World function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/"
HelloWorldFunction:
Description: "Hello World Lambda Function ARN"
Value: !GetAtt HelloWorldFunction.Arn
HelloWorldFunctionIamRole:
Description: "Implicit IAM Role created for Hello World function"
Value: !GetAtt HelloWorldFunctionRole.Arn
我已经删除了 CloudFormation 中的堆栈以及运行 sam deploy 后创建的所有 S3 存储桶,并在 template.yaml 文件中使用不同的堆栈名称和 s3 存储桶名称重新运行 sam deploy,但我仍然收到相同的错误消息。
我还尝试更改 template.yaml 文件中的资源代码块,如上一个问题所述:AWS Sam: Failed to create/update the stack Error
我更改了 template.yaml 文件中的节:
Resources:
MyWebsite:
Type: AWS::S3::Bucket
Properties:
BucketName: my-resume-website
上述 stackoverflow 问题中推荐的格式:
Parameters:
MyBucketName:
Type: String
Default: "resume-website"
Resources:
PatientCheckoutBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub "prefix-${MyBucketName}-suffix"
这有效,并且成功添加了 S3 存储桶,但将该存储桶命名为“prefix-resume-website-suffix”。
当我从 BucketName 中删除“prefix-”和“-suffix”时,sam 部署再次失败。
如何将 s3 存储桶添加为“简历网站”而不使用“前缀-”和“-后缀”?
我真诚地感谢任何人对此提供的帮助。
最好,
贾斯汀
最佳答案
AWS 上的某些资源需要是全局唯一的(例如 s3 存储桶名称),即在 AWS 上的其他任何地方都不会使用,而有些资源需要仅在您的 AWS 账户和特定区域内是唯一的(例如 lambda 和 SQS 名称)
我怀疑您遇到了先前已使用的存储桶名称的问题,我建议采用简单的命名约定,以避免所有资源上的命名冲突(特别是对于拥有多个开发人员的公司内的生产资源,以避免命名冲突,并且为了一目了然地看到哪些资源属于哪些堆栈),可以在资源名称前添加您的堆栈名称,例如:
Resources:
# s3 Buckets
MyResumeWebsite:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub ${AWS::StackName}-my-resume-website
# lambdas
SomeLambda:
Type: AWS::Serverless::Function
Properties:
FunctionName: !Sub ${AWS::StackName}-SomeLambda
# SQSs
SomeSQS:
Type: AWS::SQS::Queue
Properties:
QueueName: !Sub ${AWS::StackName}-SomeSQS
关于amazon-web-services - 错误 : Failed to create/update the stack: resume-stack, 服务员 StackUpdateComplete 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74842403/
我的几个 Android 应用程序在 logcat 输出中显示以下类型的消息: I/UsageStats( 59): Unexpected resume of com.totsp.test whi
因此,在“On Error GoTo 执行一次”下出现了几个 SO 问题和 Google 结果,几乎在每种情况下,推荐的解决方案都是添加 Err.Clear或者Resume的一些论坛清除错误。 VBA
我正在构建一个基于文本的 RPG,并且我已经成功地向我的程序添加了一些 .wav 文件,我也能够正常播放它们而没有问题任何一个。 目前发生了什么? 我有 2 个 .wav 文件,一个用于一般背景音乐
在那里, 我修改了 Lua 5.0 在线文档中的“perm”示例:http://www.lua.org/pil/9.3.html .我所做的是将 __call() 元方法重新指向 perm() 函数。
我意识到这是一个较旧的编程环境,但我必须清理一些 VB6代码,我发现它大部分使用: On Error Resume Next 使用On Error Resume Next的普遍共识是什么? ? 当然,
当我尝试恢复挂起(可恢复)编排实例时,出现以下错误。 场景:请求通过 DB2 静态请求 - 响应端口,但由于访问权限被拒绝而失败。我可以在管理控制台中看到两个暂停的实例,一个与端口相关,另一个与编排相
如何从最后上传的 block 中获取响应数据?我在任何地方都找不到它,我唯一发现的是您只能在错误时访问该消息 谢谢 最佳答案 找到了!如果您想从上传的文件中检索数据,您需要: r.on('fi
我无法建立exe: 1> ------ Assembly started: project: B, Configuration: Debug Any CPU B.vb (38.9): error BC
我在 aframe (ar.js) 中有一个 360° 旋转动画,我想暂停并继续它,而我所能做的就是暂停但从头开始重新开始。 Animation docum
我认为答案是否定的,但 Twilio 是否提供暂停/恢复录制的功能?用例正在录制通话,但在收集敏感信息时暂停录制。从 REST 文档来看,它似乎不是受支持的功能。认为有人可能已经找到了满足此要求的一些
我有一个包含 5 个模块的多模块 maven 项目。这些模块是分层的,因此一些依赖于构建的第一个(它是我的模型类),而一些依赖于构建的第二个(那些是核心应用程序类)。最后一个构建的是一个依赖于所有其他
如果我运行一个异步调用 onResume 是否有一个好的方法来检测异步调用是否正在运行以不再调用它? 因为我在 fragment 的 onResume 中使用 AsynTask 进行网络调用,它似乎被
如何向这个 javascript 倒数计时器添加恢复按钮? JS $(document).ready(function () { var $worked = $("#timer"); function
找不到明确的答案,基本上我有一个 EditText 字段的 Activity 。软键盘在 list 中设置为可见,因此当 Activity 开始时键盘是可见的,但是如果用户导航离开并使用后退按钮返回,
我正在看generators in Rust ,并决定试一试。我实现了我能找到的最基本的例子: #![feature(generators, generator_trait)] use std::op
我知道这之前已经发布过,但我是 swift 的新手,我想根据我的情况寻求帮助。所以我需要运行一个计时器,当 stopMusic() 被调用时(在我的应用程序中的某个地方),我需要暂停计时器,然后当 p
Android 中的共享首选项有问题 - 我希望能够将一些字符串(保存图片的 ID)作为下一次发布的最爱 - 它工作完美,它可以识别 ID 是否已经在共享首选项并在必要时将其删除,但是当我通过按下主页
我在我的 Node.js-express 应用程序中使用 Resumable.js。我可以知道文件传输成功了,因为我可以 console.log(req.body) 并在下面看到这个...... {
一年好景君须记,最是橙黄橘绿时。金三银四,秣马厉兵,没有一个好看的简历模板怎么行?无论是网上随便下载还是花钱买,都是一律千篇的老式模版,平平无奇,味同嚼蜡,没错,蜡都要沿着嘴角流下来了。本次我们基于
启用或禁用错误处理程序。 说明 如果在您的代码中未使用OnErrorResumeNext语句,所发生的运行时错误将显示错误信息,同时,代码的执行也随之终止。但是具体操作由运行代码的主机决定。主机
我是一名优秀的程序员,十分优秀!