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

aws-apigateway-dynamodb: setting "allowReadOperation" to false does not disable the read operation #115

Closed
JakePartusch opened this issue Jan 6, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@JakePartusch
Copy link

Setting allowReadOperation to false does not disable the read operation.

Reproduction Steps

import { ApiGatewayToDynamoDBProps, ApiGatewayToDynamoDB } from "@aws-solutions-constructs/aws-apigateway-dynamodb";

new ApiGatewayToDynamoDB(this, 'test-api-gateway-dynamodb-default', {
  allowReadOperation: false
});

Error Log

There is no error in synthesizing the stack

Environment

  • CDK CLI Version : 1.79.0
  • CDK Framework Version: 1.79.0
  • AWS Solutions Constructs Version : 1.79.0
  • OS : Mac
  • Language : TypeScript

Other

This issue seems to be with this conditional:

if (!props.allowReadOperation || props.allowReadOperation === true) {

Given the three input options (true/false/undefined), the conditional always will evaluate to true


This is 🐛 Bug Report

@JakePartusch JakePartusch added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels Jan 6, 2021
@JakePartusch JakePartusch changed the title aws-apigateway-dynamodb: setting allowReadOperation to false does not disable the read operation aws-apigateway-dynamodb: setting "allowReadOperation" to false does not disable the read operation Jan 6, 2021
@hnishar hnishar removed the needs-triage The issue or PR still needs to be triaged label Jan 11, 2021
@hnishar hnishar self-assigned this Jan 11, 2021
@hnishar
Copy link
Contributor

hnishar commented Jan 11, 2021

JakePartusch@ This bug is fixed in v1.80.0, for proof see this

@hnishar hnishar closed this as completed Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants