Serverless AWS credentials

Creating a Serverless AWS profile and getting the keys

To create a new AWS profile, go to the AWS web console and log in.

Then go to the Users tab of the IAM section. Add a new user selecting the Programmatic Access option.

pragmatic access

In the permissions for the user, select the Attach Existing Policies Directly tab. Then use the input field for the following recommended policies you need to add.

  • IAMFullAccess: To automatically create execution roles for Lambda functions
  • AWSLambdaFullAccess For deploy Lambda
  • AmazonAPIGatewayAdministrator: To manage the API Gateway
  • AmazonDynamiDBFullAcess: For managing a DynamoDB database.
  • AmazonAPIGatewayPushToCloudWatchLogs: for loggin full requests and responses from API Gateway

After review the user in the third step, push the Create User button.

In the last step you can grab the access key ID and the secret access key.

Install the AWS CLI from the site or using Python 2.6.5 or later

$ pip install awscli

Running the configure command will allow to set the credentials

$ aws configure
AWS Access Key ID [None]: PREVIOUSLY_SAVED_KEY
AWS Secret Access Key [None]: PREVIOUSLY_SAVED_SECRET
Default region name [None]: us-west-2
Default output format [None]: json

for the region choose the appropiate region

Published: Jan 24, 2022