# aws\_s3 - not sure if I understand how to use

**URL:** <https://forum.ansible.com/t/aws-s3-not-sure-if-i-understand-how-to-use/32248>\
**Category:** Ansible Project\
**Tags:** ansible-project, aws\
**Created:** [February 17, 2020, 10:32am UTC](https://forum.ansible.com/t/aws-s3-not-sure-if-i-understand-how-to-use/32248 "2020-02-17T10:32:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [February 17, 2020, 10:32am UTC](https://forum.ansible.com/t/aws-s3-not-sure-if-i-understand-how-to-use/32248/1 "2020-02-17T10:32:53Z")

</div>

As you are beginning with ansible, start with the simplest option,  
which is just a single playbook file, and don't bother with roles yet.  
Something like this should already work to create a bucket:

- hosts: localhost  
&nbsp;&nbsp;gather\_facts: False

&nbsp;&nbsp;tasks:  
&nbsp;&nbsp;&nbsp;&nbsp;- name: Create S3 Bucket  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aws\_s3:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bucket: my-bucket  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mode: create  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;permission: private-read  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;region: us-east-1

Provided your environment contains AWS\_SECRET\_ACCESS\_KEY and  
AWS\_ACCESS\_KEY\_ID. Read  
[https://docs.ansible.com/ansible/latest/scenario\_guides/guide\_aws.html](https://docs.ansible.com/ansible/latest/scenario_guides/guide_aws.html)  
on how that works.

Please note that 'private-read' isn't a valid option for the  
permission, see  
[https://docs.ansible.com/ansible/latest/modules/aws\_s3\_module.html#parameter-permission](https://docs.ansible.com/ansible/latest/modules/aws_s3_module.html#parameter-permission)  
for the supported values.

Dick

---

<div class="post-metadata">

**Author:** ![David\_Rivera](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@David\_Rivera](https://forum.ansible.com/u/David_Rivera)\
**Post date:** [February 17, 2020, 6:08pm UTC](https://forum.ansible.com/t/aws-s3-not-sure-if-i-understand-how-to-use/32248/2 "2020-02-17T18:08:06Z")

</div>

Hi,

That was the weird thing. When I run it it gives me this error.

ERROR! aws\_s3 is not a valid attribute for a Play.

This is the only reason why I started to try a different avenue…

Oh well…

Thanks  
David
