amazon-web-services

AWS Aurora Serverless Spring Boot Communication Link Error

﹥>﹥吖頭↗ 提交于 2021-02-11 17:01:51
问题 I am doing a prototype for moving our Spring Boot based application to AWS Aurora DB including Serverless mode. With Provisioned mode things work as expected. However with serverless mode the application is not able to connect to the DB from EC2 instance with exception as: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:

host public node js website on amazon AWS LightSail without Bitnami

非 Y 不嫁゛ 提交于 2021-02-11 17:00:28
问题 I have an amazon AWS LightSail instance and have installed Node js downloaded from nodejs.org. Now the setup is complete and I am able to launch my nodejs webpage inside LightSail instance using "http://localhost but when I try to do it using the lightsail public IP from any other laptop, it not getting accessible (getting web error as "This site can’t be reached"). I have set the node js to listen to port 80 which is open by default. A lot of materials shows that bitnami as a way to do it

Not able to solve throttlingException in DynamoDB

喜夏-厌秋 提交于 2021-02-11 16:48:34
问题 I have a lambda function which does a transaction in DynamoDB similar to this. try { const reservationId = genId(); await transactionFn(); return { statusCode: 200, body: JSON.stringify({id: reservationId}) }; async function transactionFn() { try { await docClient.transactWrite({ TransactItems: [ { Put: { TableName: ReservationTable, Item: { reservationId, userId, retryCount: Number(retryCount), } } }, { Update: { TableName: EventDetailsTable, Key: {eventId}, ConditionExpression: 'available >

How to prevent devs to download lambda function?

梦想的初衷 提交于 2021-02-11 15:53:32
问题 I have some lambda functions and I usually grant access to thirds devs to my AWS account. They eventually can request my lambda functions for working or testing purposes but I want to prevent them to download the source code. Is there a way to manage who can download (or not) my lambda files ? 回答1: This will come down to the specifics of how they test the lambda; specially, how your lambda is configured and the users access permissions. Typically there is 3 scenarios that could play out here:

How to implement argparse in Python

南楼画角 提交于 2021-02-11 15:41:28
问题 I'm new to Python, I got a small script to upload files to S3, at the moment I only hard-code one single file in the script, the bucket name is also hard-coded. I wanted to merge argparse in this script so that I can add some arguements by myself and upload different files. For example, in the command line I can specify arguments to decide file_name x upload to bucket_name xxx . I've been reading documents about how to set argparse but I can only make small changes and don't know how to

How to Process file on S3 event through AWS lambda using C#

扶醉桌前 提交于 2021-02-11 15:29:49
问题 I am looking for C# code blocks to read file from S3 on PUT event and upload the file to another bucket. I am fairly new to C# and see most of the blogs are either written for python and java. Any help will be highly appreciated. Thanks, 回答1: The flow would be: Configure an Amazon S3 Event to trigger the AWS Lambda function when a new object is created Details of the object created will be passed to the Lambda function via the event Your Lambda function should then call CopyObject() to

Referencing AWS S3 bucket name programmatically instead of hardcoded

六眼飞鱼酱① 提交于 2021-02-11 15:23:35
问题 I'm working with AWS Amplify to develop an iOS application. I've added storage through S3 to host some assets and am trying to configure the application to download them. The only issue is that every example I see has the bucket name and path hardcoded, but because I have multiple environments and make new environments sometimes and each bucket has the environment name appended to it, I don't want to have to rewrite the bucket name each time. For example if I'm in my test environment the

How to install Laravel on AWS free tier? [duplicate]

假装没事ソ 提交于 2021-02-11 15:18:10
问题 This question already has an answer here : Server composer install --no-dev killed (1 answer) Closed 9 months ago . I am struggling to install Laravel on the AWS free tier Ubuntu instance. It gets stucks on the Composer installation due to a memory limit. I initially ran the following commands: sudo apt update && sudo apt upgrade sudo apt install php7.2-common php7.2-cli php7.2-gd php7.2-mysql php7.2-curl php7.2-intl php7.2-mbstring php7.2-bcmath php7.2-imap php7.2-xml php7.2-zip curl -sS

Possible to enable X-Ray tracing with RestSharp

允我心安 提交于 2021-02-11 15:14:43
问题 We currently have an internal library that we're using to make a lot of our HTTP calls that uses RestSharp rather that the HttpClient to make all of our requests to downstream services. Is it possible to enable x-ray tracing in AWS without re-writing that library to instead use HttpClient? The goal is to get the same functionality that would be outlined here (when using HttpClient): https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-httpclients.html 回答1: The RestSharp library is