# Failed to create stack lambda-layer-test5: An error occurred (ValidationError) when calling the CreateStack operation: ParameterValue for ParameterKey Content is required

**URL:** <https://forum.ansible.com/t/failed-to-create-stack-lambda-layer-test5-an-error-occurred-validationerror-when-calling-the-createstack-operation-parametervalue-for-parameterkey-content-is-required/38713>\
**Category:** Ansible Project\
**Created:** [March 12, 2024, 3:53am UTC](https://forum.ansible.com/t/failed-to-create-stack-lambda-layer-test5-an-error-occurred-validationerror-when-calling-the-createstack-operation-parametervalue-for-parameterkey-content-is-required/38713 "2024-03-12T03:53:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kegmysta.dev](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kegmysta.dev/32/1664_2.png) [@kegmysta.dev](https://forum.ansible.com/u/kegmysta.dev)\
**Post date:** [March 12, 2024, 3:53am UTC](https://forum.ansible.com/t/failed-to-create-stack-lambda-layer-test5-an-error-occurred-validationerror-when-calling-the-createstack-operation-parametervalue-for-parameterkey-content-is-required/38713/1 "2024-03-12T03:53:16Z")

</div>

- name: Deploy CloudFormation Stack  
cloudformation:  
stack\_name: “{{ stack\_name }}”  
state: present  
region: “{{ region }}”  
template: “{{ template }}”  
template\_parameters:  
LayerName: “{{ item.1 }}”  
Runtime: “{{ item.0.name }}”  
Content:  
S3Bucket: “{{ s3bucket }}”  
S3Key: “{{ item.0.name }}-{{ item.1 }}-layer.zip”  
disable\_rollback: true  
tags:  
Stack: “{{ tags.Stack }}”  
Environment: “{{ tags.Environment }}”  
loop: “{{ lambda\_runtimes | subelements(‘layers’) }}”

Vars:

lambda\_runtimes:

- name: python310  
layers:
- requests
- name: python311  
layers:
- urllib3
- requests

stack\_name: lambda-layer-test5  
template: files/lambda\_layer.yml  
s3bucket: twe-enc-common-test-lambdalayer-org  
region: “{{ aws\_region }}”  
aws\_region: ap-southeast-2

tags:  
Stack: stack\_name  
Environment: Dev

error:

botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the CreateStack operation: ParameterValue for ParameterKey Content is required  
failed: [localhost] (item=[{‘name’: ‘python310’, ‘layers’: [‘requests’]}, ‘requests’]) =\> {  
“ansible\_loop\_var”: “item”,  
“boto3\_version”: “1.34.32”,  
“botocore\_version”: “1.34.32”,  
“changed”: false,  
“error”: {  
“code”: “ValidationError”,  
“message”: “ParameterValue for ParameterKey Content is required”,  
“type”: “Sender”  
},  
“invocation”: {  
“module\_args”: {  
“access\_key”: null,  
“aws\_ca\_bundle”: null,  
“aws\_config”: null,  
“backoff\_delay”: 3,  
“backoff\_max\_delay”: 30,  
“backoff\_retries”: 10,  
“capabilities”: [  
“CAPABILITY\_IAM”,  
“CAPABILITY\_NAMED\_IAM”  
],  
“changeset\_name”: null,  
“create\_changeset”: false,  
“create\_timeout”: null,  
“debug\_botocore\_endpoint\_logs”: false,  
“disable\_rollback”: true,  
“endpoint\_url”: null,  
“events\_limit”: 200,  
“notification\_arns”: null,  
“on\_create\_failure”: null,  
“profile”: “twe”,  
“region”: “ap-southeast-2”,  
“role\_arn”: null,  
“secret\_key”: null,  
“session\_token”: null,  
“stack\_name”: “lambda-layer-test5”,  
“stack\_policy”: null,  
“stack\_policy\_body”: null,  
“stack\_policy\_on\_update\_body”: null,  
“state”: “present”,  
“tags”: {  
“Environment”: “Dev”,  
“Stack”: “stack\_name”  
},  
“template”: “files/lambda\_layer.yml”,  
“template\_body”: null,  
“template\_parameters”: {  
“Content”: {  
“S3Bucket”: “twe-enc-common-test-lambdalayer-org”,  
“S3Key”: “python310-requests-layer.zip”  
},  
“LayerName”: “requests”,  
“Runtime”: “python310”  
},  
“template\_url”: null,  
“termination\_protection”: null,  
“validate\_certs”: true  
}  
},  
“item”: [  
{  
“layers”: [  
“requests”  
],  
“name”: “python310”  
},  
“requests”  
],

any help duly appreciated…, its driving me nuts ☹

---

<div class="post-metadata">

**Author:** ![rilindo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rilindo/32/357_2.png) [@rilindo](https://forum.ansible.com/u/rilindo)\
**Post date:** [March 12, 2024, 6:59pm UTC](https://forum.ansible.com/t/failed-to-create-stack-lambda-layer-test5-an-error-occurred-validationerror-when-calling-the-createstack-operation-parametervalue-for-parameterkey-content-is-required/38713/2 "2024-03-12T18:59:02Z")

</div>

That error is coming from the CloudFormation template, not from the Ansible code. Review the template and confirm that you are passing all the required parameter values.

Rilindo
