I am trying to access my serverless created cognito userpool in a function declaration. However the usual Fn::GetAtt:
does not seem to work. What can I do to get the ARN of the user pool to use as the authroizer.
Example yaml:
functions:
graphQL:
handler: graphql.handler
events:
- http:
path: graphql
method: post
cors: true
authorizer:
name: authorizer
arn: #not working#
Fn::GetAtt:
- UserPool
- Arn
resources:
Resources:
UserPool:
Type: AWS::Cognito::UserPool
Properties:
DeviceConfiguration:
ChallengeRequiredOnNewDevice: true
DeviceOnlyRememberedOnUserPrompt: true
AdminCreateUserConfig:
AllowAdminCreateUserOnly: false
AliasAttributes:
- email
AutoVerifiedAttributes:
- email
EmailConfiguration:
EmailSendingAccount: DEVELOPER
ReplyToEmailAddress: contact@[redacted]
SourceArn: [redacted]
LambdaConfig:
CustomMessage:
Fn::GetAtt:
- CustomMessageLambdaFunction
- Arn
PreSignUp:
Fn::GetAtt:
- PreSignupLambdaFunction
- Arn
MfaConfiguration: OFF
Policies:
PasswordPolicy:
MinimumLength: 8
RequireLowercase: true
RequireNumbers: true
RequireSymbols: false
RequireUppercase: true
TemporaryPasswordValidityDays: 7
Schema:
- AttributeDataType: String
DeveloperOnlyAttribute: false
Mutable: false
Name: email
Required: true
UserPoolName: ProjectR
UserPoolTags:
project: "Project-R"
state: "Project-R-Dev"