小编use*_*403的帖子

AWS将变量传递到CodePipeline中的buildspec.yml

我有一个AWS CodePipeline,它在Build Stage中调用CodeBuild.

问题是我如何从CodePipeline中传入一个可以在CodeBuild的buildspec.yml中读取的环境变量?

我知道我可以在CodeBuild中设置环境变量,但是我想为dev,qa和prod环境使用相同的CodeBuild项目.我没有看到如何从CodePipeline传递环境变量,使其一直到buildspec.yml

示例buildspec.yml

version: 0.1

phases:   
  build:
    commands:
      - npm install
      - npm build -- --env ${CURRENT_ENVIRONMENT}
Run Code Online (Sandbox Code Playgroud)

其中CURRENT_ENVIRONMENT将是我在CodePipeline Stage操作中设置的变量.

aws-codepipeline

36
推荐指数
5
解决办法
1万
查看次数

AWS Cognito - 用户陷入CONFIRMED并且email_verified = false

如何查询确认已确认但email_verified为false的用户的电子邮件?

该场景大致是代理人代表他们注册用户,我通过管理员电话adminConfirmSignUp确认用户.此时,由于email_verified标志为false,用户无法更改其密码.

我无法调用resendConfirmationCode,因为用户已经确认.

我无法调用forgotPassword,因为email_verified标志为false.

我能想到的最好的方法是删除用户帐户并调用signUp(提示他们重新输入密码或新密码),从而重新创建帐户.

amazon-cognito

16
推荐指数
4
解决办法
1万
查看次数

如何针对AWS Cognito用户池进行身份验证

我创建了一个Cognito用户池.我可以列出用户并使用Java AWS SDK中的AWSCognitoIdentityProviderClient添加用户.

但是,我有一个自定义登录页面,我希望输入输入的用户名和密码,并对我的用户池进行身份验证.我没有在Java AWS SDK中看到任何可以传递凭据并从中获取身份验证结果的地方.

编辑:我无法通过此错误:

NotAuthorizedException:配置中缺少凭据

相关代码:

    AWS.config.region = 'us-east-1';
    AWS.config.credentials = new AWS.CognitoIdentityCredentials({
        IdentityPoolId: 'us-east-1:087a3210-64f8-4dae-9e3c...' // your identity pool id here
    });

    AWSCognito.config.region = 'us-east-1';
    AWSCognito.config.credentials = new AWS.CognitoIdentityCredentials({
        IdentityPoolId: 'us-east-1:087a3210-64f8-4dae-9e3c...' // your identity pool id here
    });

    var poolData = {
        UserPoolId: 'us-east-1_39RP...',
        ClientId: 'ttsj9j5...',
        ClientSecret: 'bkvkj9r8kl2ujrlu41c7krsb6r7nub2kb260gj3mgi...'
    };
    var userPool = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);

    var authenticationData = {
        Username: 'test@foo.com',
        Password: 'foobarfoo',
    };
    var authenticationDetails = new AWSCognito.CognitoIdentityServiceProvider.AuthenticationDetails(authenticationData);
    var userData = {
        Username: 'test@foo.com',
        Pool: userPool
    }; …
Run Code Online (Sandbox Code Playgroud)

javascript amazon-cognito

7
推荐指数
2
解决办法
1万
查看次数

Ansible with_dict模板使用

我有以下任务:

- name: copy server.xml
  template: src=server.xml dest=/var/containers/{{ item.key }}/conf
  with_dict: containers
Run Code Online (Sandbox Code Playgroud)

我还在group_vars中添加了容器字典

containers:
  frontend:
    http_port: 8080
  backend:
    http_port: 8081
Run Code Online (Sandbox Code Playgroud)

最后,这是server.xml的相关代码段

<Connector port="{{ http_port }}" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" />
Run Code Online (Sandbox Code Playgroud)

我想要发生的是在模板模块中使用相关的http_port.但相反,我得到并错误:

致命:[localhost] => {'msg':"AnsibleUndefinedVariable:一个或多个未定义的变量:'http_port'未定义",'失败':真}

这可能吗?如何利用项目的值进行变量替换?

ansible ansible-template

6
推荐指数
1
解决办法
2万
查看次数

Spring Zuul - 网关超时

我看到使用 Spring Cloud Zuul 网关模式的长请求的 504 响应。发出请求后恰好 1 分钟发生超时。

我尝试了以下方法无济于事:

zuul:
  ribbon:
    ConnectTimeout: 10000000
    ReadTimeout: 10000000
Run Code Online (Sandbox Code Playgroud)

和:

hystrix:
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 10000000
Run Code Online (Sandbox Code Playgroud)

hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: false
Run Code Online (Sandbox Code Playgroud)

这些都不能阻止网关在一分钟后超时。

java spring netflix-zuul

5
推荐指数
2
解决办法
7994
查看次数

如何启用cloudwatch日志并在cloudformation中分配自定义域名

我有一个cloudformation模板来使用API​​网关构建我的api.

我不知道如何:

  1. 在cloudformation模板中为舞台启用cloudwatch日志

  2. 将阶段分配给cloudformation模板中的自定义域名.

在json cloudformation模板中是否可以使用其中任何一个?

amazon-web-services aws-cloudformation amazon-cloudwatch

5
推荐指数
1
解决办法
1417
查看次数