Error to write AWS configure in Visual Studio Code - amazon-web-services

When I write in Visual Studio Code AWS configure and press Enter, I get this error:
aws : The term 'aws' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
aws configure
What can I to solve this in Visual Studio Code?
CategoryInfo : ObjectNotFound: (aws:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException

Install the awscli
Then run the command:
aws configure

Related

How to create IAM group and user in AWS using powershell?

1 I am using PowerShell and want to run following command New-IAMGroup -Path "/ps-created-groups/" -GroupName "powerUsers", but getting below error
New-IAMGroup : The term 'New-IAMGroup' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1
New-IAMGroup -Path "/ps-created-groups/" -GroupName "powerUsers"
+ CategoryInfo : ObjectNotFound: (New-IAMGroup:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
How can this be resolved? I am new to Powershell.Your help much appreciated
The powershell cli for AWS does not install service specific cmdlets. You need to install them yourself.
See AWS documentation for this - https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up-windows.html
For IAM this will help you install the right cmdlets.
Install-AWSToolsModule AWS.Tools.IdentityManagement -Scope AllUsers
And then try to run your commands.
P.S. change the scope from AllUsers to CurrentUser as needed.

Hi My problem is with the terminal VS app

PS E:\learning\project\django\env\scripts> activate
activate : The term 'activate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
activate
+ CategoryInfo : ObjectNotFound: (activate:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Navigate to Venv environment and run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUse
then run:
.\\Scripts\Activate.ps1
this should activate your venv environment
to deactivate:
deactivate

Errors using AWSPowerShell in PowerShell

I am trying to work through the instructions on getting started with AWS IOT here. I have installed the prerequisites:
Windows 10
Visual Studio 2017 with latest updates
Windows Subsystem for Linux
But I think the page leaves some important things out. To use PowerShell I have to have some kind of AWSPowerShell or AWS Tools installed. When I run '.\provision_thing.ps1' it does some of the things but fails at Register-IOTThing and Get-IOTEndpoint. The errors I get are:
Register-IOTThing : The 'Register-IOTThing' command was found in the
module 'AWS.Tools.IoT', but the module could not be loaded. For more
information, run 'Import-Module AWS.Tools.IoT'. At
C:\Users\erics\source\repos\iot-dotnet-publisher-consumer\Dotnetsamples\provision_thing.ps1:44
char:1
Register-IOTThing `
+ CategoryInfo : ObjectNotFound: (Register-IOTThing:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
Get-IOTEndpoint : The 'Get-IOTEndpoint' command was found in the
module 'AWS.Tools.IoT', but the module could not be loaded. For more
information, run 'Import-Module AWS.Tools.IoT'. At
C:\Users\erics\source\repos\iot-dotnet-publisher-consumer\Dotnetsamples\provision_thing.ps1:48
char:17
$EndpointName = Get-IOTEndpoint
CategoryInfo : ObjectNotFound: (Get-IOTEndpoint:String) [], CommandNotFoundException
FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
When I try to run 'Import-Module AWS.Tools.IoT' as the error suggests I get:
Import-Module : The specified module 'AWSPowerShell' was not loaded
because no valid module file was found in any module directory. At
C:\Users\erics\source\repos\iot-dotnet-publisher-consumer\Dotnetsamples\provision_thing.ps1:1
char:1
Import-Module AWSPowerShell
CategoryInfo : ResourceUnavailable: (AWSPowerShell:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
If I attempt to install AWSPowerShell using Install-Module -Name AWSPowerShell I get a quite impressive and long error truncated here:
PS
C:\Users\erics\source\repos\iot-dotnet-publisher-consumer\Dotnetsamples>
Install-Module -Name AWSPowerShell
Untrusted repository You are installing the modules from an untrusted
repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are
you sure you want to install the modules from 'PSGallery'? [Y] Yes
[A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default
is "N"): A PackageManagement\Install-Package : The following commands
are already available on this system:'Add-ALXBContactWithAdd
ressBook,Add-ASInstances,Add-CTTag,Add-DPTags,Add-DSIpRoutes,Add-ELBTags,Add-EMRTag,Add-ESTag,Add-MLTag,Begin-RDSDTrans action,Build-LMBV2BotLocale,Clear-AWSCredentials,Clear-AWSDefaults,Commit-RDSDTransaction,Confirm-EC2EndpointConnection
,Confirm-EC2ReservedInstancesExchangeQuote,Confirm-EC2TransitGatewayPeeringAttachment,Confirm-EC2TransitGatewayVpcAttac
hment,Confirm-EC2VpcPeeringConnection,Dismount-ASInstances,Edit-EC2Hosts,Edit-RSClusterIamRoles,Enable-ORGAllFeatures,F
ind-CTEvents,Get-AG2ApiLis,Get-ASACases,Get-ASAccountLimits,Get-ASACommunications,Get-ASAServices,Get-ASASeverityLevels
,Get-ASATrustedAdvisorCheckRefreshStatuses,Get-ASATrustedAdvisorChecks,Get-ASATrustedAdvisorCheckSummaries,Get-ASLifecy
cleHooks,Get-ASLifecycleHookTypes,Get-AWSCredentials,Get-BATJobsList,Get-CDApplications,Get-CDDeployments,Get-CFCloudFr
ontOriginAccessIdentities,Get-CFDistributions,Get-CFGConfigRules,Get-CFGConfigurationRecorders,Get-CFGDeliveryChannels,
How can I clean this up and get access to AWSPowerShell in PowerShell?

Attempting to install AWS Elastic Beanstalk getting: ObjectNotFound: (C:\Users\Ameer:String) [], CommandNotFoundException

I'm following the instructions on the ELB github
I first run the following command :
git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git
but I'm encountering the following error when I run the second command
.\aws-elastic-beanstalk-cli-setup\scripts\bundled_installer
I'm using windows 10 and running the commands through cmd, however powershell gives me the same issue.
The error:
C:\Users\Ameer : The term 'C:\Users\Ameer' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\Users\Ameer Rayan\Desktop\Blog_Project\aws-elastic-beanst ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Ameer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Exiting due to failure

Loopback Installation: "The term 'lb4' is not recognized"

I have installed the Loopbackjs and when I am trying to run lb4 command it is showing the error.
lb4: The term 'lb4' is not recognized as the name of a cmdlet,
> function, script file, or operable program. Check the spelling of the
> name, or if a path was included, verify that the path is correct and
> try again. At line:1 char:1
> + lb4 app
> + ~~~
> + CategoryInfo : ObjectNotFound: (lb4:String) [], CommandNotFoundException
> + FullyQualifiedErrorId : CommandNotFoundException
>
> lb4: The term 'lb4' is not recognized as the name of a cmdlet,
> function, script file, or operable program. Check the spelling of the
> name, or if a path was included, verify that the path is correct and
> try again. At line:1 char:1
> + lb4 app
> + ~~~
> + CategoryInfo : ObjectNotFound: (lb4:String) [], CommandNotFoundException
> + FullyQualifiedErrorId : CommandNotFoundException
The CLI tool lb4 is shipped in the npm package #loopback/cli. You need to install this package globally. See Getting Started:
STEP 2
Install LoopBack 4 CLI
The LoopBack 4 CLI is a command-line interface that can scaffold a project or extension. The CLI provides the fastest way to get started with a LoopBack 4 project that adheres to best practices.
$ npm install -g #loopback/cli
Blockquote
If you faced this kind of problem please make sure that npm is installed globally. and check also that node is properly insatlled.