简体   繁体   中英

How do I create ~/.aws/credentials file for Up on MAC

I'm developing a bot for Telegram and I am using Up to create a Lambda function for AWS. The problem is that when I want to create the function I get an error saying:

Error: Cannot find credentials, visit https://up.docs.apex.sh/#aws_credentials for help.

How do I create the ".aws" folder and the "credentials" file? Under what folder will this be saved? Is it in the same folder I created my bot?

This is on MAC.

安装适用于 Mac 的 AWS CLI 后,首次键入aws configure以初始化凭证文件。

  1. First, you need to install AWS CLI for OSX using the following link. Refer the documentation for Install the AWS Command Line Interface on macOS for more details.
  2. Then you need to create AWS Programmatic Access Credentials (After creating a AWS IAM User) and download the credentials. For this you need to go to the IAM section of AWS Web Console. Refer the documentation for Understanding and Getting Your Security Credentials for more details.
  3. Then configure the credentials using the shell commands. Refer the documentation Configuring the AWS CLI for more details.

If you have homebrew you can install awscli like this:

brew update
brew install awscli

And then use the following to configure your aws with you access id and token:

aws configure
  1. Install AWS CLI in your mac OS from link below: [ https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux-mac.html#cliv2-linux-mac-install][1]

  2. Verify installation. Change to aws instead of aws2 incase you are using version-1

$ aws2 --version
  1. Configure
$ aws2 configure

You need to configure your CLI before you can use it.

From https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html

"Quick Configuration For general use, the 'aws configure' command is the fastest way to set up your AWS CLI installation."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM