Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyValueStoreAssociations missing in CloudFront CreateFunction #3139

Closed
colask8 opened this issue Mar 12, 2024 · 3 comments
Closed

KeyValueStoreAssociations missing in CloudFront CreateFunction #3139

colask8 opened this issue Mar 12, 2024 · 3 comments
Assignees
Labels
bug This issue is a confirmed bug. cloudfront p3 This is a minor priority issue response-requested Waiting on additional info and feedback.

Comments

@colask8
Copy link

colask8 commented Mar 12, 2024

Describe the bug

Per AWS Boto3 documentation https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudfront/client/create_function.html
Parameter in FunctionConfig is missing. Looking at the definition the parameter is not listed. Resulting in an Parameter Validation error

   "FunctionConfig":{
      "type":"structure",
      "required":[
        "Comment",
        "Runtime"
      ],
      "members":{
        "Comment":{
          "shape":"string",
          "documentation":"<p>A comment to describe the function.</p>"
        },
        "Runtime":{
          "shape":"FunctionRuntime",
          "documentation":"<p>The function's runtime environment. The only valid value is <code>cloudfront-js-1.0</code>.</p>"
        }
      },
      "documentation":"<p>Contains configuration information about a CloudFront function.</p>"

Expected Behavior

Expected behavior, it should accept

response = client.create_function(
    Name='string',
    FunctionConfig={
        'Comment': 'string',
        'Runtime': 'cloudfront-js-1.0'|'cloudfront-js-2.0',
        'KeyValueStoreAssociations': {
            'Quantity': 123,
            'Items': [
                {
                    'KeyValueStoreARN': 'string'
                },
            ]
        }
    },
    FunctionCode=b'bytes'
)

Current Behavior

ParamaterValidation error:

    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in FunctionConfig: "KeyValueStoreAssociations", must be one of: Comment, Runtime

Reproduction Steps

Create function from boto3 cloudfront client

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.34.60

Environment details (OS name and version, etc.)

Mac OS 14.2.1 (23C71), python 3.11

@colask8 colask8 added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Mar 12, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Mar 12, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK added investigating This issue is being investigated and/or work is in progress to resolve the issue. cloudfront p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Mar 12, 2024
@RyanFitzSimmonsAK
Copy link
Contributor

Hi @colask8, thanks for reaching out. I was not able to reproduce this behavior using the sample code. Could you provide debug logs of the behavior? You can get debug logs by adding boto3.set_stream_logger('') to the top of your script, and redacting any sensitive information. Any additional environment details you can provide would also be helpful. Specifically, are you using Lambda in this at all? Thanks!

@RyanFitzSimmonsAK RyanFitzSimmonsAK added response-requested Waiting on additional info and feedback. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Mar 12, 2024
@colask8
Copy link
Author

colask8 commented Mar 12, 2024

Hi @RyanFitzSimmonsAK,

Thanks for assistance. After your reply I went to verify the packages in my python venv and found out python3 and python3.11 didnt point to same python site-packages. Issue was one of them had botocore 1.28.x
Managed to upgrade to botocore[crt] and the issue is gone.

Apologies for inconvenience.

KR,
Stojan - Cola

@colask8 colask8 closed this as completed Mar 12, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. cloudfront p3 This is a minor priority issue response-requested Waiting on additional info and feedback.
Projects
None yet
Development

No branches or pull requests

2 participants