Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

serverless kafka event source failing to resolve resources using !Ref #11472

Unanswered
gauti264 asked this question in Q&A
Discussion options

Hi,

I'm creating a security group under resources as below:

  rEventTriggerSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      VpcId: 'vpcId'
      GroupDescription: Security group for Event Processor lambda
      SecurityGroupEgress:
        - IpProtocol: "-1"
          CidrIp: 0.0.0.0/0
          Description: "Egress to the kafka"

I'm trying to refer above security group with its logical name as below:

functions:
eastClusterRawEventsProcessorFunction:
name: ${self:custom.config.department}-${self:custom.config.namespace}-EastClusterRawEventsProcessorFunction
handler: src/readInboundEvents.handler
events:
- kafka:
topic: ${self:custom.config.raw_inbound_topic, 'test-topic'}
bootstrapServers: test-server
accessConfigurations:
saslPlainAuth: ${self:custom.cc_region1.consumer_secret, 'test-secret'}
vpcSubnet:
- 'subnet-1'
**vpcSecurityGroup:
- !Ref rEventTriggerSecurityGroup **
When I deploy as above, I'm getting the following error:

Resource handler returned message: "1 validation error detected: Value 'security_group:[object Object]' at 'sourceAccessConfigurations.5.member.uRI' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z0-9-/:_+=.@-] (Service: Lambda, Status Code: 400, Request ID: ea19db39-384e-452a-a822-3ac4226f8ff9)" (RequestToken: 77febf5d-0c79-6595-53d3-27412dae925a, HandlerErrorCode: GeneralServiceException)

I would like to know if I'm doing it correctly or not, any help would be greatly appreciated.

You must be logged in to vote

Replies: 1 comment

Comment options

Hi team @eahefnawy, @czubocha, @overbit

Can someone follow this up after 3 years? it's a hassle to automate arns and subnet/sg ids for the Kafka trigger, it seems like it cannot resolve the Ref, Import or any of them at cloudformation level, meanwhile all of them are being build at the deploy stage.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.