bobbyhadz blog

I write articles about Amazon Web Services.

227
Change User Status from FORCE_CHANGE_PASSWORD in Cognito

Change User Status from FORCE_CHANGE_PASSWORD in Cognito

To change a Cognito user's status from `FORCE_CHANGE_PASSWORD` to `CONFIRMED`, we have to change their password. To change a cognito user's password, use the `admin-set-password` c...

awscognito
avatar

Borislav Hadzhiev

Fri Sep 24 20212 min read

How to Verify a Cognito User's Email

How to Verify a Cognito User's Email

To verify a cognito user's email, use the `admin-user-attributes` command, setting the `email_verified` parameter to `true`.

awscognito
avatar

Borislav Hadzhiev

Fri Sep 24 20211 min read

How to get an Identity Pool's ID in AWS Cognito

How to get an Identity Pool's ID in AWS Cognito

To get an Identity Pool's ID in AWS Cognito, open the AWS Cognito console, click on `Manage Identity Pools`, select your identity pool from the list and click on the `Edit identity...

awscognito
avatar

Borislav Hadzhiev

Fri Sep 24 20211 min read

How to Update Cognito User Attributes

How to Update Cognito User Attributes

To update a Cognito User's attributes use the admin-update-user-attributes command, setting the user-attributes parameter to a space separated list of name-value pairs.

awscognito
avatar

Borislav Hadzhiev

Fri Sep 24 20212 min read

Get the Item Count of a Dynamodb Table

Get the Item Count of a Dynamodb Table

To get the total item count of a dynamodb table, in the `Overview` tab of your table, scroll to the `Items summary` section and click on the `Get live item count` button.

awsdynamodb
avatar

Borislav Hadzhiev

Fri Sep 24 20212 min read

Solve - Policy has Prohibited field Principal AWS Error

Solve - Policy has Prohibited field Principal AWS Error

To solve the "Policy has Prohibited field Principal" error, we have to add the `Principal` field to the role's trust policy, and not its permissions policy.

awserror
avatar

Borislav Hadzhiev

Fri Sep 24 20212 min read

Set the Default Profile's Name in AWS CLI

Set the Default Profile's Name in AWS CLI

In order to set the name for the default AWS CLI profile, set the `AWS_PROFILE` environment variable to the name of the profile stored in your `credentials` and `config` files, e.g...

awscli
avatar

Borislav Hadzhiev

Fri Sep 24 20211 min read

How to Clear your AWS CLI Credentials

How to Clear your AWS CLI Credentials

To clear your AWS CLI credentials locate the `credentials` and `config` files and delete the sections referring to the unnecessary profiles.

awscli
avatar

Borislav Hadzhiev

Fri Sep 24 20212 min read

How to Get your Account Id with AWS CLI

How to Get your Account Id with AWS CLI

To get your account Id using AWS CLI, run the `sts get-caller-identity` command, setting the `--query` parameter to `Account` to filter the output.

awscli
avatar

Borislav Hadzhiev

Fri Sep 24 20211 min read

Add a Bucket Policy to an AWS S3 Bucket

Add a Bucket Policy to an AWS S3 Bucket

To add a bucket policy to an S3 bucket, click on the `Permissions` tab in your S3 bucket's console, in the `Bucket Policy` section click on the `Edit` button and enter a JSON bucke...

awss3
avatar

Borislav Hadzhiev

Thu Sep 23 20212 min read

Configure CORS for an AWS S3 Bucket

Configure CORS for an AWS S3 Bucket

To configure CORS for an S3 bucket, open the AWS S3 console, click on your bucket's name. In the `Permissions` tab scroll down to the `CORS` section, click Edit and enter a JSON CO...

awss3
avatar

Borislav Hadzhiev

Thu Sep 23 20213 min read

Get the Size of a Folder in AWS S3 Bucket

Get the Size of a Folder in AWS S3 Bucket

To get the size of a folder in an S3 bucket, open the AWS S3 console, click on the checkbox next to your folder's name, click on the `Actions` button and select `Calculate total si...

awss3
avatar

Borislav Hadzhiev

Thu Sep 23 20212 min read

How to Get the Size of an AWS S3 Bucket

How to Get the Size of an AWS S3 Bucket

To get the size of an S3 Bucket, open the AWS S3 console and click on the bucket's name. Then navigate to the Metrics tab. In the `Bucket Metrics` section you can see the `Total bu...

awss3
avatar

Borislav Hadzhiev

Wed Sep 22 20212 min read

How to Rename a Bucket in AWS S3

How to Rename a Bucket in AWS S3

A complete, step-by-step guide on how to rename an AWS S3 bucket.

awss3
avatar

Borislav Hadzhiev

Wed Sep 22 20213 min read

How to Rename a Folder in AWS S3

How to Rename a Folder in AWS S3

To rename an S3 folder, use the `s3 mv` command, passing in the complete S3 URI of the current folder's location and the S3 URI of the desired folder's location.

awss3
avatar

Borislav Hadzhiev

Wed Sep 22 20213 min read

Allow Public Read access to an AWS S3 Bucket

Allow Public Read access to an AWS S3 Bucket

To allow public read access to an S3 bucket, update the bucket's permissions to unblock public access and update the bucket's policy to grant public read.

awss3
avatar

Borislav Hadzhiev

Wed Sep 22 20212 min read

How to get an S3 Bucket's URL

How to get an S3 Bucket's URL

To get an S3 bucket's URL, open the AWS console, click on the `Properties` tab, scroll to the bottom until you find the `Static Website Hosting` section and copy the bucket's url.

awss3
avatar

Borislav Hadzhiev

Wed Sep 22 20212 min read

How to get an S3 Bucket's ARN

How to get an S3 Bucket's ARN

To get an S3 bucket's ARN, navigate to the AWS S3 console, click on the radio button next to the bucket's name and click on the Copy ARN button.

awss3
avatar

Borislav Hadzhiev

Tue Sep 21 20211 min read

List all Files in an S3 Bucket with AWS CLI

List all Files in an S3 Bucket with AWS CLI

To list all of the files of an S3 bucket with the AWS CLI, use the `s3 ls` command, passing in the `--recursive` parameter.

awsclis3
avatar

Borislav Hadzhiev

Tue Sep 21 20212 min read

Copy a Local Folder to an S3 Bucket

Copy a Local Folder to an S3 Bucket

To copy the files from a local folder to an S3 bucket, run the `s3 sync` command, passing in the source directory and the destination bucket as inputs.

awsclis3
avatar

Borislav Hadzhiev

Tue Sep 21 20212 min read

Copy Files and Folders between S3 Buckets

Copy Files and Folders between S3 Buckets

To copy files between S3 buckets with the AWS CLI, run the `s3 sync` command, passing in the names of the source and destination paths of the two buckets.

awsclis3
avatar

Borislav Hadzhiev

Tue Sep 21 20213 min read

author avatar

Borislav Hadzhiev

Web Developer

SUPPORT ME : )

buy me a coffee

Add me on LinkedIn

I'm a Web Developer with TypeScript, React.js, Node.js and AWS experience.

Let's connect on LinkedIn

Buy Me A Coffee