Questions tagged [aws-serverless]

0

votes
0

answer
2

Views

How to pass a role to cli command “aws cloudformation deploy” or “sam deploy”?

I am creating a cloudformation stack using a SAM template and the CLI. I have successfully done this using an account that gets all the required permissions from policies directly attached to it. It's poor security practice to give this account all these permissions so I've created a role with the s...
Harfel Jaquez
1

votes
3

answer
233

Views

How can I automate the end-to-end testing of my serverless web app?

So my app stack looks like this in prod: Backend: AWS API Gateway + Lambda + DynamoDB + ElastiCache(redis) Backend - algo: Long running process - dockerized Java app running on ECS (Fargate) Frontend: Angular app, served from S3 I'd like to use https://www.cypress.io/ for end-to-end tes...
Force Hero
1

votes
2

answer
202

Views

In nodejs, can I have sub-folders that each sub-folder host a AWS lambda function?

I am trying to implement a serverless application on AWS. I wish to know a good way to organize my codes. Let's say, I want to have multiple lambda functions to be organized under a git repo, each lambda function and it's associated codes are in its own sub-folder. This is what I have tried, separa...
GreenLake4964
1

votes
0

answer
55

Views

Generify codeurl in template.yml for aws lambda function local testing

I have a lambda function and its template.yml looks like this AWSTemplateFormatVersion: 2010-09-09 Transform: AWS::Serverless-2016-10-31 Resources: ExampleJavaFunction: Type: AWS::Serverless::Function Properties: Handler: com.someCompany.SNSListener::handleRequest CodeUri: ./target/aws-lambda-sqs-0....
best wishes
1

votes
0

answer
270

Views

Running Spring Boot App in AWS does not start

I have a Spring Boot application that starts without problem when executed locally. I want to run the app via AWS Lambda. I used the https://github.com/awslabs/aws-serverless-java-container and added the corresponding code as described in this sample: https://keyholesoftware.com/2018/04/26/aws-lamb...
Stefan Fuchs
1

votes
1

answer
56

Views

API Backend on AWS Lambda

Context: I have a usecase where my backend service should compute 1 or more features, where each feature is a simple peace of computation (can be as simple as adding two numbers) and each feature takes input and return an output value, which can be boolean or a number. Client can actually request fe...
obaid
1

votes
0

answer
148

Views

AWS Serverless Express in local environment

I would like to use the AWS Serverless Express in my local environment in order to use a Lambda function easily. The npm run local doesn't start a web server but rather executes the Lambda function once with the api-gateway-event.json file. Does anyone know some tools that allows local development...
user3933324
1

votes
1

answer
50

Views

AWS Serverless Endpoint Issue

Hi i'm an AWS newbie over here. So far I've been through many sites and forums to search for the errors that i have been getting but am unable to do so. I'm doing this on AWS Cli. After running sls deploy, i keep getting this on AWS endpoint {'message': 'Internal server error'} After checking cloudw...
Newbie
1

votes
0

answer
164

Views

Serverless variable from external file nested property

