amazon-web-services

Executing Step Function “Tasks” using ECS Fargate

有些话、适合烂在心里 提交于 2021-02-08 15:13:48
问题 In Re:Invent 2018, AWS seems to have launched new integrations with Step Functions, which includes ECS Fargate support. https://docs.aws.amazon.com/step-functions/latest/dg/connectors-ecs.html I have been digging up on this, and I am able to get the ECS task to startup, and do its thing, but I am not able to send desired output back to the step function. The response syntax too does not seem to have anything that corresponds to the output of a particular state. https://docs.aws.amazon.com

Is there a way for a Lambda function to be triggered by multiple S3 buckets?

我是研究僧i 提交于 2021-02-08 15:13:26
问题 I'm trying to create a Lambda function that will be triggered by any change made to any bucket in the S3 console. Is there a way to tie all create events from every bucket in S3 to my Lambda function? It appears that in the creation of a Lambda function, you can only select one S3 bucket. Is there a way to do this programmatically, if not in the Lambda console? 回答1: There is at least one way: you can setup an s3 event notifications, for each bucket you want to monitor, all pointing to a

How do I use DynamoDBAutoGeneratedKey to give me an auto generated key?

拜拜、爱过 提交于 2021-02-08 15:12:37
问题 I need to use DynamoDBAutoGeneratedKey from the AWS SDK to give me a random key(of type String) that I can then use to do something. I can't find any examples online of doing this, and while it seems like it should be relatively straightforward I am really struggling to get this working. Can anyone link me to an example of this being used? 回答1: Found easy answer. String uniqueID = UUID.randomUUID().toString(); Screw using DynamoDBAutoGeneratedKey, sounds like a headache. 回答2: @DynamoDBTable(

How do I use DynamoDBAutoGeneratedKey to give me an auto generated key?

老子叫甜甜 提交于 2021-02-08 15:11:16
问题 I need to use DynamoDBAutoGeneratedKey from the AWS SDK to give me a random key(of type String) that I can then use to do something. I can't find any examples online of doing this, and while it seems like it should be relatively straightforward I am really struggling to get this working. Can anyone link me to an example of this being used? 回答1: Found easy answer. String uniqueID = UUID.randomUUID().toString(); Screw using DynamoDBAutoGeneratedKey, sounds like a headache. 回答2: @DynamoDBTable(

python (boto3) program to delete old snapshots in aws

谁说我不能喝 提交于 2021-02-08 15:00:28
问题 I have already written a program to delete old snapshots.But the problem for me now is if the snapshot is attached with an ami then it doesn't get deleted and the program also stops.It displays the following message : botocore.exceptions.ClientError: An error occurred (InvalidSnapshot.InUse) when calling the DeleteSnapshot operation: The snapshot snap-12345678 is currently in use by ami-12345 I want the program to skip those snapshots alone and continue to delete other snapshots. here is my

AWS Lambda, Python, Numpy and others as Layers

依然范特西╮ 提交于 2021-02-08 14:57:18
问题 I have been going at this for a while trying to get python, numpy and pytz added to AWS Lambda as Layers rather than having to zip and throw it at AWS with my .py file. I was able to follow multiple tutorials and all of them failed. I have resorted to following this guide if I am to go with pandas, numpy or pytz for any functionality (AWS Lambda with Pandas and NumPy - Ruslan Korniichuk - Medium). So this is good but I do not want to have to recreate a zip each time if things change with my

List all parameters in AWS SSM Parameter Store

大憨熊 提交于 2021-02-08 14:16:33
问题 How do I list all parameters in the AWS Systems Manager (SSM) Parameter Store? I am using the AWS CLI. I can store them with aws ssm put-parameter . I can fetch them with aws ssm get-parameter . I can list all documents with aws ssm list-documents , but I do not see a corresponding list-parameters function. 回答1: I think what you want is aws ssm describe-parameters docs 回答2: You are looking for describe-parameters. 来源: https://stackoverflow.com/questions/55011890/list-all-parameters-in-aws-ssm

AWS Fargate Task Debugging, what does “CannotPullContainerError … invalid reference format” mean?

和自甴很熟 提交于 2021-02-08 14:04:23
问题 I have docker container stored on AWS ECR, using this container I have created Task . When I run Task over Fargate , the service moves from PROVISIONING > PENDING (red color) > STOPPED states . There is no log either in Service Event , or CloudWatch . Absolutely no way to know what is the real problem . Any idea which way to move, AWS document did not helped. 回答1: I saw this error also. In my case the problem was that I had an invalid image value in my container definition. The image is

AWS Application Load Balancer : Request Header Or Cookie Too Large

感情迁移 提交于 2021-02-08 12:49:08
问题 AWS's new Application Load Balancer is throwing an error : 400 Bad Request, Request Header Or Cookie Too Large, awselb/2.0 How do i increase the size in aws-elb. It was working fine with the classic load balancer. 回答1: we spoken to aws about the same issue, we were sending a header request of a total of 33k, but one of our header ( authorization) size was 30 , but the limit ALB accepts for is as follows : - 16K per request line - 16K per single header - 64K for the entire header 回答2: This 400

AWS CLI using Instance Profile Credentials

馋奶兔 提交于 2021-02-08 12:17:12
问题 How do I specify that I want to use Instance profile credentials when using the AWS CLI from within my EC2 instance? the docs say: Instance profile credentials – these credentials can be used on EC2 instances with an assigned instance role, and are delivered through the Amazon EC2 metadata service. Is this automatic or do I need to call the metadata service and save the returned credentials to the ~/.aws/credentials file...then make the call? 回答1: You are talking about IAM Roles. These are