使用CloudFormation创建堆栈时,出现此错误:
Stack update error: Requires capabilities : [CAPABILITY_IAM]
Run Code Online (Sandbox Code Playgroud)
我找不到添加CAPABILITIES_IAM到CloudFormation配置的模板.
解决CAPABILITIES_IAM错误的选项有哪些?
我正在尝试在CodePipeline中使用CloudFormation模板配置字段.如果您在CodePipeline中编辑CloudFormation,它看起来像这样:
如果我的InputArtifactName就是MyAppBuild我有一个CloudFormation CONFIG文件中cfg-prd.json,我希望是我能进入MyAppBuild::cfg-prd.json,并将它捡起来.
我收到一个关于模板文件无效的错误,即使它手动工作如下:
--parameters cfg-prd.json
Run Code Online (Sandbox Code Playgroud) Java应用程序需要访问SharePoint 2013 REST API https://msdn.microsoft.com/en-us/library/office/jj860569.aspx
更愿意使用BASIC身份验证:
有许多在网络上使用其余api的例子,但似乎都没有处理身份验证.也许我错过了一些非常简单的东西.
这可以通过POSTMAN手动工作:http://tech.bool.se/basic-rest-request-sharepoint-using-postman/ 但要求我在浏览器中输入用户名和密码.
我试过实现这个: HttpClientBuilder基本 使用auth
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4.1</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
这会导致 - >警告:NTLM身份验证错误:凭据不能用于NTLM身份验证:org.apache.http.auth.UsernamePasswordCredentials
尝试更新aws cli中的cloudformation堆栈时:
aws --profile dev cloudformation update-stack --stack-name mystackname --template-body file://events-list.yaml
Run Code Online (Sandbox Code Playgroud)
我收到以下错误
An error occurred (ValidationError) when calling the UpdateStack operation: UpdateStack cannot be used with templates containing Transforms.
Run Code Online (Sandbox Code Playgroud)
因为我使用AWS无服务器转换进行lambda函数部署
Transform: 'AWS::Serverless-2016-10-31'
Run Code Online (Sandbox Code Playgroud)
是否有CLI方式来执行此堆栈更新,或者我将不得不在GUI中处理我的APM.
使用条件启用/禁用CloudFormation for CodePipeline的部分:
一旦构建了分段并通过了Runscope测试,这将创建一个手动通知操作:
- InputArtifacts: []
Name: !Join ["",[!Ref GitHubRepository, "-prd-approval"]]
ActionTypeId:
Category: Approval
Owner: AWS
Version: '1'
Provider: Manual
OutputArtifacts: []
Configuration:
NotificationArn: !GetAtt ["SNSApprovalNotification", "Outputs.SNSTopicArn"]
ExternalEntityLink: OutputTestUrl
RunOrder: 3
Run Code Online (Sandbox Code Playgroud)
如何使用条件启用/禁用其他CloudFormation资源:
操作步骤无法识别条件:参数
我可以制作两个整个管道代码的副本,一个没有,然后切换我创建的管道,但似乎应该有更好的方法.
对于小型 CloudFormation 和 CodePipeline 模板,我们可以“尝试-测试”以获得所需角色的最低权限 IAM 策略。
这通常包括:
这种方法对于较大的 CloudFormation 模板来说太耗时了。
您如何制定最低权限 IAM 策略?
想法:
允许“*”,然后为事件抓取 cloudtrail 并为列出的事件构建映射到它们的等效角色 - 然后将角色减少到仅在 cloudtrail 日志中列出的角色。
如果您可以将操作隔离到用户名,这会有所帮助
访问顾问
amazon-web-services aws-cloudformation amazon-iam aws-codepipeline
本教程介绍如何从CodePipeline调用Lambda传递单个参数:
http://docs.aws.amazon.com/codepipeline/latest/userguide/how-to-lambda-integration.html
我已经构建了一个需要获得2个参数的slackhook lambda:
通过CodePipeline编辑器传入JSON会导致JSON块被发送,因此无法直接解析.
UserParameter传入:
{
"webhook":"https://hooks.slack.com/services/T0311JJTE/3W...W7F2lvho",
"message":"Staging build awaiting approval for production deploy"
}
Run Code Online (Sandbox Code Playgroud)
Event有效内容中的用户参数
UserParameters: '{
"webhook":"https://hooks.slack.com/services/T0311JJTE/3W...W7F2lvho",
"message":"Staging build awaiting approval for production deploy"
}'
Run Code Online (Sandbox Code Playgroud)
当尝试直接在CLoudFormation中应用多个UserParameters时,如下所示:
Name: SlackNotification
ActionTypeId:
Category: Invoke
Owner: AWS
Version: '1'
Provider: Lambda
OutputArtifacts: []
Configuration:
FunctionName: aws-notify2
UserParameters:
- webhook: !Ref SlackHook
- message: !Join [" ",[!Ref app, !Ref env, "build has started"]]
RunOrder: 1
Run Code Online (Sandbox Code Playgroud)
创建错误 - 配置必须只包含简单对象或字符串.
任何关于如何让多个UserParameters从CloudFormation模板传递到Lambda的猜测都将非常感激.
以下是lambda代码供参考:https: //github.com/byu-oit-appdev/aws-codepipeline-lambda-slack-webhook
amazon-web-services aws-cloudformation aws-lambda aws-codepipeline
我想使用bash脚本和http克隆我的所有bitbucket团队存储库。我发现了一些使用Bitbucket API的示例,但是它们似乎都未返回任何存储库。有任何想法吗?使用Mac。
当 CodePipeline 创建生产资产时,我们需要提交变更请求。
在进入生产阶段时打开 RFC 并在成功的生产构建/测试时关闭 RFC 通过触发 Lambda 很容易。当 CodePipeline 阶段或测试操作失败时就会出现问题。
当 CodePipeline Stage 失败时如何触发 Lambda?同样,如何在 CodePipeline 测试操作失败时触发 Lambda?
使用以下buildspec.yml在codebuild中运行terraform部署。似乎terraform没有获得codebuild角色提供的IAM权限。我们正在使用terraform的远程状态(状态文件存储在s3中),当terraform尝试联系包含状态文件的S3存储桶时,它死了,要求provider配置terraform :
Downloading modules (if any)...
Get: file:///tmp/src486521661/src/common/byu-aws-accounts-tf
Get: file:///tmp/src486521661/src/common/base-aws-account-
...
Error configuring the backend "s3": No valid credential sources found for AWS Provider.
Run Code Online (Sandbox Code Playgroud)
这是buildspec.yml:
version: 0.1
phases:
install:
commands:
- cd common && git clone https://eric.w.nord@gitlab.com/aws-account-tools/acs.git
- export TerraformVersion=0.9.3 && cd /tmp && curl -o terraform.zip https://releases.hashicorp.com/terraform/${TerraformVersion}/terraform_${TerraformVersion}_linux_amd64.zip && unzip terraform.zip && mv terraform /usr/bin
build:
commands:
- cd accounts/00/dev-stack-oit-byu && terraform init && terraform plan && echo terraform apply
Run Code Online (Sandbox Code Playgroud) 我想创建几个xsl:变量,它们可能是null,也可能不是null,然后加入它们:
<xsl:variable name="creatorType" select="replace(lib:merge(subfields/subfield[matches(@code,'[e]')],' '),'author|[.$]','')" />
<xsl:variable name="creatorAttribution" select="replace(lib:merge(subfields/subfield[matches(@code,'[j]')],' '),'[,-.]$','')" />
<xsl:variable name="creatorNameFullForm" select="replace(lib:merge(subfields/subfield[matches(@code,'[q]')],' '),'[,-()]$','')" />
<xsl:variable name="creatorAffiliation" select="replace(lib:merge(subfields/subfield[matches(@code,'[u]')],' '),'[,-.]$','')" />
Run Code Online (Sandbox Code Playgroud)
string-join((xsl:sequence),'delimiter')似乎很合适,但也可以用空值连接变量.
<xsl:variable name="creatorDescriptors" select ="string-join(($creatorDates, $creatorType, $creatorAttribution, $creatorAffiliation),', ')"/>
Run Code Online (Sandbox Code Playgroud)
你怎么会只有字符串连接非空xsl:变量?
我现在得到这样的东西:
Mozart, Wolfgang Amadeus (1756–1791, Composer, , )
Run Code Online (Sandbox Code Playgroud) aws-lambda ×3
amazon-iam ×1
aws-cli ×1
bitbucket ×1
git ×1
java ×1
macos ×1
null ×1
rest ×1
saxon ×1
sharepoint ×1
terraform ×1
variables ×1
xslt ×1