I have serverless yml and a config file config file app: { port: 3000, db: { connectionString: 'xxxxx' }, lambdaDeploy:{ stage : 'DEV', region : 'es-west-1' } Trying to use these variables in yml like below yml provider: name: aws runtime: nodejs6.10 stage: ${file(./appconfiguration.json).app.stage}...
Md. Parvez Alam
0

votes
0

answer
2

Views

Serverless domain manager: Could not set up basepath mapping

We have a serverless.yml like this: service: plugins: - serverless-webpack - serverless-dotenv-plugin - serverless-domain-manager - serverless-sentry - serverless-offline custom: defaultStage: staging defaultRegion: eu-central-1 profiles: staging: staging production: production customDomain: enable...
Abaddon666
1

votes
1

answer
314

Views

How to resolve a circular dependency in AWS SAM template

I have a SAM template AWSTemplateFormatVersion : '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: | Some infrastructure Resources: S3HomeBucket: Type: 'AWS::S3::Bucket' Properties: AccessControl: PublicRead BucketName: the-site-home DeletionPolicy: Retain BucketPolicy: Type: 'AWS::S3:...
Paul D'Ambra
1

votes
0

answer
438

Views

AWS API Gateway with custom authorizer returns AuthorizerConfigurationException

I have an AWS API Gateway that uses a custom authorizer, and if the request is authorized, it triggers another lambda function. Since yesterday, whenever I call the API, I get an error saying { 'message': null } and a 500 Internal Server Error. In the response headers it says x-amzn-ErrorType →Aut...
Gasp0de
1

votes
1

answer
50

Views

AWS Server-less Architecture using Lambda and SQS

I've been learning more and more about AWS lately. I've been reading through the white papers and working my way through the various services. I've been working on PHP applications and front-end dev for a while now. Two things really stuck out to me. Those two things are server-less architecture usi...
oddz
1

votes
0

answer
182

Views

cannot update an existing lambda with serverless 1.x

We have several aws stacks that were deployed using Node 4 and serverless 0.5 and now we are trying to move to Node 6 and serverless 1.x. We have migrated the configuration (serverless.yml) and all, but our problem comes when we try to update the actual stack. Serverless fails at the actual lambda u...
1

votes
0

answer
43

Views

How to get the auto generated RestApi from my AWS SAM template? To use in another SAM template

I used AWS SAM to generate my Lambda/APIs. But I want to be able to get this RestApi so I can use it in another SAM template. The idea is to have 1 base infra CloudFormation/SAM template that creates the network, ALB, API Gateway things Then each 'micro-service' will have its own SAM template and...
Jiew Meng
1

votes
0

answer
47

Views

Unable to register multiple options and post api on lambda api gateway from template.yml file

Hi i created post api using nodejs express js for my web application and using aws serverless development process but i am getting issue that when i adding more then one post, Options and Get api than last registered api removed from lambda api gateway and therefore i unable to access that previous...
Rahul Ranjan
1

votes
0

answer
200

Views

Rows are not getting added on AWS Kinesis analytics In-application SQL stream from Kinesis data stream

I am writing data to a kinesis stream on the invocation of a dynamoDBTrigger. This stream is configured as the input stream to a kinesis analytics application. I have a lambda preprocessor configured on the kinesis stream that logs the data that is written in the stream. However, on the analytics ap...
Abhishek Pandey
1

votes
0

answer
299

Views

AWS Lambda Function throws Read timed out. (read timeout=60) when invoking

I created a Lambda function on AWS Lambda from an AWS C9 environment. The function runs well from local, but after deploying it, it times out on remote. This is the error: Error: HTTPSConnectionPool(host='lambda.us-east-2.amazonaws.com', port=443): Read timed out. (read timeout=60) at convertStderr...
Danf
1

votes
0

answer
368

Views

Cannot upgrade AWS SAM CLI from 0.2.8 to 0.6.1

I cannot upgrade AWS SAM CLI from 0.2.8 to 0.6.1. I followed the intructions mentionned here: https://github.com/awslabs/aws-sam-cli/blob/develop/docs/installation.rst $ sam -version A newer version of the AWS SAM CLI is available! Your version: 0.2.8 Latest version: 0.6.1 See https://github.com/a...
Nicosoft
1

votes
1

answer
50

Views

Serverless get list of all existing endpoints from Api handler

I am trying to create a service root endpoint which will respond with a list of all existing path templates. I can create the response manually. Is there any way to get the list other than this manual approach?
halfo
1

votes
0

answer
121

Views

serverless framework deploy fails on AWS

sls deploy --verbose I encounter the problem like Serverless: Split stack started… Serverless: Uploading CloudFormation file to S3…logStack.json Serverless: Uploading CloudFormation file to S3…apiStack.json Serverless: Uploading CloudFormation file to S3…permissionStack.json Serverless: Uplo...
pyy
1

votes
0

answer
91

Views

Serverless framework output UserPoolId

I just want to be able to print out information I need for my app configuration. Starting with the basics: UserPoolId. Output is not working. Anyone know why? service: test-ota-fmw provider: name: aws runtime: nodejs8.10 stage: dev custom: stage: ${opt:stage, self:provider.stage} variables: facebook...
Nelson.b.austin
1

votes
1

answer
148

Views

Serverless Framework - Get API Gateway URL for use in tests

I'm using the Serverless framework, and I want to be able to reference my API Gateway URL in my acceptance tests. My test environment is regularly destroyed and then recreated, so hardcoding a URL into the tests is not possible. I can see there are ways to reference API Gateway as an AWS environmen...
Gaz_Edge
1

votes
0

answer
250

Views

Invalid HTTP endpoint specified for URI in Amazon ApiGateway

I am trying to create a resource /user/devices with GET method for API Gateway using cloudformation template but it is giving me a below error An error occurred: ApiGatewayRootMethod - Invalid HTTP endpoint specified for URI (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestExcepti...
JN_newbie
1

votes
1

answer
172

Views

CloudWatch metric for concurrent executions not working

My AWS lambda function has CloudWatch dashboards for errors, invocations ,duration, throttles & concurrentexecutions. It is showing data for all metrics except concurrentexecutions for the same timeline. A 'No data available' is always displayed on its dashboard. I have not set a 'Reserve Concurren...
wildthing81
1

votes
0

answer
85

Views

How to run a docker with aws serverless

I am trying to deploy a serverless function but I am running into some problems with docker. I am working on Windows 10 and have installed docker. I have created a vm using the command: docker-machine env virtualbox When I run serverless deploy, it gives me the error: error during connect: Get htt...
torylor
1

votes
1

answer
183

Views

aws sam publish/deploy flow

I'm not fully grasping the flow with publishing/deploying with sam. My biggest hiccup is that my sam template declares a AWS::Serverless::Function and the CodeUri parameter forces me to put in a s3 bucket url. I've seen examples where the CodeUri is just the path to the code resources on your comput...
Programmatic
1

votes
0

answer
108

Views

“serverless deploy” doesn’t work with –aws-profile option and no error to debug

I'm trying to deploy serverless with narrow IAM permission specified below. { 'Version': '2012-10-17', 'Statement': [ { 'Effect': 'Allow', 'Action': [ 'cloudformation:Describe*', 'cloudformation:List*', 'cloudformation:Get*', 'cloudformation:CreateStack', 'cloudformation:UpdateStack' ], 'Resource':...
Somasundaram Sekar
1

votes
0

answer
101

Views

Self signed certificate error in serverless deply

I am trying to deploy serverless application on AWS from my local machine.The machine is behind company firewall. Initially I was getting connection error so I added http_proxy and https_proxy settings on terminal. Now when I try to deploy I am constantly getting the error self signed certificate in...
Tanisha
1

votes
0

answer
36

Views

Difference in serverless.zip file sizes - what could be causing it

A colleague and I are both working with serverless, both on windows 10, with the latest serverless version of 1.37.0 with the same npm version of 6.70. Yet running the serverless command, his computer bundles up the node modules folder to upload a package of on average 8-9 MB.. yet mine bundles to...
Shpadoinkle
1

votes
0

answer
23

Views

Using serverless-mocha-plugin to test dynamic endpoint

I am creating an API application in NodeJS using the Serverless framework. I have installed the serverless-mocha-plugin and am trying to create some unit tests for my functions. In my serverless.yml file, I have the following endpoints: ... equipmentGetAll: handler: ./api/equipment/equipment.getAll...
Maxwell Smith
1

votes
1

answer
71

Views

CloudFormation change set User not authorized

I am trying to publish aws lambda to my client aws account however I keep getting this error message. Error creating CloudFormation change set: User: arn:aws:iam::xxxxxx:user/testuser is not authorized to perform: cloudformation:CreateChangeSet on resource: arn:aws:cloudformation:eu-west-1:xxxx:sta...
Desmond
1

votes
0

answer
17

Views

Decompress-zip emit anything in this Express route, why?

Maybe I'm just tired but I can't figure out why this won't work! This is an express route running on AWS Lambda using the serverless framework (serverless-http). I'm using Multer to handle the file upload and that seems to be working fine, I can see the file is uploaded and available. I'm deriving m...
McB
1

votes
0

answer
19

Views

AWS lambda Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test

I'm deploying a AWS lambda function using java as primary language , here below I share my java class code and my maven pom.xml file: package com.amazonaws.lambda.demo; import com.amazonaws.services.lambda.runtime.Context; import com.amazonaws.services.lambda.runtime.RequestHandler; import com.amazo...
1

votes
1

answer
12

Views

serverless dynamodb enable continuous backups

How do I enable continuous backups for my DynamoDB table when using the Serverless Framework? Ideally, I would define something in serverless.yml that would enable automatic DynamoDB backups
redgeoff
1

votes
0

answer
32

Views

Can someone guide me to run my API tests locally using AWS-SAM?

I have a postman collection for my API tests. I want to know if I can use the same when my dev team revamps the project stack to AWS. If so, is there any quick guide for API testing using AWS-SAM? If not, then how should I go about testing my API's?
Siva
1

votes
1

answer
551

Views

Finding logs for lambda function errors in AWS Cloudwatch?

I'm going to profess that I have not actually started deploying AWS Lambda functions yet, but this article says this: The logs on AWS CloudWatch are horrible. It took me an eternity to find failing functions for simple applications, imagine the horror with large scale applications. Is there somethin...
Ole
1

votes
1

answer
420

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 resource: arn:aws:cloudformation:eu-west-1:xxxxxx:stack/hello-world-dev/* I checked my keys and they ar...
squeekyDave
1

votes
1

answer
251

Views

Does SAM Lambda auto-versioning using AutoPublishAlias work when code URL changes but the code that it points to doesn't?

Simple question: Does SAM Lambda auto-versioning using AutoPublishAlias work for AWS::Serverless::Function when code CodeUri changes but the actual code that it points to doesn't? Background We are deploying several [email protected] functions using the SAM AWS::Serverless::Function resource type. Our dep...
Reed Hermes
1

votes
1

answer
0

Views

Issues deploying Apollo with GRAND stack using Serverless

I've been developing an app in the GRAND stack starter and after overcoming many hurdles, I finally wanted to deploy it and see it run. My goal is to do it all on Amazon. I have the front-end serving correctly, and a Neo4j instance running on an EC2 instance. Since the GRAND stack starter was using...
BehemothDan

View additional questions