amazon-web-services

Does AWS Lambda Store Last Run Time?

Deadly 提交于 2021-02-17 03:25:13
问题 I am trying to pass a unix timestamp into API get request as a parameter to another system to grab data. The parameter needs to be the last time the AWS Lambda ran. I need to somehow store the last time the AWS lambda function has ran into maybe an s3 bucket and also recover that timestamp. So I can pass that value along into the next run. Anyone have any ideas on how to do something like this? 回答1: Lambda does not store any last run time between invocations (especially as its possible there

What's the best way to store a config file for a Docker container on AWS?

寵の児 提交于 2021-02-16 20:35:54
问题 I have a node.js app which has a config file with sensitive data. I want to launch it through AWS ECS (cluster) as a docker container. What would be the best way to store the sensitive config data? I am currently sending them through the environmental variables in the Task Definition of the Docker container, but there has to be a better way to do that. What is the best practice for something like this? Shall I use Docker secrets or Amazon secrets manager? I know it's a pretty general question

What's the best way to store a config file for a Docker container on AWS?

馋奶兔 提交于 2021-02-16 20:35:09
问题 I have a node.js app which has a config file with sensitive data. I want to launch it through AWS ECS (cluster) as a docker container. What would be the best way to store the sensitive config data? I am currently sending them through the environmental variables in the Task Definition of the Docker container, but there has to be a better way to do that. What is the best practice for something like this? Shall I use Docker secrets or Amazon secrets manager? I know it's a pretty general question

How to create a java OutputStream for an S3 object and write value to it?

做~自己de王妃 提交于 2021-02-16 19:57:07
问题 Existing ways of adding content to an S3 file using methods in AmazonS3 class are by putObject with an InputStream Creating a local file with content and uploading it to S3. Is there a way an OutputStream can be created for an existing S3 object to which values from a list can be written into? I see there are no APIs for doing so. 回答1: It's possible to create an S3OutputStream which wraps the AmazonS3 client. See this gist for the implementation: https://gist.github.com/blagerweij

AWS Elastic Beanstalk gives “could not translate host name ”db“ to address” error

一世执手 提交于 2021-02-16 18:59:07
问题 I've been trying to deploy my docker consisted of Django, Postgresql and Nginx. It works fine when I do sudo docker-compose up However when deploy it on AWS EB, it gives me could not translate host name "db" to address: Name or service not known What I've done is I pushed my docker to docker hub using sudo docker build -t myname/dockername -f Dockerfile . and I simply do eb deploy File Structure myproject myproject settings.py urls.py ... Dockerfile Dockerrun.aws.json manage.py requirements

AWS Elastic Beanstalk gives “could not translate host name ”db“ to address” error

☆樱花仙子☆ 提交于 2021-02-16 18:57:12
问题 I've been trying to deploy my docker consisted of Django, Postgresql and Nginx. It works fine when I do sudo docker-compose up However when deploy it on AWS EB, it gives me could not translate host name "db" to address: Name or service not known What I've done is I pushed my docker to docker hub using sudo docker build -t myname/dockername -f Dockerfile . and I simply do eb deploy File Structure myproject myproject settings.py urls.py ... Dockerfile Dockerrun.aws.json manage.py requirements

AWS Cognito with Serverless Local Environment

丶灬走出姿态 提交于 2021-02-16 18:06:46
问题 This is an issue we found on Github and are having the same issue: We're using serverless and serverless-offline to run lambda locally. We have a local DynamoDB implementation. For Cognito however, serverless-offline mocks the authenticated user and cognitoIdentityId. The mocked user has permission to invoke the lambda but not to pass in the cognitoIdentityId to match what we save in DynamoDB for a user. This may be a serverless-offline problem, and there may be other, better solutions. Or

AWS Cognito with Serverless Local Environment

让人想犯罪 __ 提交于 2021-02-16 18:06:38
问题 This is an issue we found on Github and are having the same issue: We're using serverless and serverless-offline to run lambda locally. We have a local DynamoDB implementation. For Cognito however, serverless-offline mocks the authenticated user and cognitoIdentityId. The mocked user has permission to invoke the lambda but not to pass in the cognitoIdentityId to match what we save in DynamoDB for a user. This may be a serverless-offline problem, and there may be other, better solutions. Or

AWS Cognito with Serverless Local Environment

人盡茶涼 提交于 2021-02-16 18:05:11
问题 This is an issue we found on Github and are having the same issue: We're using serverless and serverless-offline to run lambda locally. We have a local DynamoDB implementation. For Cognito however, serverless-offline mocks the authenticated user and cognitoIdentityId. The mocked user has permission to invoke the lambda but not to pass in the cognitoIdentityId to match what we save in DynamoDB for a user. This may be a serverless-offline problem, and there may be other, better solutions. Or

How to identify the storage class in Amazon S3?

和自甴很熟 提交于 2021-02-16 16:27:49
问题 Suppose I have media assets stored in S3 Standard Storage . After 30 days it moved to S3 Standard-Infrequent Access Storage and after 90 days it is moved to Glacier by lifecycle policies that I configured. So at any point of time how can I identify where the object is stored? 回答1: The Storage Class of an object indicates where the data is "stored". For Standard and Standard-Infrequent Access (Standard-IA) , the object is kept as normal in Amazon S3. For Glacier , the object is still listed