Question: How to feed Textract output into Comprehend Medical

"HiI'm trying to modify this code at https://github.com/aws-samples/amazon-textract-enhancer/blob/master/functions/detect-text-postprocess-page.pyI want to be able to pipe the results of textract analysis into comprehend medical apiI've tried to hacking the code, unfortunately I'm not a python expertAny ideas how best to approach this?cheersJonfrom textract_util import *import ioimport osimport jsonimport timeimport boto3def lambda_handler(event, context):#Initialize Boto Resource  s3 = boto3.resource('s3')  textract = boto3.client('textract')  dynamodb = boto3.client('dynamodb')  table_name=os.environ\['table_name']  file_list = \[]  if "Records" in event:              records = event\['Records']      numRecords = len(records)      print("{} messages recieved".format(numRecords))      for record in records:          documentBlocks = None          num_pages = 0               num_lines = 0          bucket = ""          upload_prefix = ""                      textractJobId = ""          textractStatus = ""          textractAPI = ""          textractJobTag = ""          textractS3ObjectName = ""          textractS3Bucket = ""            textractTimestamp = ""                      if 'Sns' in record.keys():              sns = record\['Sns']              if 'Message' in sns.keys():                  message = json.loads(sns\['Message'])                  textractJobId = message\['JobId']                  print("{} = {}".format("JobId", textractJobId))                  textractStatus = message\['Status']                  print("{} = {}".format("Status",textractStatus))                   textractTimestamp =  str(int(float(message\['Timestamp'])/1000))                  print("{} = {}".format("Timestamp",textractTimestamp))                                           textractAPI = message\['API']                  print("{} = {}".format("API", textractAPI))                                      textractJobTag = message\['JobTag']                  print("{} = {}".format("JobTag", textractJobTag))                      documentLocation = message\['DocumentLocation']                  textractS3ObjectName = documentLocation\['S3ObjectName']                  print("{} = {}".format("S3ObjectName", textractS3ObjectName))                      textractS3Bucket = documentLocation\['S3Bucket']                  print("{} = {}".format("S3Bucket", textractS3Bucket))                                          bucket = textractS3Bucket                  document_path = textractS3ObjectName\[:textractS3ObjectName.rfind("/")] if textractS3ObjectName.find("/") >= 0 else ""                  document_name = textractS3ObjectName\[textractS3ObjectName.rfind("/")+1:textractS3ObjectName.rfind(".")] if textractS3ObjectName.find("/") >= 0 else textractS3ObjectName\[:textractS3ObjectName.rfind(".")]                  document_type = textractS3ObjectName\[textractS3ObjectName.rfind(".")+1:].upper()                                          if document_path == "":                      upload_prefix = textractJobId                  else:                      upload_prefix = "{}/{}".format(document_path, textractJobId)                  print("upload_prefix = " + upload_prefix)                    num_pages, documentBlocks = GetTextDetectionResult(textract, textractJobId)           if documentBlocks is not None and len(documentBlocks) > 0:              print("{} Blocks retrieved".format(len(documentBlocks)))                    #Extract lines of texts into a Python dictionary by parsing the raw JSON from Textract              blocks = groupBlocksByType(documentBlocks)              document_text, num_lines = extractTextBody(blocks)                    #Generate JSON document using form fields information                        json_document = "{}-text.json".format(document_name)              json_file = open("/tmp/"_json_document,'w_')              json_file.write(json.dumps(document_text, indent=4, sort_keys=True))              json_file.close()              s3.meta.client.upload_file("/tmp/"+json_document, bucket, "{}/{}".format(upload_prefix,json_document))                       try:                  response = dynamodb.update_item(                      TableName=table_name,                      Key={                          'JobId':{'S':textractJobId},                          'JobType':{'S':'TextDetection'}                      },                      ExpressionAttributeNames={"#tf": "TextFiles", "#jst": "JobStatus", "#jct": "JobCompleteTimeStamp", "#nl": "NumLines", "#np": "NumPages"},                      UpdateExpression='SET #tf = list_append(#tf, :text_files), #jst = :job_status, #jct = :job_complete, #nl = :num_lines, #np = :num_pages',                      ExpressionAttributeValues={                          ":text_files": {"L": \[{"S": "{}/{}".format(upload_prefix,json_document)}]},                          ":job_status": {"S": textractStatus},                          ":job_complete": {"N": str(textractTimestamp)},                          ":num_lines": {"N": str(num_lines)},                          ":num_pages": {"N": str(num_pages)}                      }                  )              except Exception as e:                  print('DynamoDB Insertion Error is: {0}'.format(e))                                      else:              try:                  response = dynamodb.update_item(                      TableName=table_name,                      Key={                          'JobId':{'S':textractJobId},                          'JobType':{'S':'TextDetection'}                      },                      ExpressionAttributeNames={"#jst": "JobStatus", "#jct": "JobCompleteTimeStamp"},                      UpdateExpression='SET #jst = :job_status, #jct = :job_complete',                      ExpressionAttributeValues={                          ":job_status": {"S": textractStatus},                          ":job_complete": {"N": str(textractTimestamp)}                      }                  )              except Exception as e:                  print('DynamoDB Insertion Error is: {0}'.format(e))                              s3_result = s3.meta.client.list_objects_v2(Bucket=bucket, Prefix="{}/".format(upload_prefix), Delimiter = "/")          if 'Contents' in s3_result:                            for key in s3_result\['Contents']:                  if key\['Key'].endswith("json"):                      file_list.append("https://s3.amazonaws.com/{}/{}".format(bucket, key\['Key']))                            while s3_result\['IsTruncated']:                  continuation_key = s3_result\['NextContinuationToken']                  s3_result = s3.meta.client.list_objects_v2(Bucket=bucket, Prefix="{}/".format(upload_prefix), Delimiter="/", ContinuationToken=continuation_key)                  for key in s3_result\['Contents']:                      if key\['Key'].endswith("json"):                          file_list.append("https://s3.amazonaws.com/{}/{}".format(bucket, key\['Key']))                            print(file_list)           return file_list  thanksJonFollowComment"

Answer: "0Accepted AnswerHi,Here is a link to some fairly straight-forward python code that takes an image, uses textract, and feeds it into Amazon Comprehend Medical. Look for the section "Natural language processing for medical documents"https://aws.amazon.com/blogs/machine-learning/automatically-extract-text-and-structured-data-from-documents-with-amazon-textract/In this example, use the following document to extract text using Amazon Textract. You then use Amazon Comprehend Medical to extract medical entities, such as medical condition, medication, dosage, strength, and protected health information (PHI).The python code from that link is below:import boto3# Documents3BucketName = "ki-textract-demo-docs"documentName = "medical-notes.png"# Amazon Textract clienttextract = boto3.client('textract')# Call Amazon Textractresponse = textract.detect_document_text(    Document={        'S3Object': {            'Bucket': s3BucketName,            'Name': documentName        }    })#print(response)# Print textprint("\nText\n========")text = ""for item in response["Blocks"]:    if item["BlockType"] == "LINE":        print ('\033[94m' +  item["Text"] + '\033[0m')        text = text + " " + item["Text"]# Amazon Comprehend clientcomprehend = boto3.client('comprehendmedical')# Detect medical entitiesentities =  comprehend.detect_entities(Text=text)print("\nMidical Entities\n========")for entity in entities["Entities"]:    print("- {}".format(entity["Text"]))    print ("   Type: {}".format(entity["Type"]))    print ("   Category: {}".format(entity["Category"]))    if(entity["Traits"]):        print("   Traits:")        for trait in entity["Traits"]:            print ("    - {}".format(trait["Name"]))    print("\n")Hope this helps,-randyCommentShareRandyTakeshitaanswered 4 years ago"


Question: Cognito verified email users being asked to verify every time they log in

"Currently using Cognito in a react app. Using the Authenticator component from "@aws-amplify/ui-react", Users are being asked to verify their email even after receiving the verification code in their email and using the code successfully. All users in the user pool are showing the email is verified. When I manually create a new user and select the email verified box, it still asks to verify or skip during every login attempt.As a last resort I tried going into the MFA and verifications tab inside cognito and changing 'Which attributes do you want to verify?' section to No verification. Still doing this all users in the cognito pool are being asked to verify on every login. I do not have and user groups setup, all users are in a pool.edit - also just tried to call the adminUpdateUserAttributes API and pass email_verified = true as an attribute with a newly created user using aws cli. I can see in cognito dashboard the user email switching to verified in real time. However, the user is still being asking to verify the email even though it clearly shows the user email as verified.FollowCommentAravind Sanjeev 4 months agoIt looks like email_verified attribute is not reaching the client side. Hence It is repeatedly asking to verify. Take a look at this: https://github.com/aws-amplify/amplify-js/issues/2730#issuecomment-498425391Share"


Question: Find domain's original nameservers

"Hello Folks,In my infinite wisdom, I changed the domain nameservers for my domain.  As we all know, when you do that, your domain disappears into the ether.  How do I find out what the original nameservers for my domain were/are?Any help is greatly appreciated.FollowComment"

Answer: "0It's hard being dumb.Go to the Hosted zones in Route53.Click the radio button beside the Domain Name of the domain that you've mauled.On the right side, a side panel should --ambush you-- appear.In that side panel should be a field named "Name Servers *".  This field contains the data that you need to set the world right.CommentShareAWS-User-0014169answered 4 years agorePost-User-1858724 6 months agoThis answer does not appear to work any more. (nameservers no longer listed in this side panel)Share"


Question: Lumberyard Discord

"Looking for support for Amazon Lumberyard? An active community of game devs, hobbyists, and generally thoughtful technical folks? Or maybe you’re just looking to chill somewhere full of engaged, knowledgeable gamers. If so, welcome to the Lumberyard Discord channel!Feel free to check it out and ask questions or offer your own insights! You’ll find many active users as well as a number of Lumberyard’s developers and staff. Stay up-to-date on critical updates and information about Lumberyard, or get advice on how to use the product from the people that built it.https://discord.gg/vS3ff8aWe have well over 300 Active Members, Support staff, Moderators, and Amazon Devs and Staffs in the channel!!When you join, be sure to checkout the rules, and make sure you take the full advantage of the server’s features!When you join, you will be placed in a lobby, the Lobby channel will guide you through giving you full access.*This is a Remake Thread as another user has been posting bad comments about the server, and wanted a Clean thread. This user had broken several rules on the server that resulted in a punishment.This server is here to allow you to ask questions, get help, share your creations, and grow a larger community...Follow"

Answer: "0Mini Bump since its been a bit,Almost at our 500 Member Goal!!SharerePost-User-1354821answered 3 years ago0[quote="Finchy, post:5, topic:8618"]Almost at our 500 Member Goal!![/quote]What?  Your goal is adding member?! 😳What is the useful of this? Too bad I am not fluent in English, my goal is to produce more video tutorials and more training documents, not the number of members! 🙂We must be sure that the first priority is to produce a wide range of YouTube tutorials for lumberyard 😉If the range of lumberyard video tutorials is large and wide, different members will be added on different platforms like Youtube , Discord , Telegram , etc ✅ 💯%Of course, these were my opinions, maybe you do not agree with my opinions  👀SharerePost-User-8224505answered 3 years ago0As stated in the News channel of the Discord, (Copied right from the news Post)Invite more people, Tell everyone about the serverTell Everyone you know about the server. Once we hit 500 users, we can enable more features. We are at 363 currently, That's 137 More to go.The following would be available.Unique brandingPersonalize your server with a Custom URL, Server Banner, and Invite Splash.Partner-only perksGet Discord Nitro, rewards for your community, and access to the Partners-only server.Be recognizedReceive a special badge on your server and stand out from the crowd on our Discovery page.We are just lacking the user count of 500 and the activity on server. The server Activity is as followed to be eligible for the rewards aboveHave at least 50 communicators (people who actively talk) per week. This means that in your server, at least 50 unique people should be regularly engaging in your community, such as posting a message. They can be a different set of 50 people per week.Once we hit those stats, then we can customize the server nicely, and help grow the community even more being a Discord partner with all the perks of a customized Discord channel. If you have any questions, feel free to message me in #generalMore info on the requirements are as followshttps://support.discord.com/hc/en-us/articles/115001494012https://discord.com/partnersThe Link for invite could be for example, discord.gg/lumberyard, whereas the current one is random characters, then custom invite spash, and customization's to the server and allSharerePost-User-1354821answered 3 years ago0@REDACTEDUSERNote that we do give warnings before a permanent ban, this include mutes and kicks along with warnings, failure to follow the rules results in a more severe action.Please note that if you want to speak about your ban, please avoid from posting it on public threads. If you want to speak about your ban, please do so with the moderator who banned you within a private message.Note that if you are posting all over public threads bashing the discord telling users not to join will put a negative result to your discussion with the moderator.SharerePost-User-1354821answered 3 years ago0I would join but I was banned for giving constructive criticism. The mods told me they didn't want people giving constructive criticism because it might scare off lumberyard developers.SharerePost-User-9359627answered 3 years ago0New year bump, Discord News post;The Moderators and Lumberyard Team wants to wish everyone here a great holiday and awesome new year. This year was filled with many new updates to the engine, new features and several new members. We hope your Holiday is filled with fun and memorable moments.We hope to see you in the new year, along with many new people. Please stay safe, and stay healthy.  There are many new features and changes coming in the new year, that we hope everyone will be able to see and experience.SharerePost-User-1354821answered 2 years ago0Bump for the new year and all the new members, :slight_smile:SharerePost-User-1354821answered 2 years ago"


Question: "Give access to Domain name, creating & launching instance, giving root account access to Developer"

"I am a non technical person with severe medical condition.I purchased multiple domain names and Route 53 hosting service from AWS.I hired a freelance web developer to develop my website on AWS and make it live.I created a user account for him but he is facing many issues.My web developer is asking me to give him the login details (password) because we have been waiting for few days now for help from AWS technical support.My questions are:Shall I give my Root/Account owner's password to my web developer who I have hired on contract basis?My web developer is getting following error messages while trying to create and launch an instance on Ubuntu to deploy Wordpress on AWS:API ERROR (for instances, instances running, placement groups, volumes, dedicated hosts, key pairs, security groups, Elastic IPs, Load Balancers, Snapshots)AMI ID not valid (for Ubuntu),"An error occured loading the data (for Instance type).How can I give access to one of my domain names to my web developer?Please note that I am suffering from a severe medical condition. It is very difficult to speak with AWS because they return my call at 2 am and 4 am in the night. This disturbs my sleep.One the other hand I am paying to a web developer to build my website.Thanks.FollowComment"

Answer: "0Hi @Vinay,Welcome to AWS! I will try to answer as best as possible your concerns.Shall I give my Root/Account owner's password to my web developer who I have hired on contract basis?NO, nowayjose! Never provide your root account user to any 3d party.My web developer is getting following error messages while trying to create and launch an instance on Ubuntu to deploy Wordpress on AWS:Considering the scenario of a simple EC2 instance running Wordpress over Ubuntu on AWS, Your developer only needs access to EC2, now, if part of your agreement is also the setup of the loadbalancer and others, then you can grant the developer IAM user with AmazonEC2FullAccess Policy under AWS IAM Policies which is more than enough for the task.https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AmazonEC2FullAccessHow can I give access to one of my domain names to my web developer?You don't, usually who owns the site manage its DNS, now considering that you have Route53, the developer can do everything it needs and you can create a simple CNAME record of your domain to the ALB, which is a simple task and doesn't involve too much technical challenge.I would like to recommend this site from AWS Documentation:https://aws.amazon.com/premiumsupport/knowledge-center/route-53-create-alias-records/https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-creating.htmlGood luck with the site!CommentShareDavidCaballeroanswered 4 months ago"


Question: What is the minimum interaction per item needed for Amazon Personalize SIMS recipe?

"What is the minimum interaction needed for an item so that Amazon Personalize SIMS return a custom SIMS list instead of top popularity? What happens if a product has only 1,2,3 historical interactions?...FollowComment"

Answer: "0Accepted AnswerYou can tune what has relevance - so you can specify the minimum number of user co-interactions between two items (defaults to 3), have more or less influence to long or short user histories (ignore me as I buy 2 things a year, or ignore you as buy 1000 per day), and also tune the min/max percentiles where you want to include or ignore item interaction counts.So as the co-interaction value defaults to 3, that’s the default, but tune it if you want.  You could make it so that an item with just 2 people co-interacting with it once is included, but normally the percentile settings would rule those out.CommentShareEXPERTDr Andrew Kaneanswered 3 years ago"


Question: migrated using the application migration service instance can't start

"We have a problem with instance i-0918440290836dad0. Using the application migration service, we started migrating the linux server with a configured environment, but it got stuck in Test in Progress. When a test instance tries to boot into ec2, it passes only one check, the status of the instance works, but we cannot connect to it. Can you please help resolve this issue?FollowComment"

Answer: "0You don't mention what the underlying operating system is.  Make sure that the operating system is supported by the Application MIgration Service Supported O/S.  You can also try to create another network interface and attach it to the instance.  Also, verify the security group allows the traffic that you are expecting.CommentShareMichael_Sanswered a year ago0Version of OS is Ubuntu 21.04, and instance sucesfully migrated to AWS, but fails one of two status checks. We created new security group with allow access.We do not see an error log to determine why the check does not complete. How we can see the logs?CommentShareAWS-User-5901842answered a year ago0I added another additional network interface, but this unfortunately did not help, still 1 of the two checks passedCommentShareAWS-User-5901842answered a year ago"


Question: help! i delete libssl.so causing ec2 can not ssh

"I delete libssl.so, which sudo/ssh depended, causing my ec2 machine can not login, how can i recover from this suitcation?FollowComment"

Answer: "1Stop the broken instanceDetach the root volume from the broken instanceBoot up a new instance that you can log in toAttach volume from broken instance to the new instanceMount the volume at the OS levelReinstall the missing libraryDetach volume from new instanceAttach fixed volume back the broken instanceBoot up instance.CommentShareEXPERTkentradanswered 8 months agorePost-User-4917819 8 months agoit work! thank you so much, it save my job.SharerePost-User-4917819 8 months agolet's tell more about details to help guys with the same problem.When meet "wrong type" while mount volumns, we can use the following command line.mount -t xfs -o nouuid /dev/nvme2n1p2the aws attach page tell you it will mount at /dev/sda, actually you can't find it in ec2.the attach volumns real dev name in instance is show bying the cml:  lsblk -f.The dev without mount path is the new volumn we found.Share"


Question: Time of triggering the alarm.

how to trigger CloudWatch alarm for an EC2 instance which is running more than hour? I need to get notification if Instance is running for more than 1 hour.FollowComment

Answer: "0Hi, did you envision to run a script shell at EC2 instance startup via user data: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html#user-data-shell-scriptsThis shell could sleep in background for 1 h and send the notification that you want with 'aws cloudwatch set-alarm-state' for example.See  https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudwatch/set-alarm-state.htmlAnother (more involving path) would be to use AWS SSM to do something equivalentCommentShareDidier_AWSanswered 8 days ago0Hi,You can configure an AWS cloudwatch alarm using the following steps to recieve email notifications if instance is running for an hour.Open the cloudwatch service.Click All alarms and the create alarm on the page.Select metric -> ec2 -> Per-instance metricsSelect the ec2 instance with metric= CPUUtilizationClick select metric.Statistic = "sum", Period = "1 hour"Threshold type ="static"Whenever CPUUtilization is... Greater than "0"Click nextSelect Alarm state trigger="In alarm"Under Send a notification to the following SNS topic , Create new topic and provide email address to which notification is to be sent.Click next and provide a name for this alarm.Click next and then create alarm.You will start receiving email notifications. To test for a short span, select Period= 1 minute in step 6.Hope this helps. If the solution works for you, your contribution to mark it answered will help others with similar use case.Kind Regards,Prince AroraCommentSharePrince Aroraanswered 8 days ago"


Question: Does AWS Lex have a content response length limit?

I have seen this page but it seems to only talk about limits of passing content/text into the bot. I am wondering about the length of the message that Lex can return to a user. Is there a limit to how long the message returned to the user can be?FollowComment

Answer: "0Hey,There are some limitations here, I am not sure if this is the thing you are askinghttps://docs.aws.amazon.com/connect/latest/adminguide/interactive-messages.htmlHave a good dayCommentSharebbolekanswered a year agowcheek a year agoThanks for the link @bbolek but I don't think it's what I'm looking for.Share0Based on my experimentation, it looks like the limit is around 20,000 characters.CommentSharewcheekanswered a year ago"


Question: AWS File Transfer IAM Role Access.

"Hi,I am trying to setup AWS File transfer SFTP server.Here is my requirement:User must be authenticated via third part identity provider which in Azure Authentication in our case.Once user logged in they should two folder in their homedirectory i.e. {transfer:user}/folder1 and {transfer:user}/folder2User should be restricted to put files in either folder1 or folder2, not in their home directory.User should be able download the files only if specific tag is set on object/files in S3So far, I am able to achieve Step 1 and Step 2 --Step 1 -- custom authentication using lambda.Step 2 -- Once user authenticated successfully, Lambda will create folder1 and folder2 in their homedirectory.But when user logged into their home-directory they are not able to see folder1 and folder2 in their homedirectory but I can see folders were created successfully in S3 bucket.Here is IAM role attached to Transfer server and not able to figure out what's wrong with it. Any help would be appreciate.{    "Version": "2012-10-17",    "Statement": [        {            "Sid": "ReadWriteS3",            "Effect": "Allow",            "Action": [                "s3:ListBucket",                "s3:GetBucketLocation"            ],            "Resource": [                "arn:aws:s3:::s3-bucket"            ]        },        {            "Sid": "HomeDirObjectAccess",            "Effect": "Allow",            "Action": [                "s3:PutObject"            ],            "Resource": [                "arn:aws:s3:::s3-bucket/*"            ]        },        {            "Action": [                "s3:GetObject",                "s3:GetObjectVersion"            ],            "Condition": {                "StringEquals": {                    "s3:ExistingObjectTag/allowdownload": "yes"                }            },            "Resource": [                "arn:aws:s3:::s3-bucket/*"            ],            "Effect": "Allow",            "Sid": "DownloadAllowed"        },        {            "Action": [                "s3:GetObject",                "s3:GetObjectVersion"            ],            "Condition": {                "StringEquals": {                    "s3:ExistingObjectTag/allowdownload": "no"                }            },            "Resource": [                "arn:aws:s3:::s3-bucket/*"            ],            "Effect": "Deny",            "Sid": "DownloadNotAllowed"        },        {            "Sid": "DenyMkdir",            "Effect": "Deny",            "Action": "s3:PutObject",            "Resource": "arn:aws:s3:::s3-bucket/*/*/"        }    ]}Within lambda where user authentication happens, I am returning user's homedirectoryHomeDirectoryDetails = [{"Entry":"/","Target":"/s3-bucket/${transfer:UserName}"}] also tried below but no luckHomeDirectoryDetails = = [{"Entry":"/folder1","Target":"/s3-bucket/${transfer:UserName}/folder1"},{"Entry":"/folder2","Target":"/s3-bucket/${transfer:UserName}/folder2"}]User gets permission denied error when try to do "ls" in their home directorysftp> lsCouldn't read directory: Permission deniedFollowComment"

Answer: "0Hello,If you try to remove the condition "s3:ExistingObjectTag/allowdownload" from the "s3:GetObject" permission, are you still getting the "Permission Denied" error when listing?CommentShareAWS-AdrianZanswered 5 months agosnowcoder_07 4 months agoHi @Aws-AdrianThanks for reply and apologies for late reply. I have question, if I remove condition, then any object would be downloadable whereas I want only specific tagged objects available to download.Share"


Question: NLB Static IP Question

"Just wanted to confirm that if a NLB is created without elastic IP’s address, will the IP’s remain static? Please let me know.FollowComment"

Answer: "1Accepted AnswerYes, the IP's well remain static until you delete the NLB.CommentShareAWS-User-0807538answered 4 years ago"


Question: Pipeline is looping between self update and build

We have few ci/cd pipelines setup using code pipelines/. We use java/kotlin cdk to manage infrastructure. We made code changes in cdk code to include test report. But the update pipeline and build is going in loop.Any way to fix this issue.FollowComment

