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-kinesisstream-gluejob: Can't create multiple Jobs in the same stack #199

Closed
FinnIckler opened this issue May 27, 2021 · 1 comment · Fixed by #197
Closed

aws-kinesisstream-gluejob: Can't create multiple Jobs in the same stack #199

FinnIckler opened this issue May 27, 2021 · 1 comment · Fixed by #197
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged

Comments

@FinnIckler
Copy link

It's not possible to two Streaming Jobs, as Glue Policy has a hard-coded name and can not be created twice. This could be fixed by appending the construct name to the Glue Policy name

Reproduction Steps

streaming_job = KinesisstreamsToGluejob(self, "streaming-job", glue_job_props={"command": {
            "name": "gluestreaming",
            "pythonVersion": "3",
            "scriptLocation": assets.Asset(self, "SparkCode", path="spark_code/transform.py").s3_object_url,
        }}, field_schema=SCHEMA, existing_stream_obj=input_data_stream)

streaming_job_2 = KinesisstreamsToGluejob(self, "streaming-job2", glue_job_props={"command": {
    "name": "gluestreaming",
    "pythonVersion": "3",
    "scriptLocation": assets.Asset(self, "SparkCode2", path="spark_code/maps.py").s3_object_url,
}}, existing_table=streaming_job.table, existing_database=streaming_job.database,
                                        existing_stream_obj=input_data_stream)

Error Log

jsii.errors.JSIIError: There is already a Construct with name 'GlueJobPolicy' in Construct

Environment

  • **CDK CLI Version :1.104
  • **CDK Framework Version:1.104
  • **AWS Solutions Constructs Version :1.104
  • **OS :MacOs
  • **Language :Python

Other


This is 🐛 Bug Report

@FinnIckler FinnIckler added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels May 27, 2021
@biffgaut
Copy link
Contributor

Pretty sure the issue is here-

Consider creating the name like this:

const eventsRuleToStepFunction = new EventsRuleToStepFunction(this, `${id}-event-rule-step-function-construct`, {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants