All Questions

Filter by
Sorted by
Tagged with
85 votes
7 answers
37k views

AWS SAM YAML template - Unknown Tag !Ref

When I try to deploy my AWS SAM YAML file, it fails saying the !Ref is an unknown tag. Any ideas to get around this? AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 ...
EdsonF's user avatar
  • 2,769
35 votes
2 answers
8k views

How to describe AWS Lambda function test events in CloudFormation template?

I describe existing AWS Lambda function in CloudFormation template and I face with the next issue. In our Lambda we configured few test events which helps us to verify some usecases (I mean ...
Hleb's user avatar
  • 7,151
26 votes
3 answers
23k views

"An error occurred: LogGroup - <resource name> already exists" while trying to deploy Serverless

after running sls deploy -v && sls s3deploy as I normally do, I ran into this issue: ... CloudFormation - CREATE_FAILED - AWS::Logs::LogGroup - CallTextractLogGroup ... CloudFormation - ...
ChumiestBucket's user avatar
26 votes
5 answers
23k views

Serverless Error, CloudFormation cannot update a stack when a custom-named resource requires replacing

I have the following error. Serverless: Operation failed! Serverless Error --------------------------------------- An error occurred: phoneNumberTable - CloudFormation cannot update a stack when a ...
Joseph Astrahan's user avatar
23 votes
5 answers
17k views

Creating an Aurora Serverless Cluster from cloudformation?

From Aurora Serverless's document, there are 3 ways to create an Aurora serverless DB cluster: AWS management console, CLI, and RDS API. (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/aurora-...
howard.h's user avatar
  • 808
19 votes
6 answers
17k views

Serverless: Deplyment error S3 Bucket already exists in stack

I am trying to deploy a serverless project which has s3 bucket creation cloudformation in the serverless.yml file, but the problem is when I tried to deploy, it says the s3 bucket already exists and ...
gokublack's user avatar
  • 1,370
13 votes
2 answers
5k views

Serverless Framework: Output compiled CloudFormation

I am using the serverless framework for a lambda project. We need to be able to access the cloudformation directly to meet with our standards for other projects. How can I view the full CloudFormation ...
Drakken Saer's user avatar
10 votes
4 answers
5k views

AWS + Serverless - how to get at the secret key generated by cognito user pool

I've been following the serverless tutorial at https://serverless-stack.com/chapters/configure-cognito-user-pool-in-serverless.html I've got the following serverless yaml snippit Resources: ...
sevensevens's user avatar
  • 1,733
10 votes
3 answers
1k views

Serverless Framework: ways to achieve full "infrastructure as code"?

I've followed an excellent guide (Serverless Stack) that creates a typical CRUD serverless infrastructure with a react frontend. It's using the Serverless Framework for AWS. What I don't like is that ...
Tom's user avatar
  • 8,010
9 votes
1 answer
16k views

Template error: instance of Fn::GetAtt references undefined resource EventHandlerLambdaFunction

Can anyone help me find what's wrong? I'm importing this cloudformation resources in my serverless yml. This is my function config: Resources: eventHandler: Type: AWS::Serverless::Function ...
stairwaytoeve's user avatar
9 votes
1 answer
1k views

Referencing an entire property in multiple serverless files - [object Object] does not exist

One of the biggest challenges that I've faced using serverless is in deploying AWS Lambda functions in a micro-service fashion (Each lambda individually - I've already tried individual packages, ...
Jose A's user avatar
  • 10.6k
8 votes
1 answer
2k views

Circular dependency between resources: CognitoUserPool and environment

I am getting an error when i try to use Ref: to AWS::Cognito::UserPool in lambda environment when the lambda is bound to events from cognitoUserPool This is the error The CloudFormation template is ...
Kliment's user avatar
  • 2,260
7 votes
2 answers
1k views

Create CloudFront distribution that accepts only signed URL’s with serverless

I want to create a web cloudFront distribution that can be accessed only using signed URL's. On creating the distribution manually, there is an option Restrict Viewer Access under the Default Cache ...
Abhishek Pandey's user avatar
7 votes
0 answers
1k views

EMFILE too many open files in serverless deploy

I'm having issues deploying my serverless application when I upgraded to windows 11. I tried to look for solutions like installing "serverless-plugin-common-excludes" and "serverless-...
Renzo Ducusin's user avatar
6 votes
2 answers
4k views

Certificate issue when using serverless and serverless-domain-manager with custom domain

I'm trying to set up a custom domain for my API Gateway and Lambda function. I registered a domain with route53. Ex: myDomainToTestApi.net I also created the certificates for: myDomainToTestApi.net, ...
Peter's user avatar
  • 2,214
6 votes
1 answer
4k views

AWS CloudFormation stack fails create due to resource already exists in stack that has been deleted

When creating a new CloudFormation stack, CREATE fails with the following error: [RESOURCE] already exists in stack [DELETE_COMPLETE status stack ARN] I have already verified the resource is no ...
josesigna's user avatar
  • 488
5 votes
4 answers
8k views

How do you deploy cloudformation with a lambda function without inline code?

the lambda function size is over 4096 characters, so I can't deploy lambda function as inline codes in cloudformation template. (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-...
Bill's user avatar
  • 2,778
5 votes
1 answer
3k views

How to set up Custom Domain names with Route53 in AWS SAM Cloud-Formation

ORIGINAL QUESTIONS: How to get RegionalDomainName out of a AWS APIGateway DomainName in SAM Cloud-formation EDIT: I changed the question to hopefully get more traffic to this answer as it answers ...
VoltreX's user avatar
  • 321
5 votes
1 answer
1k views

How to debug CloudFormation templates generated by Serverless orchestrated by CircleCI

Context I feel like I need to provide a lot of context here for the full scope of the problem to be understood, so apologies in advance if this goes a bit long or ends up providing too much ...
Peter Bailey's user avatar
4 votes
3 answers
6k views

Cloud Formation Set RDS Endpoint to Route53 CName Record

Below is an example cloud formation file in YAML format. The idea is to make the Route53 Record depend upon creation of the RDS Database and then once its created get the value from the endpoint of ...
Joseph Astrahan's user avatar
4 votes
3 answers
4k views

Add AWS::Route53::RecordSet DnsRecord to a serverless Cloudfront Distribution

I found this on how to associate a route53 dns record with a S3 bucket in a serverless.yml file. I've tried to adapt that to the case of deploying a cloudfront distrib DnsRecord: Type: "AWS::...
bebbi's user avatar
  • 2,509
4 votes
3 answers
4k views

Giving OriginAccessIdentity reference in CloudFormation or serverless.yml

I want to have a CloudFront distribution with access to a private S3 bucket. For that, I have to create an origin access identity. Manually, I can do that using the AWS console, but I wanted to create ...
venkatraman hiregange's user avatar
4 votes
1 answer
2k views

Warned - no cfnRole set and unnecessary files was created after deploy

No cfnRole warned and unnecessary files was created after deploy Serverless: Safeguards Processing... Serverless: Safeguards Results: Summary -------------------------------------------------- ...
SoSadTT's user avatar
  • 41
4 votes
3 answers
4k views

Why is CloudFormation saying AlreadyExists when creating a AWS::ApiGateway::Authorizer

I have an existing Lambda function called My-Authorizer. I'm trying to deploy an API Gateway using Serverless, with CloudFormation (CF) resources, one of which is an authorizer that targets this ...
Ash's user avatar
  • 2,247
4 votes
1 answer
4k views

How to set Cloudformation full access from the serverless cli

I have programatic access to an aws account and when I try to deploy the a basic function, I get: User: arn:aws:iam::xxxx:user/myname is not authorized to perform: cloudformation:DescribeStacks on ...
squeekyDave's user avatar
4 votes
3 answers
2k views

AWS SAM - how to handle a large number of endpoints

We're building an API using AWS SAM. Build on the Lambda Node Template in CodeStar. Things were going well until our template.yml file became too big. Whenever the code is pushed and CloudFormation ...
Qais Abou Jaoudé's user avatar
4 votes
1 answer
1k views

Serverless Framework with localstack, where to view error output

I am using serverless framework along with localstack and getting a failed deploy with the error message View the full error output: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=...
AnonymousAlias's user avatar
4 votes
0 answers
2k views

AWS CloudFormation configuration S3 event to sqs

I'm trying to create a simple AWS based architecture that would transfer some data from a AWS S3 to SQS and then that would trigger a lambda. I'm using Serverless framework but eventually when I ...
Hr. Genchev's user avatar
3 votes
2 answers
1k views

Serverless duplicates user pools instead of reusing by name

I'm using serverless to deploy an AWS CloudFormation template and some functions, here is a part of my serverless.yml file: resources: Resources: MyUserPool: #An inline comment Type: "AWS:...
sigmaxf's user avatar
  • 8,355
3 votes
3 answers
5k views

Serverless Service update Dynamodb table created with DeletionPolicy retain

I'm encountering some problems using Serverless framework, since i accidentally used the same name of a service on another one. An error occurred: tableX - TableX already exists. Let's suppose that ...
Sergio Flores's user avatar
3 votes
1 answer
4k views

How do I ignore resource creation if already present in serverless

while configuring resource configuration , is there any way I can use so that serverless wont create throw any error if resource is already present. eg. don't throw this error if following resource is ...
Pushker Yadav's user avatar
3 votes
2 answers
20k views

Work around circular dependency in AWS CloudFormation

The following AWS CloudFormation gives a circular dependency error. My understanding is that the dependencies flow like this: rawUploads -> generatePreview -> previewPipeline -> rawUploads. ...
Ruurtjan Pul's user avatar
  • 1,287
3 votes
1 answer
5k views

Getting the error `Bucket name should not contain uppercase characters` when creating S3 buckets using serverless [closed]

I wrote a serverless.yml where I create 3 S3 bucket resources. This is some take home project I have to complete and it requires two buckets for static templates I have to process and one bucket for ...
buterfly85's user avatar
3 votes
2 answers
2k views

How to reference CloudFront domain name when creating a AWS::S3::RecordSet in CloudFormation/Serverless?

I have a project which has a cloudfront distribution to serve some data out of a bucket. I am using Serverless framework, but I think this is mainly a CloudFormation question. I would like to create ...
jr.'s user avatar
  • 4,607
3 votes
1 answer
8k views

CloudFormation: Cannot create policy for SNS topic on AWS using serveless framework

Can't figure out what I am doing wrong, if I comment out the SNSAddTopicPolicy, everything works fine, however once uncommented I get: SNSAddTopicPolicy - Invalid parameter: Policy Error: null (...
fgonzalez's user avatar
  • 3,827
3 votes
1 answer
521 views

New line stripped from first line of Codebuild build spec when deploying with Serverless Framework

I am deploying a build spec for AWS codebuild using Serverless Framework. When I deploy, the new line after the first line is absent in the build spec. This resource previously deployed without a ...
DanielRGrant's user avatar
3 votes
1 answer
2k views

create log group and log stream using serverless framework

I have the following Terraform code. How can I implement the same in Serverless framework? resource "aws_cloudwatch_log_group" "abc" { name = logGroupName tags = tags } ...
user2281858's user avatar
  • 2,007
3 votes
1 answer
2k views

Lambda fails with "Cannot find module..."

I'm packing my lambdas with Webpack. And I'm deploying them with CDK. However, when testing them through ApiGateway, I get this: Lambda execution failed with status 200 due to customer function ...
Daniel Birowsky Popeski's user avatar
3 votes
0 answers
732 views

How to solve Serverless split stack plugin failure around resourceConcurrency

So I have a stack exceeding 500 resources and found out this serverless plugin which splits stack according to the several configurations. Below is my configuration for splitting the stack. Upon using ...
Auto geek's user avatar
  • 494
2 votes
2 answers
21k views

Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state

I am following a CloudFormation tutorial and this is my AWS CloudFormation template: AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31' Description: A starter AWS Lambda ...
Santosh Kumar's user avatar
2 votes
3 answers
377 views

Which is the best path to take for aws CI/CD workflow? Cloudformation, SAM or Serverless framework?

Need an expert's input who has used cloudformation, sam and serverless framework to deploy nodejs app. Please advise which is the best path to take I have used serverless framework but not sam or ...
Khuram Niaz's user avatar
2 votes
1 answer
4k views

AWS Serverless Error - For expression "Stacks[].StackStatus" we matched expected path: "ROLLBACK_COMPLETE" at least once

During deploying serverless api to AWS lambda, I got an error message like this: Error: Failed to create managed resources: Waiter StackCreateComplete failed: Waiter encountered a terminal failure ...
Talent Dev's user avatar
2 votes
2 answers
2k views

Serverless framework Lambda AppSync error

I'm using the serverless framework to upload an AWS Lambda function to be used as a data source in AppSync. The serverless.yml that I have is very basic: service: mongoose-lambda-srvrls provider: ...
honkskillet's user avatar
  • 3,087
2 votes
2 answers
184 views

aws cli command output as value in cloudformation template

I have an independent lambda layer, the arn is retrieved using the below CLI command. aws lambda list-layer-versions --layer-name my-custom-lambda-layer --region us-east-1 --query 'LayerVersions[0]....
SUBHASHC37's user avatar
2 votes
2 answers
2k views

how to replace character in a string variable using CloudFormation

In my serverless.yml script which uses CloudFormation syntax I have defined a name for my app using the appName variable: custom: appName: my-app-name Somewhere down the script I use this appName ...
alphanumeric's user avatar
  • 18.7k
2 votes
1 answer
1k views

serverless framework: trying to define a role for a lambda gives an undefined resource error

I'm writing a lambda to update an RDS instance. Apparently the RDS instance must be in a VPC, and the lambda must be in the VPC so it can access the RDS. Alright then. So I configure the lambda to be ...
John Farrell's user avatar
2 votes
1 answer
5k views

Serverless Framework error Policy statement must contain actions

I have a IAM policy which fails to deploy using the Serverless Framework. The error message is (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument;). The policy ...
kilomo500's user avatar
2 votes
2 answers
1k views

Mappings sections of the aws Cloudformation template and Serverless.yml

I have a little doubt about "Mappings section" of the aws cloudformation syntax: Example: ... Mappings: accounts: 56565d644801:true 986958470041:true 090960219037:true 05166767667:...
José Enrique Hernández's user avatar
2 votes
1 answer
506 views

Locating cloudwatch error log based on serverless error information

I've got a serverless error and I think I should be able to find the cloudwatch log mentioned solely based on the information in the error but I'm finding it difficult to locate. ServerlessError: An ...
7MIMIRA's user avatar
  • 21
2 votes
1 answer
547 views

Reuse the same s3 bucket between stages serverless

Our clients are already registered on our development environment and the management is asking for us to create the production environment without loosing any of the already registered user data. We ...
Argjent's user avatar
  • 123