Answer: "0Accepted AnswerThe issue is with the below code which I added in code build step to create a unit test report.Map<String, String> reportGroupProps = Map.of(                "files", "**/*.xml",                "base-directory", "lambda/build/test-results/test/",                "file-format", "JUNITXML"        );Map<String, ?> reports = Map.of(reportGroup.getReportGroupArn(), reportGroupProps);Map<String, ?> reportsMap = Map.of("reports", reports);It looks like cdk does Map.toString() somewhere in the code. Map.of() changes the order of keys while doing toString(), which result in cdk diff. This diff creates the pipeline to update, hence it is looping.I tested with the below code, the hashmap and treemap is consitently giving the same order, whereas map.of() changes the order.Map<String, String> mp = Map.of("k1", "v1", "k2", "V2");System.out.println("mp = " + mp);Map<String, String> hp = new HashMap<>();hp.put("k1", "v1");hp.put("k2", "v2");System.out.println("hp = " + hp);Map<String, String> smp = new TreeMap<>();smp.put("k1", "v1");smp.put("k2", "v2");System.out.println("smp = " + smp);CommentShareG V Navinanswered 2 months ago"


Question: Monorepo - Reference appspec.yml not in root

"I have a just moved to a monorepo whereby my deployment dir and appspec.yml files are now in a sub directory.My codeDeploy now fails as the appspec.yml file cannot be found. How can I reference it now that it is not in the root?Edited by: wonka on Aug 19, 2020 8:32 PMFollowComment"

Answer: "0We use TeamCity to package our artifacts prior to uploading to S3.  In our CI pipeline we bundle the artifact up so that the yml file is in the root.  Can you take advantage of your CI pipeline to control your artifact bundle?CommentShareboyercanswered 3 years ago0Many thanks @boyercYes, i think introducing a build tool is the right approach.CommentSharewonkaanswered 3 years ago"


Question: "High-volume Amplify app access logs are unreachable, and cannot select smaller range than an hour"

"There is an hour of access logs I want to download/view from my Amplify app.The problem is because of the high number of requests in this hour, the results can't seem to load in Amplify -> App settings: Monitoring -> Access logs. So I figured I could potentially use AWS CLI and inspect a smaller range, for example:"aws amplify generate-access-logs --start-time 2023-02-02T22:00Z --end-time 2023-02-02T22:05Z --app-id <app id> --domain-name <domain name>".However, ANY smaller range within that hour still results in an error when trying to load them (BadRequestException).This is likely because the narrow Timestamp range appears to be pointless and limited to a minimum of 1 hour anyway. This was shown in testing using "--start-time 2023-02-02T19:00Z --end-time 2023-02-02T19:30Z" results in the entire 7-8pm hour log. Am I using Timestamps wrong or is this just a 'feature' of Amplify app logs?Does anyone have any advice for this issue, e.g., how come I can't select a smaller range and is there a better way to access them? Or is this hour simply forever unreachable due to the high volume of requests...FollowComment"


Question: Greengrass LOG_LEVEL with custom components using Log4j

"Hi,we use log4j to manage logging in our custom components for greengrass (v2). i.e.log.error("Something terrible happened")orlog.info("Just something I like to log")However, I find that regardless of the level, it is always logged as "INFO" level in the greengrass compoment logs in cloudwatch. i.e.{"thread":"Copier","level":"INFO","eventType":"stdout","message":"ERROR [<cut>:64] Something terrible happened {error_message=<cut>}Is there a way to map this properly? Now we have to sync all log levels to cloudwatch to do i.e. monitoring or cloudwatch alarms.ThanksJFollowComment"

Answer: "0Hi,the "INFO" level you see in the logs generated by Greengrass cannot be changed. Greengrass captures all the output going to stdout and stderr and copies it to its own logs. stdout lines are logged at "INFO" level, stderr lines are logged at "ERROR" level. The loglevel from your own logger will be part of the message. You can redirect your logs to a separate file to have a cleaner log output. You can also extract your original log lines from the message field in the Greengrass logs.CommentShareEXPERTMassimilianoAWSanswered 2 months ago0Hey @johans,@MassimilianoAWS is right. If you want to have your logs written in your desired level and have them uploaded to cloudwatch. Change your log configuration to write logs into files in your files system and specify a rotation policy. Then, you can use the Log Manager component to target your log files and have your component logs in the log level you desire.Please note that if you want to use the Log Manager component to filter out your logs by log level, your logs need to be written in a specific JSON format.CommentShareochoanelanswered 2 months ago"


Question: How to read  AWS SNS JSON message through Lambda Subscriber put in on-premises Elasticsearch DB?

"Dear All,I need  reference link for Lamda readed SNS message store in on-premised ElasticSearch DB.Thanks in advanceFollowComment"

Answer: "0I am not familiar with a reference architecture, but what you will need is the following:A Lambda function that is invoked every time a message is sent to an SNS topic (the function is invoked, with the message payload in the event object, it does not read the message from SNS).Attach the function to a VPC, which has some connection to the on-premises network.The function will make a REST call to the Elasticsearch endpoint on-premises.CommentShareEXPERTUrianswered 9 months ago"


Question: How to reduce the cost for cloudtrail logging

"Hi All,I have multiple multi-region cloudtrail defined in single AWS account. One cloudtrail is sending logs to the security account and another cloudtrail is logging in to the local account. In the monthly bill, cloudtrail bill is showing as the massive chunk of the total billing amount. From the documents and resolution available on the internet, it seems happening due to duplication entry in the logs. However, the business requirement is to keep two cloudtrail in one account, one cloudtrail need to feed log data in the security account, and another cloudtrail to feed in the local account.How can we reduce the cost associated with two cloudtrails with duplicate log entries?Thanks & RegardsRimpal JohalFollowComment"

Answer: "1The first management event in each account is free and when you create multiple trails you enable delivery of multiple management events which increase your cost.  Do you have excluded KMS and RDS Data API events from your trails if you don't need them?It depends on what is configured in your cloudtrails. are these management only trail or it has data and insight events enabled as well. What is the security/compliance requirement? Do you need other events ? If not disable data and insight events.If the requirement is to have 2 cloudtrails then there is nothing much you can do. But if the requirement is to feed security account and as well as keep local copy of cloudtrail logs then there are multiple ways depending on what you are doing with data in the security account. e.g: You can read from security account directly from the s3 bucket in the local account if you are ingesting that data into some security tool. this will allow you to remove second cloud trail.CommentSharehameedullahanswered a year ago1The biggest cost you'll see is having more than 1 CloudTrail set up.  The "first cloudtrail" (copy) is free: https://aws.amazon.com/cloudtrail/pricing/.I would check with requirements and see if you could centrally receive CloudTrail Logs in 1 account for security (or even use S3).  One example:https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html.If requirements do require 2 CloudTrails set up, there isn't much you can do.CommentSharejsoncanswered a year ago1Not much to add for previous answers. Key to potential cost reduction is understanding why there is a requirement for local trail (centralized trail is likely becauce auditability requirement) Maybe Cloudtrail Lake would be interesting when looking for a ways to have both centralized audit trail and sharing that with multiple accounts. https://aws.amazon.com/blogs/mt/announcing-aws-cloudtrail-lake-a-managed-audit-and-security-lake/CommentShareKalluanswered a year ago"


Question: AWS Lightsail Error Message saying “Error establishing a database connection"

"Hello, there. We are currently facing an issue on using AWS Light with Wordpress. The error message shown on website was “Error establishing a database connection". This appears whenever we launch any instances. The first time we found the error, we were using Wordpress side for putting some e-commerce plugins and heard a developer doesn’t think he touched any database connections.As we cannot figure out the problem by ourselves, we would like to know the reason why this occurs. Till now we don't know how to solve this so the developer just snapshoted the previous instance and made new one to revive the website. Even though we restart the new instance, we got errors which I indicated above.Thanks in advance.FollowCommentKip a year agoThis appears like a configuration issue? But before diving deeper; Do you mean that the Website was working well before the issue occurred?Share"

Answer: "0Hello,Sorry to see you're encountering this issue. This error likely means either the username/password combination for Wordpress connecting to the database set in wp-config.php is incorrect, or the database isn't running. Here are a few things I'd try:See if the database is running. You can use the command ps aux | grep mysql to see if there's a mysql process running.Check your wp-config.php file to ensure that the database credentials set there are correct.Check the instance's disk space (df -h) to ensure it's not full.I hope those steps help you figure out the issue. Thank you for using Amazon Lightsail!-MaxwellCommentShareMaxwellanswered a year ago"


Question: "Harvest Job Mediapackage failed, but why?"

"I have a MediaLive channel with output to MediaPackage. I want to save the output of MediaPackage to an S3 bucket, for which I am using a Harvest job. All the jobs I have tried take around 30 minutes to complete and all with the same result: failed. However, I am not getting any error message or anything similar. How can I find out what is happening?FollowComment"


Question: PLEASE HELP ME CONFIGURE MY DOMAIN IN WORKMAIL by adding my DNS records

"Hi,I'm afraid I got confused and couldn't complete the process of setting up my Workmail in AWS.  I created my organization (maenkind and maenkind.com) but then the system gave me a warning.To be able to use this domain with Workmail, you need to configure it by adding the following DNS records.Can someone help me?FollowCommentiBehr EXPERT23 days agoCan you expound on your question?This may help.https://docs.aws.amazon.com/workmail/latest/adminguide/domain_verification.htmlI do see that you have an mx record and txt DNS records defined.> dig mail.maenkind.com.; <<>> DiG 9.10.6 <<>> mail.maenkind.com.;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57874;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;mail.maenkind.com.INA;; ANSWER SECTION:mail.maenkind.com.300INA3.128.126.25;; Query time: 17 msec;; SERVER: 2001:470:c112:41::1#53(2001:470:c112:41::1);; WHEN: Mon May 08 18:14:44 CDT 2023;; MSG SIZE  rcvd: 62> dig -t txt maenkind.com; <<>> DiG 9.10.6 <<>> -t txt maenkind.com;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34409;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;maenkind.com.INTXT;; ANSWER SECTION:maenkind.com.300INTXT"v=spf1 a mx -all";; Query time: 16 msec;; SERVER: 2001:470:c112:41::1#53(2001:470:c112:41::1);; WHEN: Mon May 08 18:15:16 CDT 2023;; MSG SIZE  rcvd: 70ShareHemant Chugh 23 days agohttps://www.youtube.com/watch?v=g3nDQ0-jxSUfollow above videoShare"

Answer: "0Hello,In order to setup domain WorkMail, you can follow the document below.https://docs.aws.amazon.com/workmail/latest/adminguide/add_domain.htmlPlease elaborate your use case so we can provide more details.Thank youCommentShareSUPPORT ENGINEERAjinkya B-AWSanswered 19 days ago"


Question: re:Post Question controls are broken

"On the Questions tab, it shows "12 / page". If you change to 90 per page, it reloads, reverts to 12 per page. If you click the list view - which looks more or less the same as the cards view, as opposed to a simple, streamlined actual list view - and then click the "next page" button, it reverts to the card view.Is this the right place to report these bugs? If not, please redirect me accordingly.FollowComment"

Answer: "1Accepted AnswerHi ThereYou can use the feedback button on the right side of the page or go to this URL: https://repost.aws/feedbackThat said, are you blocking cookies?  I was able to replicate this behavior in Firefox by blocking ALL cookiesWhen its set to the default setting, the controls work normallyCommentShareEXPERTMatt-Banswered 7 months agobwhaley EXPERT7 months agoI am using Brave browser. With Brave, the behavior I described above occurs using the default browser settings. I found that setting "Allow All Cookies" (instead of the default, which is "Block cross-site cookies", the behavior still occurs. However, using the "Shields Down" setting fixes the issue. Thanks for helping.Share"


Question: "In workspace, to maintain the timezone as UTC across all workspaces. I created the GPO settings, suggested by the aws. but the gpo rule is applying on few workspaces but it is not working on others"

"to maintain the desired timezone as UTC across all workspaces. i created the gpo settings suggested by the aws  (https://docs.aws.amazon.com/workspaces/latest/adminguide/group_policy.html).but the group policy is working for few workspaces. whereas, for few workspaces its not working.Any suggestions?FollowComment"

Answer: "0HelloThe first step would be to ensure that all workspaces are receiving the GPOs as intended.  You can run gpupdate /force from the command line to force the WorkSpace to update the Group Policies then from an Amazon WorkSpace that is showing the correct settings run gpresult /h in an elevated command prompt and output that to a file locally.  Do the same for a WorkSpace that is not showing the correct result. Compare the 2 outputs and see if they are both receiving the same policies.  If there are differences, make sure both computer objects are in the correct Organizational Unit (OU) in Active Directory.CommentShareRobert_Fanswered a year ago"


Question: Register .nu Domain Names

"Is it possible to add .nu to the list of TLDs that customers can register domain names under?   This is a popular TLD in Sweden, in addition to .se.  Thanks in advance!FollowComment"

Answer: "0Hello,Currently ".nu" TLD is not in the list of Domains that you can register with Amazon Route 53. AWS does keep adding new TLDs to the list so keep an eye on the list of officially supported TLDs.That being said, as the domain is already registered with another registrar, you can just:Create a public hosted zone in Route53: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingHostedZone.htmlGet the nameservers for this zone: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/GetInfoAboutHostedZone.htmlSet these nameservers in your registrar console (often found in glue records or nameservers)Use your public hosted zone by creating recordsNote here that you can have a registrar (for example GoDaddy) different than the DNS service (Amazon Route53).See this link that explains the whole procedure: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/migrate-dns-domain-in-use.htmlHope this helps.CommentShareEXPERTTushar_Janswered 8 months ago"


Question: Google Index become 0 after migration on AWS Lightsail

"Google submitted around 7500 pages and index 6250. But when migrate website on AWS lightsail, it become 0 index in google webmaster tool.Re-submitted but still showing 0 indexWhen search site:distpub.com - it shows 6950 in search result it means not blocked.Site: https://distpub.comHow to find exact problem and re-index all pages?I will appreciate for this suggestion and fixes.Thanks.FollowComment"

Answer: "0Could be a fluke in the Search Console. If your site is still in the index and you can see Googlebot accessing your pages in your web server access logs, it's probably not something to worry about.CommentShareRobMManswered 4 years ago0Ps. did you switch your site over from HTTP to HTTPS when you migrated, by any chance? If so, you'll need to add the HTTPS site to the Search Console as a separate website.CommentShareRobMManswered 4 years ago"


Question: how to choose an instance type for  a sagemaker testing/inference?

"looking at few examples,  for training in sagemaker . are there some guidelines based on the model size, data to be trained , what type of instance cpu/gpu to use? also, can one use spot instances ( may be with multiple gpu cores)?FollowComment"

Answer: "1Yes, you can use spot instances. I recommend it, and always run training on spot instances. If you are using the Python SDK, add the following parameters to your Estimator:       use_spot_instances=True,       max_run={maximum runtime here},       max_wait={maximum wait time},       checkpoint_s3_uri={URI of your bucket and folder },See the documentation for more details here: https://docs.aws.amazon.com/sagemaker/latest/dg/model-managed-spot-training.htmlAs far as instance types are concerned, the individual algorithms contain some initial recommendations for instances types:https://docs.aws.amazon.com/sagemaker/latest/dg/algos.htmlFor example, see the EC2 Instance Recommendation for the Image Classification Algorithm:https://docs.aws.amazon.com/sagemaker/latest/dg/image-classification.htmlThere was a presentation at re:Invent 2020 - How to choose the right instance type for ML inference: https://www.youtube.com/watch?v=0DSgXTN7ehgHope this helpsCommentShareDennis_Aanswered a year agoclouduser a year ago@Dennis_A -thanks . I see the instances types with gpu are either 1 and only other option is with 8 gpu . Nothing in betweenShareDurga_S a year agoSageMaker also has an Inference Recommender that helps you select the best instance type and configuration for hosting - https://docs.aws.amazon.com/sagemaker/latest/dg/inference-recommender.htmlShare1And for the selection of instance type for inference, you might want to look at Amazon SageMaker Inference Recommender:https://docs.aws.amazon.com/sagemaker/latest/dg/inference-recommender.htmlCommentShareAWS-User-8651363answered a year ago"


Question: ALB pre-warming

Is ALB pre warming need now for handling flash traffic. And to enable pre-warming in ALB.FollowComment

Answer: "1Accepted AnswerHello AWS Customer,Amazon ELB is able to handle the vast majority of use cases for our customers without requiring "pre-warming" (configuring the load balancer to have the appropriate level of capacity based on expected traffic). In certain scenarios, such as when flash traffic is expected, or in the case where a load test cannot be configured to gradually increase traffic, we recommend that you contact us through AWS Support to have your load balancer "pre-warmed". We will then configure the load balancer to have the appropriate level of capacity based on the traffic that you expect. We will need to know the start and end dates of your tests or expected flash traffic, the expected request rate per second and the total size of the typical request/response that you will be testing.Hope you will find this information useful. Please let me know if you have any further questions or concerns. We will be more than glad to assist you.Have a good day!CommentShareSUPPORT ENGINEERJisoo_Kanswered 4 months agoEXPERTTushar_Jreviewed 4 months ago0can i know how do i raise ticket for pre warming ?CommentSharerePost-User-9665323answered 4 months ago"


Question: How to run amplify-s3-image correctly with Vue 3 & Vite?

"I am trying to display images with amplify-s3-image in a Vue 3 project, but cannot get it working. The error message is "GET http://localhost:5173/node_modules/.vite/deps/amplify-s3-image.entry.js net::ERR_ABORTED 504 (Gateway Timeout).I suspect that I didn't set up the main.ts file properly. I am using the following code:import {applyPolyfills,defineCustomElements,} from '@aws-amplify/ui-components/loader';Amplify.configure(aws_exports);applyPolyfills().then(() => {defineCustomElements(window);});const app = createApp(App);app.config.compilerOptions.isCustomElement = tag => tag.startsWith('amplify-');app.mount("#app");What did I do wrong? Is there a better approach to import reference to amplify-s3-image? How to use AWS custom elements anyway? Thanks!FollowComment"


Question: Amazon Cognito reset password

"Hi,During forgot password from our UI, Cognito ask code, email, and new password. Question is why it is asking email address? is this required? I have never seen reset password asking email with code.Is this normal or I am doing something wrong?FollowComment"

Answer: "0This is normal behavior, see our documentationCommentShareMKanswered 2 months agoozy cozy 2 months agoIs this still correct if I have my custom UI and do everything prom Admin api?ThanksShare"


Question: MSK ebs snapshot

"I am using the MSK and it seems to be working fine as data is getting published and consumed correctly. Now the requirement is to have another MSK cluster and destroy current one, so I want to utilize the current data stored in ebs and attach it to new MSK cluster. How can we do it, can we take snapshot of current MSK volume.?FollowComment"

Answer: 0We do not currently have a feature that allows you to transfer data volumes from one cluster to another.  Our current recommendation is to migrate your data using Mirror Maker.  See https://docs.aws.amazon.com/msk/latest/developerguide/migration.html for more information.CommentShareAWS-User-6643836answered 3 years ago


Question: What languages are supported with amplify custom resrouce?

"I want to use cdk instead of cloud formation to add custom resources in my amplify project, but it does not prompt me for the programming language choice, and only uses typescript.  Is it possible to use python or go?FollowComment"

Answer: "0To add custom resources , here is the list of supported frameworks.https://docs.aws.amazon.com/cdk/api/v1/docs/custom-resources-readme.htmlBut here is an example for typescript"The AWS Cloud Development Kit (AWS CDK) is an open source software development framework to define your cloud application resources using familiar programming languages, such as Typescript"https://docs.amplify.aws/cli/custom/cdk/CommentShareAWS-User-7653869answered 6 months ago"


Question: CustomSQL on Tableau returning an error when I'm copy pasting the same query which gives me results in AWS Athena.

"The error message I'm getting:Error message not found: ATHENA_CLIENT_ERROR. Can't find bundle for base name com.simba.athena.athena.jdbc42.messages, locale en_USWe have a datalake architecture which we stood up on AWS s3. When I'm trying to run queries against the tables in the Curated db, in Athena, I'm getting results. When I copy the same query and paste it in the custom SQL funtion in Tableau it gives me an error. This issue is affecting our business and needs to resolve as soon as possible.Please send me an answer if you have previously dealt with this kind of issue.Important stuff:I have the JDBCSIMBA4.2 driver.I have an athena properties file directing to our S3 location.I have JAVA8.0 Installed with JAVA HOME.I have * access meaning I have all access in AWS.I am able to connect to tables in the database.I am able to view all the tables in the database.I also made couple dashboards using this database.FollowComment"


Question: logstash pipeline not working for OpenSearch serverless

"Hi All,We are trying to send the some sample logs to OpenSearch Serverless collection using logstash from EC2 instance, we are getting this below error, can someone please help to advise how to troubleshoot this.(From same EC2 instance we are able to send some logs via OpenSearch client for same  collection endpoint, so i guess we have all the required access iam policies)[2023-05-24T06:12:42,684][WARN ][logstash.outputs.opensearch][main] Restored connection to OpenSearch instance {:url=>"https://myendpoint.my-region-1.aoss.amazonaws.com:443/"}[2023-05-24T06:12:42,704][INFO ][logstash.outputs.opensearch][main] Cluster version determined (2.0.0) {:version=>2}[2023-05-24T06:12:42,713][WARN ][logstash.filters.grok    ][main] ECS v8 support is a preview of the unreleased ECS v8, and uses the v1 patterns. When Version 8 of the Elastic Common Schema becomes available, this plugin will need to be updated[2023-05-24T06:12:42,783][ERROR][logstash.outputs.opensearch][main] Unable to retrieve OpenSearch cluster uuid {:message=>"undefined method `[]' for nil:NilClass", :exception=>NoMethodError, :backtrace=>["/home/ec2-user/logstash-8.6.1/vendor/bundle/jruby/2.6.0/gems/logstash-output-opensearch-2.0.1-java/lib/logstash/plugin_mixins/opensearch/common.rb:91:in `discover_cluster_uuid'", "/home/ec2-user/logstash-8.6.1/vendor/bundle/jruby/2.6.0/gems/logstash-output-opensearch-2.0.1-java/lib/logstash/outputs/opensearch.rb:253:in `finish_register'", "/home/ec2-user/logstash-8.6.1/vendor/bundle/jruby/2.6.0/gems/logstash-output-opensearch-2.0.1-java/lib/logstash/outputs/opensearch.rb:231:in `block in register'", "/home/ec2-user/logstash-8.6.1/vendor/bundle/jruby/2.6.0/gems/logstash-output-opensearch-2.0.1-java/lib/logstash/plugin_mixins/opensearch/common.rb:83:in `block in after_successful_connection'"]}[2023-05-24T06:12:42,792][INFO ][logstash.outputs.opensearch][main] Using a default mapping template {:version=>2, :ecs_compatibility=>:disabled}[2023-05-24T06:12:42,867][ERROR][logstash.outputs.opensearch][main] Failed to install template {:message=>"Got response code '403' contacting OpenSearch at URL 'https://myendpoint.my-region-1.aoss.amazonaws.com:443/_index_template/logstash'", :exception=>LogStash::Outputs::OpenSearch::HttpClient::Pool::BadResponseCodeError, :backtrace=>["/home/ec2-user/logstash-8.6.1/vendor/bundle/jruby/2.6.0/gems/logstash-output-opensearch-2.0.1-java/lib/logstash/outputs/opensearch/http_client/manticore_adapter.rb:178:in `perform_request'", [2023-05-24T06:12:42,949][INFO ][logstash.javapipeline][main] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>125, "pipeline.sources"=>["/home/ec2-user/logstash-8.6.1/logstash-generator.conf"], :thread=>"#<Thread:0x56582b65@/home/ec2-user/logstash-8.6.1/logstash-core/lib/logstash/java_pipeline.rb:131 run>"}[2023-05-24T06:12:44,239][INFO ][logstash.javapipeline    ][main] Pipeline Java execution initialization time {"seconds"=>1.29}[2023-05-24T06:12:45,458][ERROR][logstash.outputs.opensearch][main][94d7b43e9ddc82bd66b8069c6178c6e3c5f41ed993c59831bb213b4295ecaf15] Encountered a retryable error (will retry with exponential backoff) {:code=>403, :url=>"https://myendpoint.my-region-1.aoss.amazonaws.com:443/_bulk", :content_length=>87843}FollowComment"


Question: How do I report a bug present with EBS snapshot feature in "AWS console"?

I found likely bugs in AWS console when using EBS snapshot feature.  How do I report a defect or bug in AWS?Following is the issue.I am allowed to choose even a "Terminated" EC2 instance while attempting to create a snapshot. Further it incorrectly shows an EBS volume belonging to another EC2 instance which is running(not terminated) for the terminated EC2 chosen for snapshot generation. First of all it is a bug to allow a terminated instance to choose from a list of EC2 instance to create an EBS snapshot and then showing an EBS volume of other EC2 instance is second bug.FollowComment

Answer: 0The first is desired behaviour. It allows customers to snapshot an EC2 instance that they have accidentally terminated so that they can recover the data.That is shows the wrong EBS volume is definitely not the right behaviour. Please create a support case for this issue.CommentShareEXPERTBrettski-AWSanswered a year agosandeep tuppad a year agoif the EC2 is terminated and the EBS was deleted based on the configuration(delete EBS on termination) there is no way to capture snapshot? How do i report a support ticket? I only have "Basic Plan".Share


Question: WorkSpaces - Inoperable AD Connector

I have an AD Connector registered with WorkSpaces that has become inoperable due to the downstream managed AD being recreated.Is there any way to deregister this so it can be deleted?FollowComment

Answer: "0If you have any WorkSpaces attached to the AD Connector, you will need to delete those first before you can deregister the AD Connector.  If you are still  unable to unregister the AD connector through the console or API, you can submit a case to AWS support to have it deregistered.CommentShareRobert_Fanswered 10 months ago"


Question: How AWS personalize selects interactions when number of interactions is more than 500M?

"According to the docs, the Maximum number of interactions that are considered by a model during training is 500M. What if I have more than 500M records in my interactions dataset? How does Amazon select 500M interactions among those to train a model? Does it consider the latest 500M interactions?FollowComment"

Answer: 1The most recent 500M interactions are used for training based on the TIMESTAMP column in the interactions dataset. This limit is also adjustable.https://docs.aws.amazon.com/personalize/latest/dg/limits.htmlCommentShareJames_Janswered 7 days ago


Question: Does CloudWAN support advertise routes to VPC route table?

"In quotas page of CloudWAN documentation,  Routes advertised from core network to VPC has a default value of 5000.https://docs.aws.amazon.com/network-manager/latest/cloudwan/cloudwan-quotas.htmlDoes it mean core network can propagate routes to VPC route table?I did some test but no routes added into VPC route table.If this feature is supported, may I get some operation instructions as no doc describe how it works? which segments would be advertised and which VPC route table would receive the routes? and how to enable it?If this feature is not supported, what's the meaning of "Routes advertised from core network to VPC"?FollowComment"

Answer: "0It is not possible for the core network to propagate routes to a VPC route table. The "Routes advertised from core network to VPC" refers to the ability for the core network to advertise routes to a VPC. This means that the core network can send routes to a VPC, but the VPC cannot send routes to the core network.In Amazon VPC, you can create a VPC peering connection to allow two VPCs to communicate with each other as if they were part of the same network. You can also create a VPC transit gateway to allow multiple VPCs and on-premises networks to communicate with each other. However, it is not possible to directly communicate between the core network and a VPC.CommentShareSeanSianswered 5 months agoJerry 5 months agoCould you please explain more about difference between " core network to propagate routes to a VPC route table" and "core network to advertise routes to a VPC."?In the doc, both "Routes advertised from core network to VPC" and "Routes advertised from VPC to core network" described, which seems indicate bi-directional route propagation. Bi-directional route propagation is true for VPN attachment and connect peer and the doc has similar description.However, only vpc CIDRs can be propagated to core network segments in my test. So how to make route propagated bi-directional for VPC attach?Share0If I understand your question correctly, you have a VPC with a VPC attachment to a Core Network segment, and you would like the VPC route table to be auto-updated with routes learned from the Core Network.This is not supported today for TGW or Cloud WAN Core Networks.From a best practices perspective, it is best to keep VPC routing simple with a few static routes to the TGW or Cloud WAN attachment.  The TGW Route Table or the Cloud WAN Core Network will then do the appropriate routing.Notes:There ARE a few services such as VGW and DXGW that will auto-update VPC route tables with propagated routes.  Please speak with your AWS SA for roadmap info for other services.The "Routes advertised from Core Network to VPC" limits above indicate how many routes can point to VPC from Core Network.  For return traffic, the VPC will rely on the simple static route indicated above.CommentShareJoshanswered 4 months ago"


Question: Route 53 domain cname record without hosted zone

"So there are a few things I have done so far:Purchase a domain name through route 53.Create a public S3 bucket, configure it for static website hosting, and upload some website files. Please note that this bucket's name is identical to the domain name I purchased through route 53.Create a Cloudfront distribution whose origin is the S3 bucket.My question is simply this: what is the cheapest way to point the domain to either the Cloudfront distribution or the S3 bucket via SSL (HTTPS)? I keep reading in places that, if the S3 bucket name is identical to the domain name, you can do this without using hosted zones. Is this correct? I'm just looking to reduce my monthly bill (which is $0.50 due to the hosted zone that I am currently using to route traffic to the Cloudfront distribution).FollowComment"

Answer: "0Accepted AnswerI keep reading in places that, if the S3 bucket name is identical to the domain name, you can do this without using hosted zones. Is this correct?That's not generally correct.  CNAME records must be contained within some DNS zone on some nameservers (ie a hosted zone in Route 53).  If you're not owning a DNS zone somewhere, you'd have to be putting your CNAME in the parent domain's DNS zone.  DNS Registries do not generally allow that - they only delegate to your DNS zone's nameservers.  it's conceivable that the owner of some domain, e.g. example.com might let you put a CNAME in there called e.g. foo.example.com or foo.bar.example.com, but that's really just someone else owning the zone.CommentShareEXPERTgavinmcanswered 2 years ago"


Question: How to exacute virus scan before uploading the file to the S3 bucket

"Hello,I'll upload the file to the S3 bucket as following.I open the web page and click the upload button.The Lambda function generates a presigned URL for uploading objects.(background processing)The file is uploaded to the S3 bucket.To prevent uploading the virus file, I want to check the file before uploading to the S3 bucket.AWS has no virus scan service.(AWS support said so)Is there any method?Thanks,FollowComment"

Answer: "1You can upload to a bucket and have a policy applied that prevents use of the file until it's been scanned.  Add an S3 event configuration that triggers virus scanning automatically on uploaded objects, and then either tag or move objects once confirmed virus-free so they can be used by other applications.  One way of doing that virus scanning is to queue events in SQS, and consume them via virus-scanning servers running in an EC2 auto-scaling group.  This can be implemented using ClamAV in Python for example.  I wouldn't recommend going fully serverless for this as there is considerable overhead in loading virus definitions.CommentShareEXPERTskinsmananswered a year agoAWS-User-7738938 a year agoThank you for your response.Is the method that you said the following?https://github.com/bluesentry/bucket-antivirus-function#deny-to-download-the-object-if-not-cleanBy this method is it impossible to prevent uploadig the virus file to the S3 bucket?Share0Here are a couple of blog posts that cover how to do this:Integrating Amazon S3 Virus Scanning into Your Application Workflow with Cloud Storage SecurityAmazon S3 Malware Scanning Using Trend Micro Cloud One and AWS Security HubCommentShareEXPERTkentradanswered a year agoAWS-User-7738938 a year agoThank you for your response.I watched the page 'Integrating Amazon S3 Virus Scanning into Your Application Workflow with Cloud Storage Security'.I think 'API-Driven Scanning' is the good way. Is there similar AWS service?Share"


Question: I am not able to stop or terminate the server

"Hi Team,I am not able to stop or terminate my AWS instance. As it shows the error Modify it's 'disableApiStop' instance attribute and try again. I am not able to complete the action. Today i got a abbusive alert for that instance on my mail and tried to terminate the instance and getting the same error might be the server as been accquired by hackers, i don't have any issues in terminating it as it's test server and doesn't as any critical data.Can somer suggest me on how get resolved from this issue.Regards,JagadishFollowComment"

Answer: "0Hi JagadishI understand you want to stop/terminate your instance but you are unable to and receive an “disableApiStop” error. You instance has stop proctection enabled [1], to disable you need to select the instance and go to Actions > instance details > Change stop protection, for Stop protection, choose disable.[1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.htmlCommentShareLwazianswered a year ago0I faced this issue, but the instance terminate protection was disabled already. What did work for me after I updated my cli tools to version "aws-cli/2.7.20 Python/3.9.11 Darwin/21.5.0 exe/x86_64 prompt/off" was:aws ec2 modify-instance-attribute --instance-id <instance_id> --no-disable-api-stopI have a feeling this is a old/new console api incomatablity and wonder if I switched to old console that I might of had success turning it on/off there too."aws-cli/2.2.30 Python/3.8.8 Darwin/21.5.0 exe/x86_64 prompt/off" - did not workCommentSharerePost-User-0232827answered 10 months ago"


Question: How to create Lambda using AWS Serverless Application Model (SAM) without an AWS managed IAM policy?

"Hi,I want to create a Lambda function in Serverless Application Model (SAM) without any AWS managed policies so that I can have fine-grained control over permissions to resources and to enforce a least permissive model. My existing code looks like this:  GetAllOrdrersFunction:Type: AWS::Serverless::FunctionProperties:  CodeUri: orders_api/  Handler: orders.get_all_orders  Runtime: python3.9  Policies:- CloudWatchPutMetricPolicy: {}- DynamoDBCrudPolicy:TableName: !Ref OrdersTableWhen I deploy it to AWS, I see that an execution role sam-app-GetAllOrdersFunctionRole-3VGCZYIGQNGK is automatically generated consisting of the following policies:AWSLambdaBasicExecutionRole - AWS ManagedGetAllOrdersFunctionRolePolicy0 - Customer inlineGetAllOrdersFunctionRolePolicy1 - Customer inlineHow can I modify my template to only deploy my lambda function with my policies and not the default AWS managed policy?Thanks.FollowComment"

Answer: "0Use the Role property instead of Policies in the AWS::Serverless::Function.When you use the Policies property, the policies that you've specified will be appended to the default role for this function.  Since you didn't specify a role in the template, one is created for you, which has the AWSLambdaBasicExecutionRole.So, create an IAM role that contains the least privilege polies that you need and then just reference the ARN of that role in the AWS::Serverless::Function. Note that if the Role property is set, the Policies property is ignored.More info: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html#sam-function-policiesCommentSharejoahnaanswered a year agolearning a year agoThanks, I understand this much. Can you please point me in the right direction on how I can write a role with my own custom policies for a Lambda function? When I attempt to do so I get a circular dependency error as my policies are referencing my lambda function which has the role attached. Please help.Share"


Question: AWS Elemental MediaPackage - Video output issues after updating CF stack

"Greetings!We are using AWS Elemental MediaPackage application using Cloud formation. We updated the existing stack to 5.2 using following formation template: https://docs.aws.amazon.com/solutions/latest/video-on-demand/deployment.html#update-stackAfter the update, we are facing issues regarding the quality and dimensions of videos. Output video is portrait in center and not taking full space. Also it seems rotated though provided parameter is 'DEGREE_0' (we want it to be in original format the file was created). Previous version of stack wasn't using the Rotate environment variable.Any help or direction to sort out this issue will be highly appreciatedAbdul RehmanFollowComment"

Answer: "0As it turned out, it was the job preset behind the job template causing this abnormal behavior. After creating a new job template providing new template fixed the issueCommentShareAbdul-Rehmananswered 2 years ago"


Question: Not able to use Image Builder for Graphics-Pro instance type with AppStream 2.0

"I have already made request to increase the quota limit for the stream.graphics-pro.8xlarge instance for image builder. I got response from the AWS support executive and got confirmation that quota increase has been approved and I can use the requested instance type for image builder in AppStream. But while using the image builder, I am not getting the option to use the Graphics-Pro instance family. It only shows General purpose and G4 instance family. What am I missing here? Please do the needful.FollowComment"

Answer: "0Hi -Are you sure you're checking the region the limit was requested and raised for? If you are, please follow up on your AWS Support case about not being able to launch the resource that was granted.CommentShareEXPERTMuraliAtAWSanswered a year agoAWS-User-sk a year agoYes, I am checking the same region the limit was requested and raised for. I followed up AWS Support case, in which they suggested to ask here in the forum. Still facing the same issue.Share"


Question: Connection Timeout Error while connection EC2 with Putty

"getting connection time out error ,while connecting EC2 using Putty.already edit Inbound rule under security group as SSH Port 22 source as anywhere ,still same error occurs.please guide , as I am new to AWS portalFollowComment"

Answer: 0Did you add your ppk key to Putty?  You need to convert .pem key from AWS to .ppk file.You can refer to this https://support.cloudacademy.com/hc/en-us/articles/360036151511-How-do-I-convert-a-PEM-Key-to-a-PPK-KeyCommentShareHoan Phamanswered a year ago0A timeout indicates that the EC2 instance isn't reachable. If the key was incorrect you'd see an error messaging indicating that.Things I would try:See if you can SSH to other destinations; if your service provider may be blocking outbound SSH connections from your network.Use the EC2 Serial Console to check that the instance is running the SSH daemon.See if you can SSH from the instance to itself.Set up another EC2 instance in the same VPC. Use the Serial Console again to see if you can SSH within the VPC.CommentShareEXPERTBrettski-AWSanswered a year ago


Question: RDS SQL Server database compression

"Hi Team,We are doing the assessments and found the database compression in the report- does the RDS SQL server supports database compression?If yes, which version will support in RDS( on-premises its supports in Enterprise and standard edition  )FollowCommenttim-ivanchuk 19 days agoHello! Can you provide a link to the report you mentioned in the post?Share"

Answer: "2Hello!Thank you for taking time to write a question on re:Post.Amazon RDS for SQL Server does support data compression, and backup data compression.The versions are similar to on premises, both Standard Edition and Enterprise Edition have that feature. Specifically, starting in SQL Server 2016 SP1, this became available in all versions. As long as you are using that version or above, you will be able to compress data in any version of SQL Server. Here is a table that has some feature sets for different SQL Server versions that can help you nail down the specifics.CommentSharetim-ivanchukanswered 19 days ago"


Question: AWS OTA for ESP32

"Hi, I was referring to AWS OTA FreeRTOS MQTT example available at AWS site.Wanted to know availability of:description for files used in projectflow of program for OTAPlease suggest document for aboveFollowComment"

Answer: "0I'll answer your questions the best I can in the order you've asked them.description for files used in projectI'm not sure whether you're asking for a description of the files present in any one of projects given the Amazon FreeRTOS repository or if you're looking for an explanation of the files you need for a generic project. Can you clarify here?I would recommend you look at the FreeRTOS developer documentation on source file organization. I realize this doesn't perfectly match the AWS FreeRTOS source code structure, but given that AWS FreeRTOS is heavily influenced by FreeRTOS, it should give you some helpful background.flow of program for OTAAWS IoT Over-The-Air updates generally have the following steps:Generate new firmware to upgrade toUpload the firmware to the cloud (this is usually S3)Sign the firmware imageCreate an AWS IoT OTA jobThis job is then picked up by the device which will download the OTA file, check the signature, and install the update when requested.For more detail, see the OTA documentationCommentShareKodyAWSanswered a year agoKodyAWS a year agoI was going to recommend you post on the FreeRTOS forum but I see you already have created this post.I'll take a look at the forum and respond on the forum post if I need more information.Share"


Question: 530 Authentication required

SES has started to reject some of my outbound emails with the error: 530 Authentication requiredThis message was created automatically by mail delivery software.A message that you sent could not be delivered to one or more of itsrecipients. This is a permanent error. The following address(es) failed:  <user@recipient>    host email-smtp.us-east-1.amazonaws.com [18.210.31.252]    SMTP error from remote mail server after MAIL FROM:<me@myco.com>:    530 Authentication requiredOther emails still go through fine though. I have only one set of SES credentials and they have not changed. This looks like an issue at AWS.FollowComment

Answer: "0The problem is that TLS negotiation is timing out, so my server tried to send the email without authenticating itself. I forced my server to require TLS for email-smtp.us-east-1.amazonaws.com so that it won't try to send the email unauthenticated.But the TLS shouldn't be timing out, this looks like an issue at AWS.CommentShareHMOFanswered a year ago"


Question: API Gateway Websockets size limit Feedback

"Why is the APi gateway websockets size limit so low (128k)?This is pretty small, and frustrating.Also, when you try and send too much data to the client, it didn't give me any errors the response just doesn't go through (lambda and websockets both logging a success).It's a pretty cool service otherwise.  Thanks for developing it!FollowComment"

Answer: "0.CommentShareMichael Economyanswered 3 years ago0API Gateway responds back with error code 1009 when it receives a larger frame or message as mentioned here - https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html.I don't understand what you mean by "the response doesn't go through"? Do you mean the request doesn't go through to your lambda integration? What logs do you see for your API when you send a large message?CommentShareAWS-User-2168324answered 3 years ago0That may be what the documentation says, but from what we've seen in our use, that is not the case and it doesn't reply at all (as mentioned in the original post)CommentSharedave-nmanswered 3 years ago0This looks like a WS client issue. I tried with websockets (python), websocket-client (python) and wscat.Working client : websocket and asyncio (python)async def hello():    uri = "wss://<api>.execute-api.us-west-2.amazonaws.com/<stage>/"    async with websockets.connect(uri, ssl=ssl._create_unverified_context()) as websocket:        name = "<some large msg>"        await websocket.send(name)        print(f"> large")        greeting = await websocket.recv()        print(f"< {greeting}")Exception : websockets.exceptions.ConnectionClosedError: code = 1009 (message too big), reason = Message too bigClients eating away the err code :websocket-client (python)def withWebSock():    ws = websocket.WebSocket(sslopt={"cert_reqs": ssl.CERT_NONE})    ws = create_connection('wss://<api>.execute-api.us-west-2.amazonaws.com/<stage>',                           sslopt={"cert_reqs": ssl.CERT_NONE})    ws.send("<some large msg>")    print(ws.recv()) Exception : websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed. No err code as suchwscat :wscat -c wss://<api>.execute-api.us-west-2.amazonaws.com/<stage>/ -w 5 -x <some large msg>Silently exitsCommentShareAWS-User-0556825answered 3 years ago0Agreed on the size limit.  The websocket limit is 128k while the gateway HTTP limit is 10MB?  I can imagine developers walking away from websockets over this limit alone.My websocket will require my clients to implement multi-page request logic, as a very small percentage of requests will go over 128k.CommentSharewarrenstephensanswered 3 years ago0If AWS increased the WebSocket frame size for just the initial frame it would make a huge difference.That way the 1st frame could contain a large request from the client, with the response(s) going back as the request was processed.CommentSharewarrenstephensanswered 2 years ago0The frame limit size of 32KB is unreasonably low and makes writing ANYTHING except a simple text chat application nearly impossible. I don't understand how this is justifiable given that AWS lambda has a payload size of 256KB, eight TIMES the size.We are seriously considering dropping API gateway completely if this isn't resolved soon.CommentSharemustafaopanswered 2 years ago"


Question: Impossible to use the last SolutionStack for NodeJS deployment

"Hi,I am trying to use the solution stack name : "64bit Amazon Linux 2018.03 v4.8.0 running Node.js" but I get an error : "No Solution Stack named '64bit Amazon Linux 2018.03 v4.8.0 running Node.js' found. (Service: AWSElasticBeanstalk; Status Code: 400; Error Code: InvalidParameterValue;"However, I am using the last version of the stack ... it was working few weeks ago with the previous version. Can you help me ? I am in eu-west-1 region.ThanksBest regardsFollowComment"

Answer: "0Accepted AnswerHi thomasArioneo ,Thanks for reaching out."64bit Amazon Linux 2018.03 v4.8.0 running Node.js" does not exist in eu-west-1 through your account. To retrieve the set of solution stacks available at your disposal, you an execute the following AWS CLI command in your Bash shell:aws elasticbeanstalk list-available-solution-stacks --region eu-west-1 | grep "SolutionStackName.*Node.js"For instance, when I run the above command, I see the following, among other, as being available:"SolutionStackName": "64bit Amazon Linux 2018.03 v4.8.2 running Node.js",Thanks,Rahul.Edited by: Rahul-AWS on Apr 4, 2019 5:59 PMCommentShareAWS-User-2500988answered 4 years ago"


Question: Missing Application from Amplify Dashboard

"I am having an issue with AWS Amplify where the data still seems to be hosted, but when I go to the apps panel it says that there are no applications being hosted.I will say that when I was configuring my application it did look like the site changed from one visit to another and now when I create an application it has a amplifyapp.com domain where as my dns records show that cloudfront.net.The way that the website is now serving up dns credentials seems to be different now than when i first was on the site. I configured my www with a cname and data ending in cloudfront.netEdited by: aviddabbler on Aug 25, 2019 12:28 PMFollowComment"

Answer: "0Accepted AnswerHi,The Amplify Console service is regionalized. This means that if you create an app in us-east-1, it will not show up when you switch to us-west-2. Please verify the region you've created the app in.samCommentShareAWS-User-8737467answered 4 years ago"


Question: Logging with CloudWatch vs. ElasticSearch/Kibana

I have a customer who is currently using Logstash.  They are asking about Logstash integrating with CloudWatch vs. ElasticSearch/Kibana.Also a general comparison of   Cloudwatch vs ElasticSearch logging.What are some pros/cons/recommendataions of each approach.FollowComment

Answer: "0Accepted AnswerComparisonCloudwatch Logs offers highly durable centralized storage for logs. It also allows customers to track things like the number of errors appearing in the logs and create alerts. It also supports simple querying (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html)Customers do not need to worry about cluster sizing, storage, scaling etc - there are not servers to manage.Elasticsearch with Kibana provide a lot more functionality in terms of searching and visualizing your logs. While our managed Elasticsearch service removes a lot of the undifferentiated heavy lifting customers still need to put some thought and monitoring to ensure they have the right capacity in place and that they backup Elasticsearch data to a more durable location like S3.Cloudwatch Logs AND ElasticsearchCloudwatch Logs -> ElasticsearchCustomers can get best of both worlds by streaming CloudWatch Logs into Elasticsearchhttp://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_ES_Stream.htmlLogstash -> Cloudwatch LogsSince they are already pushing their data into Logstash this plugin can send the data to Cloudwatch Logs:https://github.com/awslabs/logstash-output-cloudwatchlogsCloudwatch Agent -> Cloudwatch LogsHowever the Cloudwatch Logs agent is probably the easiest way to get logs into CloudWatch logs:http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_GettingStarted.htmlhope this helpsPS if they decide not to use Cloudwatch Logs here are the options:Elasticsearch (without Cloudwatch Logs)Logstash -> ElasticsearchSince they are already using Logstash the easiest way to get started would be to use this connector to send data to Amazon Elasticsearchhttps://github.com/awslabs/logstash-output-amazon_esKinesis Firehose -> ElasticsearchOf course there is also the option to replace logstash with Kinesis Firehose which removes the operational burden of managing Logstash EC2 instances:https://aws.amazon.com/kinesis/firehose/firehose-to-elasticsearch-service/CommentShareAWS-User-7011152answered 6 years ago"


Question: Deploy Django App with Docker Compose Context to AWS ECS

"I built my docker Django app with Django-cookiecutter ( It makes a bootstrap application that is ready for production). The application works fine on my local machine with no errors. I pushed the production images to AWS ECR and used docker context ecs to deploy the application. The problem I am facing is that it starts creating all the instances and after a while starts deleting them again. I can't figure out where the problem is coming from. I am a beginner in this and I will appreciate any assistance. This is what my YAML file looks like.version: '3'volumes:  production_postgres_data: {}  production_postgres_data_backups: {}  production_traefik: {}services:  django: &django    build:      context: .      dockerfile: ./compose/production/django/Dockerfile    image: public.ecr.aws/t6g1j7b6/image_converter:django    platform: linux/x86_64    depends_on:      - postgres      - redis    env_file:      - ./.envs/.production/.django      - ./.envs/.production/.postgres    command: /start    networks:      - proxy      - default  postgres:    build:      context: .      dockerfile: ./compose/production/postgres/Dockerfile    image: public.ecr.aws/t6g1j7b6/image_converter:postgres    volumes:      - production_postgres_data:/var/lib/postgresql/data:Z      - production_postgres_data_backups:/backups:z    env_file:      - ./.envs/.production/.postgres  traefik:    build:      context: .      dockerfile: ./compose/production/traefik/Dockerfile    image: public.ecr.aws/t6g1j7b6/image_converter:traefik    depends_on:      - django    volumes:      - production_traefik:/etc/traefik/acme    ports:      - "0.0.0.0:80:80"      - "0.0.0.0:443:443"      - "0.0.0.0:5555:5555"  redis:    image: public.ecr.aws/t6g1j7b6/image_converter:redis  celeryworker:    <<: *django    image: public.ecr.aws/t6g1j7b6/image_converter:celeryworker    command: /start-celeryworker  celerybeat:    <<: *django    image: public.ecr.aws/t6g1j7b6/image_converter:celerybeat    command: /start-celerybeat  flower:    <<: *django    image: public.ecr.aws/t6g1j7b6/image_converter:flower    command: /start-flowernetworks:  proxy:FollowCommentalatech EXPERT4 months agoIs there any indication on CloudWatch in relation to ECS service, cluster and similar? Also double check the health check on ec2Share"

Answer: "0Accepted AnswerHi there,I just completed a django app deployed as well. I noticed a few things on your file:Maybe we don't need to build an image for postgre database because you can set up an RDS or EBS to connect to your django app.There should be "links" betweeb the reverse proxy (traefik) and the django.For redis, celery, celery worker, flower I don't think we need a separate image for each. They are part of the code in your django app, if we build a proper image for the django app, these are already included.I am newbie too, would love to hear your feedback. Good luck, you will make it!CommentSharecloud9answered 4 months agorePost-User-5153054 4 months agoWhat I did was remove the redis, celerybeat, celeryworker and flower images that you suggested but left the rest the way it was and it worked. A gazillion thanks.Sharecloud9 4 months agoHey, glad that it worked out for you, do you know why you have to build an image for postgre?Share"


Question: Incremental Data Capture from DynamoDB to S3

"I have a use case where I would like to replicate the data from DynamoDB to S3 (for backup and later for the analytical processing). I don't need real-time data updates or any notifications on DDB item changes.The "regular" design with DDB Streams, Lambda, Kinesis Firehouse and S3 destination is possible, but I am concerned about high cost, complexity and effort for initial setup.I have implemented the following design: https://aws.amazon.com/blogs/database/simplify-amazon-dynamodb-data-extraction-and-analysis-by-using-aws-glue-and-amazon-athena/(Download data from DDB via ETL Glue Job to S3)That works fine, but I have the following additional questions to anybody having more experience with that design:Is there any possibility to perform the incremental data load, e.g. not loading the full DDB table via Glue Job each time?Does anybody has any practical experience for that design in terms of performance? Main concern here that for the large DDB Tables (100x millions of items) the full data load will A) consume too much read capacity and B) take hours/days to completeIs there any other practical design approaches working with large DDB tables?FollowComment"

Answer: "0Accepted AnswerIt is not possible to perform an incremental 'bookmarked' load from a DynamoDB table without data modeling to design for this (i.e. a sharded-GSI that allows time based queries across the entire data set), which would then require a custom reader (Glue doesn't support GSI queries).Using streams --> lambda --> firehose is currently the most 'managed' and cost effective way to deliver incremental changes from a DynamoDB table to S3.Reading DynamoDB streams only has the computational cost of Lambda associated with it, and the Lambdas can read hundreds of items from a single invocation. Having Firehose buffer/package/store these changes as compressed/partitioned/queryable data on S3 is simple and cost effective.If you are concerned about cost it could be worth opening a specreq to have a specialist take a look at the analysis - these configurations are both common and generally cost effective (the cost is not relative to the size of the table, but rather the velocity/size of the writes - which will often be more efficient than a custom reader/loader).CommentShareAWS-User-0802260answered 3 years ago"


Question: Network Firewall and API Gateway : how to ?

"Is it useful to use a Network Firewall in an API Gateway based solution, a VPC Link to a private subnet containing a private ALB with ECS services ?If yes, how to configure the solution to inspect the flows through the firewall?FollowComment"

Answer: "0You should definitely use AWS WAF with API Gateway to protect you against well known vulnerabilities such as OWASP - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-aws-waf.htmlAs regards using a Network Firewall for IDS/IPS capabilities, some patterns are discussed here - https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/centralized-inbound-inspection.htmlYou should be able to adapt the API Gateway architecture to fit into these patterns.CommentShareEXPERTIndranil Banerjee AWSanswered 8 months ago"


Question: AWS S3 issues - Deleted bucket is still in list + Cannot write into bucket

"I deleted a bucket but it remains in the bucket list although in the region column a red text says that isn't found. It seems the cache or the own console isn't updating the list. Is just like as this old post: https://repost.aws/questions/QUM-ci6DYJSOKjE4G91XXCxA/cannot-delete-bucket-and-recreate-itNow, I have created a new bucket and I have exactly the same configuration from a production bucket. I'm trying to create a folder or upload a file via PHP SDK with Stream Wrapper inside the new one but I'm not being able to do it. I'm getting a 403 status code, although the policy allows to put/delete objects.FollowComment"

Answer: "1Bucket configurations have an eventual consistency model. i.e., If you delete a bucket and immediately list all buckets, the deleted bucket might still appear in the list. [+] https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html#ConsistencyModelFor the second query there can be many reasons of access denied can occur so we would require more information like IAM role/user policy who is accessing the S3 bucket, the S3 bucket policy and check if any KMS encryption is involved. You would also need to check the VPC endpoint policy if you are requesting from a VPC and using VPC endpoint.[+] https://repost.aws/knowledge-center/s3-troubleshoot-403CommentShareSUPPORT ENGINEERUjjawal_Sanswered 5 months ago0OK, for the last one part I figured out how to make it.For the first one, the deleted bucket has been dropped from the list.CommentShareneoacevedoanswered 5 months ago"


Question: Cannot import awsgluedq.transforms.EvaluateDataQuality in glue notebook

"I've created a data validation box in my Glue ETL, which imports the following:from awsgluedq.transforms import EvaluateDataQualityTo develop further my script, I've copied the script to a AWS Glue Notebook. But the line doesn't work, it throws the error:ModuleNotFoundError: No module named 'awsgluedq'I've tried to add it through the magic %extra_py_files ['awsgluedq'] and %additional_python_modules ['awsgluedq'] but it doesn't work either.How can I import that module?FollowComment"

Answer: 0HelloThank you for bringing this up. Could you please raise a support ticket with AWS GLUE Premium Support so that we can help you on this issue.CommentShareHarsha_Tanswered 4 months ago


Question: enable WinRM on Windows Server 2012 R2 for automated installation with packer

"Hello,I use packer to build windows private AMIs.My code works perfectly for Windows Server 2019 and 2022.Today, I must build a Windows Server 2012 AMI.When I start packer, everything is going fine until WinRM is supposed to be activated. But it never becomes available.Here is the output of my script:30/03/2023 15:03:01We are building a Windows templatelets build AWS12packer build -on-error=cleanup -force -color=false -var-file ./production.pkrvars.hcl -only=amazon-ebs.windows             -var AWS_Region=eu-west-1             -var AWS_Subnet=subnet-09dea1005b9e039ce             -var AWS_VPC=vpc-07a597dbe1bc6d0a0             -var aws_os_filter=Windows_Server-2012-R2-English-STIG-Full-202*             -var InstanceType=t3.medium             -var VMNAME=Windows-W2K12-230330             -var-file=W2K12.pkrvars.hcl             ./Windows==> amazon-ebs.windows: Force Deregister flag found, skipping prevalidating AMI Name    amazon-ebs.windows: Found Image ID: ami-05ea5147aa6a82322==> amazon-ebs.windows: Creating temporary keypair: packer_6425a4a6-c2b5-fb0b-1e41-2a23d9f6d4fd    amazon-ebs.windows: Found Security Group(s): sg-0416234d02eef67b3, sg-075f33d2f0f72757c==> amazon-ebs.windows: Launching a source AWS instance...    amazon-ebs.windows: Instance ID: i-0a954ed5f7ff8d54c==> amazon-ebs.windows: Waiting for instance (i-0a954ed5f7ff8d54c) to become ready...==> amazon-ebs.windows: Waiting for auto-generated password for instance...    amazon-ebs.windows: It is normal for this process to take up to 15 minutes,    amazon-ebs.windows: but it usually takes around 5. Please wait.    amazon-ebs.windows:    amazon-ebs.windows: Password retrieved!==> amazon-ebs.windows: Using WinRM communicator to connect: 10.6.25.165==> amazon-ebs.windows: Waiting for WinRM to become available...real    8m21.604suser    0m0.450ssys     0m0.319sI use the very same powershell script to enable WinRM. For other Windows Operating Systems, it works.<powershell># MAKE SURE IN YOUR PACKER CONFIG TO SET:###    "winrm_username": "Administrator",#    "winrm_insecure": true,#    "winrm_use_ssl": true,##write-output "Running User Data Script"write-host "(host) Running User Data Script"Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force -ErrorAction Ignore# Don't set this before Set-ExecutionPolicy as it throws an error$ErrorActionPreference = "stop"# $ThePwd=ConvertTo-SecureString -String 'Azerty0IsGood!' -AsPlainText -Force# New-LocalUser "PackerUser" -AccountNeverExpires -PasswordNeverExpires -FullName "User for packer" -Description "User for packer" -Password $ThePwd# Add-LocalGroupMember -Group 'Administrators' -Member "PackerUser"# Remove HTTP listenerRemove-Item -Path WSMan:\Localhost\listener\listener* -Recurse# Create a self-signed certificate to let ssl work$Cert = New-SelfSignedCertificate -CertstoreLocation Cert:\LocalMachine\My -DnsName "packer"New-Item -Path WSMan:\LocalHost\Listener -Transport HTTPS -Address * -CertificateThumbPrint $Cert.Thumbprint -Force# WinRMwrite-output "Setting up WinRM"write-host "(host) setting up WinRM"cmd.exe /c winrm quickconfig -qcmd.exe /c winrm set "winrm/config" '@{MaxTimeoutms="1800000"}'cmd.exe /c winrm set "winrm/config/winrs" '@{MaxMemoryPerShellMB="1024"}'cmd.exe /c winrm set "winrm/config/service" '@{AllowUnencrypted="true"}'cmd.exe /c winrm set "winrm/config/client" '@{AllowUnencrypted="true"}'cmd.exe /c winrm set "winrm/config/service/auth" '@{Basic="true"}'cmd.exe /c winrm set "winrm/config/client/auth" '@{Basic="true"}'cmd.exe /c winrm set "winrm/config/service/auth" '@{CredSSP="true"}'cmd.exe /c winrm set "winrm/config/listener?Address=*+Transport=HTTPS" "@{Port=`"5986`";Hostname=`"packer`";CertificateThumbprint=`"$($Cert.Thumbprint)`"}"cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yescmd.exe /c netsh firewall add portopening TCP 5986 "Port 5986"cmd.exe /c net stop winrmcmd.exe /c sc config winrm start= autocmd.exe /c net start winrm</powershell>I quickly created an T3.medium EC2 running Windows Server 2012 R2, and executed the script above, without any error.My security groups open ports TCP/3389 and TCP/5986How can I enable WinRM on Windows Server 2012 R2 ?FollowComment"

Answer: "0To diagnose that issue run packer with the debug flag.packer build -debug template.jsonGrab the Administrator login from the Packer output, you will need it. Then add an inbound RDP rule on the Packer build instance’s security group so you can RDP to it. Look for the log at C:\Program Files\Amazon\Ec2ConfigService\Logs\Ec2ConfigLog.txt. You may need to add logging in the script to figure out what is going wrong.Please note that AWS does not have access to look inside your resources.If you still need help, you can reach out to support teams via your Support Center: http://go.aws/support-center.CommentShareSUPPORT ENGINEERrePost-User-5811261answered 2 months ago"


Question: `docker build` timeout on AWS Elastic Beanstalk

"Service: Elastic BeanstalkPlatfrom: Docker running on 64bit Amazon Linux 2Platfrom Version: 3.4.17My Docker builds take around 30 minutes, and I have no way to increase the timeout of Elastic Beanstalk deployments.I've tried to add a config to .ebextensions, but it doesn't work.// timeout.configoption_settings:    - namespace: aws:elasticbeanstalk:command      option_name: Timeout      value: 3600and I also try to deploy from CLI, it also does not work.eb create app-env --timeout 60I always get the same error message from /var/log/eb-engine.log [ERROR] An error occurred during execution of command [app-deploy] - [Docker Specific Build Application]. Stop running the command. Error: failed to build docker image: Command /bin/sh -c docker build -t aws_beanstalk/staging-app /var/app/staging/ failed with error Command timed out after 300 seconds Is it possible to increase this timeout?FollowComment"