Questions tagged with Microservices

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

hi, i've already developed a flask app on my local and am studying aws services for a month and decided to use serverless(lambda) for deploying my app. but i can't decide how to deploy my app. 1- if i use aws sam to deploy my app like in this course: https://www.udemy.com/course/ultimate-guide-to-deploying-flask-to-aws/learn/lecture/27049320#overview i am not sure how will use jinja in my front end or can i use jinja? 2- on the other hand if i trace this coursera course https://www.coursera.org/learn/building-modern-python-applications-on-aws/home/week/3 can i use jinja again? which one is better(for pricing and managing) and for later development(like codepipeline, debug, team works... etc.)? thanks for answers
1
answers
0
votes
12
views
asked 11 days ago
I'm able to transfer public channel messages from Slack with appflow, but not direct messages. Is this possible?
0
answers
0
votes
14
views
asked 11 days ago
Is there an AWS service where microservices can log events(with flexible schema) like json documents but these can be queried. I want to publish events for business analysis and debugging.
1
answers
0
votes
15
views
asked 12 days ago
We are using AWS java sdk 2. When we are trying to delete an elastic IP address that is mapped with a nat gateway, we are getting an authFailure error code instead of an inUse error code. For other resources, if we try delete a resource that is already in use, we are getting the inUse error code but releaseAddress is **not** returning the inUse error code. Am I missing something or it is an issue on AWS API side?
1
answers
0
votes
11
views
asked 12 days ago
I want to create an API Gateway, that uses HTTP protocol, in my private VPC so that only the services inside this VPC can hit this API Gateway. There is an [article](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html) on creating private API for API Gateway but it is only for REST APIs. Also, while creating the API Gateway for HTTP, I could not find the VPC configuration option. Is it possible to create a private API Gateway for HTTP?
1
answers
0
votes
35
views
asked 12 days ago
I have successfully deployed my Sagemaker inference endpoint (using the bring your own container method). The invocations endpoint is as follows: ``` @app.route("/invocations", methods=["POST"]) def transformation(): """Do an inference on a single batch of data. In this sample server, we take data as CSV, convert it to a pandas data frame for internal use and then convert the predictions back to CSV (which really just means one prediction per line, since there's a single column). """ # Get the file from the request file_list = list(flask.request.files.values()) if not file_list: return flask.Response(response=json.dumps({'error': 'no file found'}), status=400, mimetype='application/json') # Get the first file in the list (assuming there is only one) img = file_list[0].read() # Process the image as needed... im2 = cv2.imdecode(np.frombuffer(img, np.uint8), cv2.IMREAD_UNCHANGED) results = ScoringService.predict(im2) xyxy = results.pandas().xyxy[0].values preds = xyxy.tolist() response_body = json.dumps({'predictions': preds}) return flask.Response(response=response_body, status=200, mimetype='application/json') ``` I am having issues with calling the endpoint, is multipart/form-data accepted? Or do I need to pass my image as base64 and decode it in my Sagemaker endpoint?
1
answers
0
votes
31
views
asked 12 days ago
Hello, I am aware of AWS Systems Manager templates ServiceNow has. But our team has a review and application process(terraform), hence we do not want to use this. The usecase I have here: Automate ServiceNow requests (Push from ServiceNow?) to insert request details into an AWS Datastore(Dynamo). We have a post process from here that takes care of rest. The request , could be for resources such as Accounts, config, VPC. I believe AWS Lambda makes sense for this effort, but I am also looking for a trigger from Service Now. Please also let me know if there are better alternatives Thank You.
0
answers
0
votes
20
views
Swee
asked 12 days ago
Hello AWS team, I have an application that's sending data to the SQS that triggers a lambda function. I noticed alarms indicating I have messages going to my sqs deadletter que. I am trying to determine what's causing the application to fail based on the deadletter que. I'm wodnering if there's a location I can look where I can see the detailed messages and the body to determine why the messages are going to the deadleatter que. I'm not sure if it's client error or server error. I also have alarm for Lambda alert, so I believe it has something to do with server side but I am not show how to troubleshoot or the steps to determine the cause in AWS>
1
answers
0
votes
32
views
Mjr
asked 12 days ago
Hi We would like to protect our APIs developed on AWS API Gateway with OAuth2.0. I am not able to find enough documentation on this. Does anybody guide me on how to implement OAuth2.0 on AWS API Gateway for authentication and authorization?
1
answers
0
votes
19
views
Kareem
asked 13 days ago
Our team has created a Lambda Function URL to manage background tasks in a queuing fashion. The Lambda essentially schedules the kick off of these tasks by simply calling a RESTful API request to and external endpoint still hosted on AWS. However, we are getting outbound connection timeout to the external endpoint (and basically anywhere) time to time and then unable to send outbound requests for a few hours, eg: after sending 35 requests in 2 hours we are unable to connect for about 3hours. I suspect this being caused by some sort of limit or quota being reached within VPC configuration but I cannot make any sense of this as we don't get any meaningful warning or error. Removing the VPC does solve the timeout problem. A bit more details about the setup: Lambda has got an RDS attached where it stores the state and updates of last runs and the Lambda is configured with VPC to get access to the RDS instance with the outbound rules such that allows all protocol on all ports. The frequency of the outbound API calls is 5mins with a very light payload, which normally gets a response within 50ms before timeout happens. What are we doing wrong with the VPC config and shouldn't we get some warning/emails when quotas/limit are reached? Thanks
1
answers
0
votes
39
views
asked 16 days ago
Hi, I am in the mid stages of developing an Alexa Skill and the Lambda function must make an API request to a public server that only allows whitelisted IP addresses. So here are my requirements: 1. My Alexa Skill uses a Lambda function, and so it must be able to receive trigger requests from the `alexa-appkit.amazon.com` service pricincipal (which uses the ARN of my Lambda function to send triggers). 2. At the same time, if my lambda function makes a request to an API on the internet, it needs to come from a static public IP. I have tried setting up a VPC, but I am struggling to understand how I am to attach my Lambda function to a VPC subnet to NAT out to a static public IP while also allowing it to be reachable to be triggered by the Alexa service principal. Is this even possible?
1
answers
0
votes
31
views
justinH
asked 18 days ago
How to attach authorizer to api gateway V2 route in aws cloudformation? I am using Api Gateway v2 and cloudformation. I am using stages "prod" and "stg" I would like to work on separate lambda stg and prod. In AWS console it is just one click of one button "Attach Authorization" in "Routes" section I am using simple authorizer: My cloudformation looks like this: ``` Authorizer: Type: 'AWS::ApiGatewayV2::Authorizer' Properties: ApiId: !Ref ApiGateway AuthorizerPayloadFormatVersion: 2.0 AuthorizerResultTtlInSeconds: 5 AuthorizerType: REQUEST AuthorizerUri: !Join - '' - - 'arn:' - !Ref 'AWS::Partition' - ':apigateway:' - !Ref 'AWS::Region' - ':lambda:path/2015-03-31/functions/' - 'arn:aws:lambda:' - !Ref 'AWS::Region' - ':' - !Ref 'AWS::AccountId' - :function:${stageVariables.AuthorizerFunctionName} - /invocations EnableSimpleResponses: true IdentitySource: - '$request.header.Authorization' Name: !Sub ${ProjectName}-gateway-authorizer MyRoute: Type: AWS::ApiGatewayV2::Route Properties: ApiId: !Ref ApiGateway AuthorizationType: CUSTOM AuthorizerId: !Ref Authorizer RouteKey: 'POST /posts/all' Target: !Join - / - - integrations - !Ref PostsLambdaIntegrationGet ``` Authorizer lambda body: ``` import json # import jwt def lambda_handler(event, context): print('*********** The event is: ***************') print(event) print('headers is:') print(event['headers']) print('headers Authorization is:') # !!!!! DONWCASE by postam or api !!!!! "A" -> "a" print(event['headers']['authorization']) if event['headers']['authorization'] == 'abc123': response = { "isAuthorized": True, "context": { "anyotherparam": "values" } } else: response = { "isAuthorized": False, "context": { "anyotherparam": "values" } } print('response is:') print(response) return response ``` BTW I do not see this option in cli [apigatewayv2 cli documentation](https://docs.aws.amazon.com/cli/latest/reference/apigatewayv2/index.html) too. BTW I asked this question on [attach authorizer to api gateway V2 route in aws cloudformation](https://stackoverflow.com/questions/75225545/attach-authorizer-to-api-gateway-v2-route-in-aws-cloudformation) too. 1) I attached authorizer. 2) I deployed api. 3) I checked authorizer with hardcoded lambda name (it works), it verifies my lambda and permissions are correct.
0
answers
0
votes
15
views
asked 23 days ago