AWS CLI doesn't show output - amazon-web-services

I'm running into a weird situation where the aws cli doesn't show output at all. I tried running bad commands and it would show the expected error message but when I run a valid command such as: aws s3api list-buckets --profile prod it doesn't show anything, it just starts new line.

Related

Not able to Create Contact flow with lex bot

Trying to migrate contact flow from one instance to other able to migrate simple flow but issue is when I tried with lex bot not able to migrate contact flow.
aws connect describe-contact-flow --instance-id <value> --contact-flow-id <value> --region us-east-1
aws connect create-contact-flow --instance-id <value> --name test_flow --type AGENT_TRANSFER --region 'us-east-1' --content "{\"Version\":\"2019-10-30\",\"StartAction\":\"cd60c6aa-6229-4a47-81ae-bef78a528590\",\"Metadata\":{\"entryPointPosition\":{\"x\":15,\"y\":23.99998474121091},\"snapToGrid\":false,\"ActionMetadata\":{\"bbb8a214-1f5c-4534-bfe5-6bf5f0aab9a0\":{\"position\":{\"x\":685,\"y\":132}},\"d76376f8-9b97-42dc-8b96-60167fd5f7a2\":{\"position\":{\"x\":351,\"y\":15}},\"cd60c6aa-6229-4a47-81ae-bef78a528590\":{\"position\":{\"x\":194,\"y\":197.3333282470703},\"useDynamic\":false},\"e36919ca-8fe7-4797-8c7e-6524acd838f8\":{\"position\":{\"x\":446,\"y\":208},\"conditionMetadata\":[],\"useDynamic\":false,\"dynamicMetadata\":{},\"useLexBotDropdown\":true,\"useDynamicLexBotArn\":false,\"lexV2BotName\":\"jenkinsbooktrip\"}}},\"Actions\":[{\"Identifier\":\"bbb8a214-1f5c-4534-bfe5-6bf5f0aab9a0\",\"Type\":\"DisconnectParticipant\",\"Parameters\":{},\"Transitions\":{}},{\"Identifier\":\"d76376f8-9b97-42dc-8b96-60167fd5f7a2\",\"Parameters\":{\"FlowLoggingBehavior\":\"Enabled\"},\"Transitions\":{\"NextAction\":\"bbb8a214-1f5c-4534-bfe5-6bf5f0aab9a0\",\"Errors\":[],\"Conditions\":[]},\"Type\":\"UpdateFlowLoggingBehavior\"},{\"Identifier\":\"cd60c6aa-6229-4a47-81ae-bef78a528590\",\"Parameters\":{\"Text\":\"hi welcome\"},\"Transitions\":{\"NextAction\":\"e36919ca-8fe7-4797-8c7e-6524acd838f8\",\"Errors\":[],\"Conditions\":[]},\"Type\":\"MessageParticipant\"},{\"Identifier\":\"e36919ca-8fe7-4797-8c7e-6524acd838f8\",\"Parameters\":{\"Text\":\"welcome\",\"LexBot\":{\"Name\":\"jenkinsbooktrip\",\"Region\":\"us-east-1\",\"Alias\":\"$LATEST\"}},\"Transitions\":{\"NextAction\":\"bbb8a214-1f5c-4534-bfe5-6bf5f0aab9a0\",\"Errors\":[{\"NextAction\":\"bbb8a214-1f5c-4534-bfe5-6bf5f0aab9a0\",\"ErrorType\":\"NoMatchingError\"},{\"NextAction\":\"d76376f8-9b97-42dc-8b96-60167fd5f7a2\",\"ErrorType\":\"NoMatchingCondition\"}],\"Conditions\":[]},\"Type\":\"ConnectParticipantWithLexBot\"}]}"
An error occurred (InvalidContactFlowException) when calling the CreateContactFlow operation: None,
when trying without lex parameter it working fine able to create but with lex its through an error I am using aws cli command
I have had the same issue generally with connect. When the content is less than ~1500-2000 characters, the Api works perfectly. Once the contact flow content grows beyond that, you start getting those errors.
Yes that's right need to skip $ symbol and it will work fine.

Aws --version command works in jmeter, however other aws commands which needs --profile throws error in jmeter

I am trying to access aws cloudwatch metrics through jmeter for further processing. In order to do this, i am using OS sampler in JMeter,which has command as aws and parameter as my --version. So when i execute this, i get a result regarding my aws cli.
However when i am trying to use aws cloudwatch --profile test get-metrics etc, i am getting error in listerner that invalid parameters/commands,though similar commands works with command prompt.
Can some one help me with this?
enter image description here
My issue is JMeter recognizes aws,however its not able execute any other commabd other than aws --version
I believe you need to call cmd or bash interpreter depending on your operating system, like:
More information: How to Run External Commands and Programs Locally and Remotely from JMeter
The reason that error was being thrown is having all AWS cli params/properties sent on the same line of Command Parameters in OS Process Sampler.
AWS CLI v2 commands from JMeter on Windows (I use 10) need to be split on multi-line.
Below is my setup.
the original command is:
$ aws dynamodb list-tables
Result:

Invalid Endpoint When Attempting to Create S3 via AWSCLI

I am attempting to create an s3 bucket in aws via awscli but keep getting the error:
Invalid endpoint: https://s3.[us-east-1].amazonaws.com
AFAIK, from all the reading and searching, I have configured everything correctly (note, that I wiped out the Access Keys below so as not to broadcast online my private info).
I haven't seen this in the research I've done, but it seems to add the [] around the region by default, which may be throwing it off. I don't know how to change that if that is the issue.
For example, in the error message it shows up, and if I re-run aws configure, it displays Default region name [[us-east-1]].
I have also tried this, which fails, and makes no sense to me why not:
Anyone have any tips on what I am missing?
I just created a new S3 bucket using the aws cli using below command :-
aws s3api create-bucket --bucket test-ami-test --region us-east-1, here test-ami-test is my bucket name.
According to docs on AWS http://docs.aws.amazon.com/cli/latest/reference/s3api/create-bucket.html , below command is used to create a bucket :-
aws s3api create-bucket --bucket my-bucket --region us-east-1.
Also can you run aws configure list command and check the O/P matches the one specified in http://docs.aws.amazon.com/cli/latest/reference/configure/list.html.
Although I think your aws cli is configured properly, it's just you are not using correct command to create a bucket.

Invalid IPv6 URL while running commands using AWS CLI

configured AWS Cli on Linux system.
While running any command like "aws ec2 describe-instances" it is showing error "Invalid IPv6 URL"
Ran into the same error.
Running this command fixed the error for me:
export AWS_DEFAULT_REGION=us-east-1
You might also try specifying the region when running any command:
aws s3 ls --region us-east-1
Hope this helps!
or run aws configure and enter valid region for default region name
I ran into this issue due to region being wrongly typed. When you run aws configure during initial setup, if you try to delete a mistaken entry, it will end up having invalid characters in the region name.
Hopefully, running aws configure again will resolve your issue.

aws ec2 describe-instances command not working

I am executing the following command
aws ec2 describe-instances
The error that i am getting is:
Could not connect to the endpoint URL: "https://ec2.us-west-2.amazonaws.com/"
I tried this link in my browser and it was working fine. Actually i am completely new to AWS cli and i am trying to stop, start my instances using AWS cli.
I have used the command aws configure and then provided my access key and secret key. In the region i have entered us-west-2 and output as json.