- name: create EC2 instance ansible.amazon.aws.ec2: key_name: mykey group: webserver instance_type: t2.micro image: ami-0c55b159cbfafe1f0 wait: yes
- name: create S3 bucket ansible.amazon.aws.s3: name: my-bucket state: presentIn this example, the AnsibleAWSModule is used to create an S3 bucket with the specified name. The "state" parameter is set to "present" to ensure that the bucket is created if it doesn't already exist. Overall, the AnsibleAWSModule is a powerful tool for managing AWS resources using Ansible. By using this module, you can easily automate the creation and management of resources on AWS, making it easier to manage your infrastructure.