I'm trying to setup powershell to work with AWS services. First I loaded the AWS
Install-Module -Name AWS.Tools.Common from powershell then tried to import various modules. I noticed folders for s3, Ec2 and Redshift and thats what I want. When I type Get-Help AWS in powershell, I don't see all of my folders. I only see folders for EC2 and the AWS.Tools.Common modules, AWS.Tools.Installer modules and EC2 modules. I don't think I installed this correctly. I used the link below
https://www.powershellgallery.com/packages/AWS.Tools.Common/4.1.237
also this link:
https://docs.aws.amazon.com/pdfs/powershell/latest/userguide/aws-pst-ug.pdf#pstools-getting-set-up-windows
I just wanted to work with my AWS services without using AWS CLI. I had Windows Powershell, but recently upgrade to Powershell Core 7. I'm not sure if there are too many Powershells on my system, but please let me know what I did wrong.
Related
In my Linux Ubuntu box, I have two variants for tools installed for AWS EC2.
AWS CLI v2 installed # /usr/local/aws-cli/2.4.0
These provide the unified AWS CLI interface that everyone is used to aws ec2 <subcmd>
EC2 API command line tools #/usr/bin/ec2-version
These tools seem to be mer shell scripts wrappers to java invocations of ec2 commands.
The actual Java files seem to be located in a jar ec2-
api-tools-1.6.14.1.jar.
Manage of ec2-version also shows a version of 1.6.14.1 api=2014-05-01
I am trying to write some automation scripts and would like to know which one of these are still supported by AWS. I understand 1st method had two variants AWS CLI v1 and AWS CLI v2, where CLI v1 is deprecated.
Is the 2nd variant EC2-api-tools (Java) also deprecated by Amazon, since the latest version seems to be somewhere in 2014.
Which of these tools versions should I go ahead with my automation?
The AWS Command-Line Interface (CLI) is continuously updated. You should use it.
I do not recognise ec2-api-tools, so I would recommend that you do not use them.
I have multiple standalone servers from where I want to upload/sync directories to Object Storage usign AWS CLI.
Do I have to install AWS CLI in each server? OR is there a common console/platform provided within AWS Object Storage from where I can call the same command over something like say SSH. How can I avoid installing cli to all the servers?
You have to install AWS CLI in all the servers even if you write the script to ssh from a single server that which is installed AWS CLI, SSH protocol will take the configuration from the remote server, not from a server where the script is running. It's better if you use a configuration management tool like ansible to speed up the process.
I'm about to install and use Amazon Inspector. We have many EC2 instances behind ELB. Plus some EC2 instances are opened via Auto-Scale.
My question: Is the Amazon Inspector doing its work locally or globally, meaning is the monitoring being made on the instance that it is installed on or it can be configured to include all the instances of the infrastructure?
If Inspector should be applied on every EC2 instance, can the Auto-Scale be configured to open the new instances with Inspector already installed on them and if yes, how can i do that?
I asked a similar question on the Amazon forum but got no response.
In the end I used the following feature to customise the EC2 instances that my application gets deployed to:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
Basically off the root of your .war file you need a folder named '.ebextensions' and in there a .config file containing some commands to install the Inspector client.
So my file 'inspector-agent.config' looks like this:
# Errors get logged to /var/log/cfn-init.log. See Also /var/log/eb-tools.log
commands:
# Download the agent installation script
"01-agent-repository":
command: sudo wget https://inspector-agent.amazonaws.com/linux/latest/install
# Run the installation script
"02-run-installation-script":
command: sudo bash install
I've found the answer and the solution, You have to install Amazon Inspector on each EC2 in order to inspect them all using Amazon Inspector.
About the Auto-Scale, I've applied Amazon Inspector on the main EC2 servers and took an image from them (after inspecting all the EC2s and fix all the issues). Then I've configured the Auto-Scale to lunch to lunch from the new AMIs (The Inspected AMIs).
I am working on infrastructure automation using Ansible scripts. I installed Tableau Server 10.2 on EC2 instance manually. It requires you to accept terms and asks for registration. Out of the box Tableau doesn't support silent install, at least I didn't find anything on their forums. Has anyone tried automating the installation of Tableau Server?
I would start with the Quickstart CloudFormation scripts that Tableau and AWS have posted here: Quickstart URL.
They have a windows single machine install and a cluster, both of which use a python script to do the silent install. If your looking for the Linux setup, their is a branch with a CloudFormation that does a linux install on a single server.
If your Tableau install requires AD, the documentation out there will say that the Quickstart doesn't support it. However, if you check out the config.yml file used in the quick start and the documentation here it appears you can put in the AD configuration you need in the json file.
In your script, post install, you'll want to copy your backup configuration from s3, and perform a restore using the tabadmin restore backupFile. Most of what the CloudFormation does should be useable in Ansible.
We are attempting to setup mod_pagespeed on AWS (through SSH), but came across the below message indicating that changes will be lost if a new instance is created.
This EC2 instance is managed by AWS Elastic Beanstalk. Changes made via SSH WILL BE LOST if the instance is replaced by auto-scaling.
I've attempted searching online for a solution to this, but am not yet fully familiar with AWS terminology - and therefore am a little lost. Anyone have any ideas / recommendations on how to proceed? If there's a viable option other than SSH, I'm all ears. Thanks in advance! :)
Take a look at the ElasticBeanstalk doc on Customizing Software on Linux Servers, especially the Packages section. By specifying the extra packages in EB's own config file format, these packages will be installed with each new instance, and when the environment is created. ElasticBeanstalk provides essentially the same options as EC2 Metadata for packages, files, etc., using config files in your application version bundle.
The downside is that there is a learning curve to these config files, and getting your service configured properly is a bit different than just doing it yourself via SSH. But it is more repeatable and in line with how ElasticBeanstalk is designed to work.