Aws elastic beanstalk cli setup on Mac - xcode

I am trying to install aws elastic beanstalk cli on my mac machine. In the prerequisites it says that Python requires following:
Xcode openssl zlib readline
But, on running the command, I get:
-bash: Xcode: command not found
How am I suppose to install this?

An alternative solution is to run the aws cli inside a docker container. It will eliminate the possible issues which may be caused by the OS/library upgrading in the future.

Related

docker-compose command not available for mac

I installed docker with the instructions here, downloading from docker-hub
https://docs.docker.com/docker-for-mac/install/
But when I run docker-compose I get this error
pyenv: docker-compose: command not found
The `docker-compose' command exists in these Python versions:
3.6.5/envs/myenv
Also, docker-compose is available under /Users
which docker-compose
/Users/<username>/.pyenv/shims/docker-compose
In this link says, docker-compose for mac need not be installed explicitly as it is part of docker for desktop mac.
https://docs.docker.com/compose/install/
Is something wrong with my installation?
I ran into the same issue on macOS today. Turned out that you need to run the installed app once, it does some additional downloading and setup. That setup includes setting up your path variables.
docker-compose is a utility that is now a parameter in mac docker
so instead of docker-compose up, its now docker compose up
if you install docker from official website then docker-compose will come along with that for mac so need to either upgrade and documentation is present there.

aws cli has no output

I've been using aws cli on this laptop for a while to interact with s3 buckets. Suddenly, the tool has stopping printing any output whatsoever:
C:\>aws
C:\>aws --debug
C:\>aws --help
C:\>where aws
C:\Users\Andrew\AppData\Roaming\Python\Python37\Scripts\aws
C:\Users\Andrew\AppData\Roaming\Python\Python37\Scripts\aws.cmd
This is in an administrator command prompt, but it's the same in an admin powershell prompt. Windows version 10.0.18362 Build 18362 - I took the anniversary update a few weeks ago but am not sure if it's correlated or not.
aws cli on my other (Win 10, anniversary update) machine, using the same authentication, works fine.
I've tried straight-up uninstalling and reinstalling aws cli, but after the reinstall I can't even get it to print anything to authenticate me.
Any ideas? Any more information I can give you?
For anyone stumbling across this, it seems that certain v2 versions (2.2.7 in my case) fail silently if less isn't installed.
In these cases, setting AWS_PAGER to an empty string should fix the problem.
Later AWS CLI versions (e.g. 2.2.18) are decidedly more helpful:
aws sts get-caller-identity
Unable to redirect output to pager. Received the following error when opening pager:
[Errno 2] No such file or directory: 'less'
Learn more about configuring the output pager by running "aws help config-vars".
I also faced the same issue.
It was like:
$aws sts get-caller-identity
Unable to redirect output to pager. Received the following error when opening pager:
[Errno 2] No such file or directory: 'less'
Learn more about configuring the output pager by running "aws help config-vars".
And the solution is yum install less or apt-get install less. After that, it will show the proper status, like:
{
"UserId": "AIDASAMPLEUSERID",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/DevAdmin"
}
I had the same problem and for me the solution was to install version 2 of aws cli.
From the quick read it might have been caused by Python and aws version dependency mismatch.
An easy way to solve this issue is by piping the output to cat.
Take your command aws sts get-caller-identity and add | cat
$ aws sts get-caller-identity | cat =
For Ubuntu and Linux users
sudo apt-get update && sudo apt-get install -yy less

Elastic Beanstalk & Docker - EB CLI Does Not Work on Mac! BUG

When I try and use elastic beanstalk from the command line (ie eb create project) I got the following error.
Select a platform version.
1) Docker 17.03.2-ce
2) Docker 1.12.6
3) Docker 1.11.2
4) Docker 1.9.1
5) Docker 1.7.1
6) Docker 1.6.2
7) Docker 1.5.0
(default is 1): 1
Note: Elastic Beanstalk now supports AWS CodeCommit; a fully-managed source control service. To learn more, see Docs: https://aws.amazon.com/codecommit/
Do you wish to continue with CodeCommit? (y/N) (default is n): n
Do you want to set up SSH for your instances?
(Y/n): y
Select a keypair.
1) patientplatypus
2) phoenixvuenewsly
3) [ Create new KeyPair ]
(default is 2): 1
patientplatypus:~/Documents/newsly_project:11:56:37$eb create newsly_project_production
ERROR: Platform Docker 17.03.2-ce does not appear to be valid
patientplatypus:~/Documents/newsly_project:11:57:44$docker --version
Docker version 17.09.0-ce, build afdb6d4
I thought the above seemed understandable enough, at first. I have version 17.09.0-ce of Docker, but I need version 17.03.2-ce. It would seem reasonable that AWS would be a few versions behind the latest version of Docker if nothing else than to double check system integration and security.
However, when it came time to find version 17.03.2-ce I found it almost impossible. https://github.com/moby/moby/releases points me to 17.03.02-ce as a direct link on the downloads page, which again downloads the wrong version. I tried downloading the link to the static binaries, however that was very confusing. This page https://docs.docker.com/engine/installation/linux/docker-ce/binaries/#next-steps says that in order to get the static binaries to compile I should run the command sudo cp docker/docker /usr/local/bin/, however nowhere in that static binary folder is there a folder labeled docker.
Meanwhile this page https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-17090-ce-mac32-2017-10-02-stable, goes from release Docker Community Edition 17.03.1-ce-mac12, 2017-05-12 (stable) to release Docker Community Edition 17.06.0-ce-mac18, 2017-06-28 (stable). Not only does this skip the one release I need, but it seems to have versions that are ahead of the most recent release at https://github.com/moby/moby/releases.
I'm very very confused. It should not be as difficult as this to get the currently stable version of Docker that runs with AWS. Can someone let me know how to resolve this issue?
EDIT:
I spun up my Linux Mint 18 (Ubuntu 16.04) and installed docker to try and get this to work. As it happens linux ALSO installs version Docker version 17.09.0-ce, however this one works with the 1) Docker 17.03.2-ce elastic beanstalk option. All the same commands on a linux environment running the same version of docker now run on eb cli. Therefore I am retitling this post as an EB CLI bug for mac. My question now is, where do I submit a bug report to AWS? I have searched for a github repository for them, but have not found it, and I think that most of their reporting through aws.amazon.com is for enterprise level customers.
Thanks!

Amazon's aws cli times out on macOS 10.12.5

I just installed the aws cli (via pip install awscli per Amazon's installation instructions) on macOS 10.12.5. The installation completed without issue. But when I run the app (e.g. $ aws help) it just hangs for about a minute and finally fails with:
$ aws help
ssh: connect to host xxx.xxx.xxx.xxx port 22: Operation timed out
I've tried running it from both Python 3.6.1 and 2.7.13 environments. The macOS firewall is disabled so I'm not blocking any outbound requests.
I'm not sure what else to try at this point.
That is very strange behaviour. The AWS CLI does not activate ssh.
I would suggest that you have another script called aws somewhere in your PATH that you previously used to connect to an Amazon EC2 instance, and that script is running rather than the AWS CLI.
Run this command to discover which one it is running:
$ which aws
/usr/local/bin/aws
In this case, mine is in $ /usr/local/bin/aws help, but yours is likely to be elsewhere.
To run the correct one, use:
$ /usr/local/bin/aws help

Error while installing aws autoscaling command line tools on linux?

I am installing AWS Autoscaling tools on linux redhat, But unfortunately the as-cmd command is not working.
I am getting this error :
-bash: as-cmd: command not found
How to resolve the error ?
Any lead is appreciated
To Answer your question:
run below:
$ updatedb
$ locate as-cmd
This should provide you the path of the command like /usr/bin/as-cmd. Either you should use this complete path while running the command OR you need to update your $PATH variable to include this path. Google if you want to know how to update PATH variable.
Now, some suggestions:
You should not use as-cmd anymore. Please use AWS CLI. Here is the AWS CLI relevant autoscaling commands
The reason being, as-cmd is not maintained by Amazon anymore and all the old CLI features have been exported to AWS CLI. AWS CLI is a one stop shop for all the AWS Services unlike older CLIs where you had to install a separate CLI for individual services.
AWS CLI provides output in JSON format which is much more easier to parse.
BESIDES, You don't have to play with CLI for autoscaling. Now, you can do the same job via AWS Console.

Resources