Error while running yaml from cloudformation - yaml

Getting error when I run following code:
Parameters:
Counter:
Type : Number
Default : 5
Description : Maximum number of times to check query execution
Error:
An error occurred (ValidationError) when calling the CreateChangeSet operation: Invalid input for parameter key Counter. Cannot specify usePreviousValue as true for a parameter key not in the previous template
I am writing code in yaml and running via AWS cloudformation.

Are you creating a ChangeSet or updating the stack using the option usePreviousValue? The error mentions you are using the usePreviousValue with a parameter that doesn't exist in the template. You can only use the previous value if this parameter is part of the latest version of the template.

Related

xpath not working for UFT14 getting Failed to run the test due to an unknown error

I am trying to run the following code.
SystemUtil.Run "Chrome.exe","https://www.mortgagecalculator.org/"
val = Browser(MortCalPage).Page(MortCalPage).WebElement("xpath:=//DIV/DIV/H3\[normalize-space\(\)=""\$.*").GetROProperty ("outertext")
But i am either getting "Failed to run the test due to an unknown error." or unable to find object error
Used a reg exp for xpath
Original Value of xpath after obj identification:
"xpath:=//DIV/DIV/H3\[normalize-space\(\)=""\$1,401\.63""\]"
Value of xpath after using reg ex:
"xpath:=//DIV/DIV/H3\[normalize-space\(\).*"

Invalid Yaml: mapping values are not allowed here

Can anyone help me to figure out the following error while deploying react app on AWS elastic beanstalk -
2019-08-01 04:37:21 ERROR The configuration file .ebextensions/nodecommand.
config in application version app-5466-190801_100700 contains invalid YAML or JS
ON. YAML exception: Invalid Yaml: mapping values are not allowed here
in "<reader>", line 3, column 16:
option_settings:
^
, JSON exception: Invalid JSON: Unexpected character (/) at position 0.. Update
the configuration file.
2019-08-01 04:37:21 ERROR Failed to deploy application.
Following is my nodecommand.config file -
option_settings:
aws: elasticbeanstalk:container:nodejs:
NodeCommand: "node server.compiled.js"
Update -
I followed this link to deploy React app on AWS elastic beanstalk and stuck on above error -
https://medium.com/#wlto/how-to-deploy-an-express-application-with-react-front-end-on-aws-elastic-beanstalk-880ff7245008
This is what's shown in the linked tutorial:
option_settings:
aws:elasticbeanstalk:container:nodejs:
NodeCommand: "node server.compiled.js"
This is the YAML in your question:
option_settings:
aws: elasticbeanstalk:container:nodejs:
NodeCommand: "node server.compiled.js"
Can you spot the difference?
Spoiler: You've put a space after aws:. This causes the YAML parser to assume aws: is a mapping key with the value "elasticbeanstalk:container:nodejs:". However, the next line, which also starts with a mapping key (NodeCommand), is indented more, which would only be allowed if the previous line was a mapping key without a value.
If you remove the space, it correctly parses aws:elasticbeanstalk:container:nodejs as a mapping key and the following line as its value.
I was not actually had the problem fixed. I found this document[1] that says because my environment is using Amazon Linux 2, the ebextensions is not recommended. (But some of my ebextensions are still working. I have no idea about that). Instead, Buildfile, Procfile, and platform hooks are recommended. Therefore, I created a Procfile with the following content to make the Node server run with the command node index.js.
Procfile
web: node index.js
[1] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html

a required argument is missing: /key:[Sonarqube project key]

I am trying to run sonarqube analysis but I am getting the error
"a required argument is missing: /key:[Sonarqube project key]"
C:\Sonarqube\sonarqube-6.7\sonarqube-6.7\bin\sonar-scanner-msbuild-4.0.2.892\SonarQube.Scanner.MSBuild.exe begin /key: {projectkey} /name:{projectname} /version:{1.0}
I have used the following url
I have tried using the "" in Key and Name but still get the same error
can anyone suggest how to do this?
There's a typo in the command line: the space between /key: and {projectkey}. This is what produces this error message.

Issue using User defined parameter in Build Feature teamcity?

I have template which have two build steps:
Maven
Command line
Command line steps sets current datetime in variable which i want to use in Build Feature.
I am getting proper Current datetime as follows via Command Line step:
#!/bin/bash
export current_build_date_format="+%%d%%m%%Y_%%H%%M%%S"
export current_build_date="$(date $current_build_date_format)"
##teamcity[setParameter name='current_build_date' value='$current_build_date']
When i am trying to refer it in Build Feature, its not able to identify parameter via "%current_build_date%"
It shows paramter as undefined in Configuration Parameter section
Anything missing? I have defined that parameter via command line, how will teamcity features use that
Parameter error:
Error while reading user defined parameter first:
Initialization
[05:42:27][Initialization] - Build Details Validator
[05:42:27][ Build Details Validator] Error: Conversion = 'm'
[05:42:27][Initialization] Build validation failed
You need to echo TeamCity service message to let TeamCity parse and use it, e.g.:
echo "##teamcity[setParameter name='current_build_date' value='$current_build_date']"

Error while connecting Elastic Map Reduce ruby client

I am following the steps mentioned on the AWS to use an interactive Hive session using SSH.
I used the following resources
https://github.com/ucbtwitter/getting-started/wiki/Using-Elastic-Map-Reduce-via-Command-Line
http://docs.amazonwebservices.com/ElasticMapReduce/latest/GettingStartedGuide/SignUp.html
I was getting this error initially "Error: Missing key access-id" and then I fixed my JSON file. The JSON file is in the same format as mentioned in the above links.
When I run this command
./elastic-mapreduce
I am getting the following error :-
Error: Unable to parse credentials.json: can't convert String into Integer.
I checked the values required in JSON at AWS as well.
Does anyone has an idea why am I getting this error?
The region value in the credentials.json must be of int type.
{......
......
"region": 1
}

Resources