Hi,
I’m trying to deploy a Serverless project to AWS which contains a Secrets Manager secret with automatic rotation using a Lambda function. However, deploy fails with the following error:
ERROR: SignInWithAppleTokenRotationSchedule - Lambda does not exist or could not be accessed
My serverless.yml
is as follows:
service: key-rotation
frameworkVersion: '2'
plugins:
- serverless-offline
provider:
name: aws
runtime: go1.x
lambdaHashingVersion: 20201221
stage: ${opt:stage, 'local'}
package:
exclude:
- ./**
include:
- ./bin/**
functions:
AppleSignIn:
handler: bin/apple-sign-in
resources:
Resources:
SignInWithAppleToken:
Type: AWS::SecretsManager::Secret
Properties:
Name: ${self:provider.stage}/salaovip/appleSignInToken
SignInWithAppleTokenRotationSchedule:
Type: AWS::SecretsManager::RotationSchedule
Properties:
SecretId: !Ref SignInWithAppleToken
RotationLambdaARN: !Ref AppleSignInLambdaFunction
RotationRules:
AutomaticallyAfterDays: 15