Description: Here I have explained, How to Create Bucket in AWS using Ansible
Create IAM user from AWS:
- IAM user need to Authorize Ansible Playbook to manage the S3 bucket
- Open IAM console from AWS and navigate to IAM service
- Give S3 Full Access to IAM created user
- Once the user created, download the user detail .csv file which contains Access Key and Secret ID
- boto
# pip install boto - boto3
# pip install boto3 - python version >= 2.6
# yum install python
Create ssh key for localhost to authorize
# ssh-keygen
# vi Create_Bucket.yml --- - hosts: localhost tasks: - name: Create an S3 bucket become: true aws_s3: aws_access_key=XXXXXXXX aws_secret_key=XXXXXXXXXXXXXXX bucket=techblogalbucket mode=create permission=public-read region=us-east-1
- Run yml file using ansible-playbook command
No comments:
Post a Comment