Question: GameLift Server kicks player because of no response to ping

"Hello, I followed the MegaFrogRace in the aws-tutorial repo, but I have ran into an issure. For some reason, the Server kicks the player I have connected with. Here are the logs, the message I found to be odd are fat:06 Sep 2020 16:41:37,960 [INFO] (MultiChessServer.js) 218: Starting process...06 Sep 2020 16:41:37,960 [INFO] (MultiChessServer.js) 219: Ready to host games...06 Sep 2020 16:41:37,960 [INFO] (metric-publisher.js) 28: Publishing metrics: {"metrics":[{"name":"RTSProcessStartedTime","unit":"Milliseconds","value":0,"timestamp":"2020-09-06T16:41:37.960Z","dimensions":[]}]}06 Sep 2020 16:41:37,963 [INFO] (metric-publisher.js) 28: Publishing metrics: {"metrics":[{"name":"RTSProcessStarted","unit":"Count","value":1,"timestamp":"2020-09-06T16:41:37.963Z","dimensions":[]}]}06 Sep 2020 16:41:37,963 [INFO] (index.js) 241: onProcessStarted success. Process ready for games.06 Sep 2020 16:41:37,963 [INFO] (index.js) 261: Game session initialized with port: 190006 Sep 2020 16:41:37,964 [INFO] (gamelift.js) 223: Realtime server started! Calling GameLiftServerAPI.ProcessReady with processParameters: {"Port":1900,"LogParameters":{"LogPaths":["/local/game/logs/5169"]}}06 Sep 2020 16:41:37,998 [INFO] (gamelift.js) 71: (Heartbeat) GameLiftServerAPI initiating OnHealthCheck06 Sep 2020 16:41:37,998 [INFO] (gamelift.js) 229: Process advertised to AuxProxy! GameLiftServerAPI.ProcessReady succeeded06 Sep 2020 16:41:37,998 [INFO] (gamelift.js) 231: GameLift Realtime server process started successfully.06 Sep 2020 16:42:38,1 [INFO] (gamelift.js) 71: (Heartbeat) GameLiftServerAPI initiating OnHealthCheck06 Sep 2020 16:42:40,32 [INFO] (gamelift.js) 36: GameLiftServerAPI initiating StartGameSession: {"Port":1900,"GameProperties":[],"MaximumPlayerSessionCount":2,"********06 Sep 2020 16:42:40,33 [INFO] (MultiChessServer.js) 226: [app] onStartGameSession06 Sep 2020 16:42:40,34 [INFO] (gamelift.js) 39: GameLiftServerAPI completed StartGameSession06 Sep 2020 16:42:40,553 [INFO] (index.js) 469: Player 1 connected from *******06 Sep 2020 16:42:40,553 [INFO] (ws.js) 139: Player 1 connecting from *********06 Sep 2020 16:42:40,695 [INFO] (index.js) 202: Message received from player 106 Sep 2020 16:42:40,697 [INFO] (index.js) 210: Packet (including both internal messages and custom game messages) received from player: 106 Sep 2020 16:42:40,697 [INFO] (index.js) 378: Handling login request from player: 106 Sep 2020 16:42:40,697 [INFO] (index.js) 381: Player 1 logging in06 Sep 2020 16:42:40,698 [INFO] (index.js) 388: Player: 1 is connecting to player session: psess-fac6f9ec-8e6f-4b3c-81a0-f599bc99764906 Sep 2020 16:42:40,698 [INFO] (gamelift.js) 83: Calling GameLiftServerAPI.AcceptPlayerSession with player session id: psess-fac6f9ec-8e6f-4b3c-81a0-f599bc99764906 Sep 2020 16:42:40,716 [INFO] (gamelift.js) 88: GameLiftServerAPI.AcceptPlayerSession succeeded with player session id: psess-fac6f9ec-8e6f-4b3c-81a0-f599bc99764906 Sep 2020 16:42:40,716 [INFO] (index.js) 395: Successfully connected player: 1 to player session:  psess-fac6f9ec-8e6f-4b3c-81a0-f599bc99764906 Sep 2020 16:42:40,716 [INFO] (MultiChessServer.js) 178: [app] onPlayerConnect: undefined06 Sep 2020 16:42:40,716 [INFO] (MultiChessServer.js) 195: [app] onPlayerAccepted: player.peerId = 106 Sep 2020 16:42:40,717 [INFO] (MultiChessServer.js) 201: [app] onPlayerAccepted: new contents of players array = [object Object]06 Sep 2020 16:42:40,717 [INFO] (MultiChessServer.js) 55: [app] SendStringToClient: peerIds = 1 opCode = 100 stringToSend = 106 Sep 2020 16:42:40,717 [INFO] (MultiChessServer.js) 58: [app] SendStringToClient: sendMessageT [object Object] undefined06 Sep 2020 16:42:40,717 [INFO] (index.js) 346: Received custom game message from sender: -1 with opCode: 100, targetPeerId: 0, targetGroupId: 006 Sep 2020 16:42:40,717 [ERROR] (index.js) 371: Message was missing a target player and target group. Message: {"opCode":100,"sender":-1,"payload":{"type":"Buffer","data":[49]},"reliable":false}06 Sep 2020 16:42:40,718 [INFO] (index.js) 430: Sending login result to player: 106 Sep 2020 16:42:43,755 [INFO] (index.js) 202: Message received from player 106 Sep 2020 16:42:43,755 [INFO] (index.js) 210: Packet (including both internal messages and custom game messages) received from player: 106 Sep 2020 16:42:43,755 [INFO] (index.js) 346: Received custom game message from sender: 1 with opCode: 200, targetPeerId: -1, targetGroupId: 006 Sep 2020 16:42:43,756 [INFO] (MultiChessServer.js) 153: [app] onMessage(gameMessage):06 Sep 2020 16:42:43,756 [INFO] (MultiChessServer.js) 154: { opCode: 200, sender: 1, payload: Uint8Array [], reliable: true }06 Sep 2020 16:42:44,11 [WARN] (index.js) 144: Player 1 did not respond to the last ping. Terminating the player client.06 Sep 2020 16:42:44,11 [INFO] (ws.js) 195: TCP client connection for player: 1 is terminated by the server06 Sep 2020 16:42:44,12 [INFO] (index.js) 474: Player 1 disconnected from **********06 Sep 2020 16:42:44,12 [INFO] (gamelift.js) 93: Calling GameLiftServerAPI.RemovePlayerSession with player session id: psess-fac6f9ec-8e6f-4b3c-81a0-f599bc99764906 Sep 2020 16:42:44,34 [INFO] (gamelift.js) 98: GameLiftServerAPI.RemovePlayerSession succeeded with player session id: psess-fac6f9ec-8e6f-4b3c-81a0-f599bc99764906 Sep 2020 16:42:44,34 [INFO] (MultiChessServer.js) 209: [app] onPlayerDisconnect: 106 Sep 2020 16:42:44,34 [INFO] (MultiChessServer.js) 103: [app] StopGame - killing game session06 Sep 2020 16:42:44,34 [INFO] (gamelift.js) 103: Calling GameLiftServerAPI.ProcessEndingIs the answer to a ping something I have to implement on the client side?FollowComment"

Answer: "0Accepted Answer8921 works on PC and Mac if you want to just hardcode it. Only problem you'll have with using just that port is you won't be able to have multiple instances open on one Mac.UPDATE:Actually, here you go this code will work for both Mac and Windows.using System.Net;using System.Net.Sockets;private static readonly IPEndPoint DefaultLoopbackEndpoint = new IPEndPoint(IPAddress.Loopback, port: 0);    public static int GetAvailablePort()    {        using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))        {            socket.Bind(DefaultLoopbackEndpoint);            return ((IPEndPoint)socket.LocalEndPoint).Port;        }    }I've also added a Pull Request to fix this in the demo scene, if you could inform whoever is in charge of that repo @REDACTEDUSERCommentSharerePost-User-6168330answered 3 years ago0We have also ran into this issue and have mostly resolved it by building adding the DTLS libraries for the Unity SDK. One of our developers is still experiencing this when using his home WiFi, and in some cases it can still intermittently happen while playing our game. Is there a way to prevent the Real-time client/server to even create a UDP connection at all? We plan on using Reliable messages exclusively anyway, but if I understand correctly it seems like a failure in creating a DTLS connection is causing the client connection to be terminated by the server.CommentSharerePost-User-7390418answered a year agorePost-User-4427887 4 months agoHey, have you found a more concrete solution for this? Thank you, I am having similar issues and another post suggest it has to do with the certShare0Hmm that seems odd.Can you confirm where you got the megafrog race sample code from? From https://github.com/aws-samples/megafrograce-gamelift-realtime-servers-sample ?Ping/Pong response code should happen automatically in the websockets layer. Theres nothing you need to do here its something the server/receiver handle automatically.I would confirm that the player didn't drop their connection or get somehow cpu/thread bound preventing a response to the ping.The current server code is very strict so a single failure here results in player disconnection; you could obviously make this more robust by adding a count of ping failures prior to termination.In script you can change the pingIntervalTime configuration which may help.CommentSharerePost-User-5332620answered 3 years ago0Thanks for the reply, but I think I found my issue. I am working on a Mac, which doesn't support the GetActiveUdpListner function. I had read about it here: https://forums.awsgametech.com/t/going-through-tutorial-and-getting-notimplementedexception-the-method-or-operation-is-not-implemented-on-getactiveudplisteners/6561I implemented my own version to find a free UDP Port, but it seems that did't work as I had hoped. Since I got an initial connection to the server, I thought the problem were somewhere else, but when testing it on a windows computer with the original code to find a UDP port, I had no issues and everything worked.CommentSharerePost-User-5928519answered 3 years ago0Thanks ever so much for the fix. I'll forward it on to the GameLift team.CommentSharerePost-User-5332620answered 3 years ago"


Question: AWS pipeline and plastic SCM

Is there any way to have the AWS pipeline integrate with cloud hosted plastic SCM? We're currently looking into replacing our on-prem Jenkins with AWS but are not currently interested in replacing our plastic SCM. Thanks!FollowComment


Question: How to stop a windows service using greengrass custom component

"I have below simple python script that stops a service running by administrator. When I run this script manually on windows core device as administrator it works perfectly.**import win32serviceutilservice_name = "eMAROffline"  # replace with the name of the service you want to stoptry:win32serviceutil.StopService(service_name)print(f"Service {service_name} stopped successfully.")except Exception as e:print(f"Error stopping service {service_name}: {e}")**My requirement to stop service using AWS IoT Greengrass component deployment. When I deploy this script as Greengrass component am getting the below error.com.mx.stopService: stdout. Error stopping service eMAROffline: (5, 'OpenSCManager', 'Access is denied.')I googled this error and it seems the issue is related to permissions. Greengrass component user ggc_user wouldn't have privileges' to stop services running under administrator.Any suggestions/thoughts how can make this work?I added ggc_user in Administrators group but no luck.Full log:2023-04-18T15:02:50.077Z [INFO] (pool-2-thread-58) com.mx.stopService: shell-runner-start. {scriptName=services.com.mx.stopService.lifecycle.Run, serviceName=com.mx.stopService, currentState=STARTING, command=["python C:\greengrass\v2\packages\artifacts-unarchived\com.mx.stopService\1.0.0..."]}2023-04-18T15:02:51.120Z [INFO] (Copier) com.mx.stopService: stdout. Error stopping service eMAROffline: (5, 'OpenSCManager', 'Access is denied.'). {scriptName=services.com.mx.stopService.lifecycle.Run, serviceName=com.mx.stopService, currentState=RUNNING}2023-04-18T15:02:51.152Z [INFO] (Copier) com.mx.stopService: Run script exited. {exitCode=0, serviceName=com.mx.stopService, currentState=RUNNING}FollowComment"

Answer: "0You can select which user run the Greengrass component by setting the runWith.windowsUser property in the component configuration to a user that has permissions to perform the required operation.https://docs.aws.amazon.com/greengrass/v2/developerguide/create-deployments.htmlCommentShareEXPERTMassimilianoAWSanswered a month agoMichaelDombrowski-AWS EXPERTa month agoYou may also set "RequiresPrivilege": "true" to run as SYSTEM which will certainly have permissions.https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html#recipe-format:~:text=Lifecycle.Setenv.-,Run,-(Optional)%20An%20objectShare"


Question: Store Photo and Video on Glacier

"I have a QNAP NAS with an app that allows you to back up specific folders to various cloud services, including Glacier.I tried to get an idea of the initial cost and the maintenance cost but I'm not sure I understood all the costs. I'll give you a concrete example so you can help me get a precise idea of the monthly cost of the operation.I currently have 3TB of photos and videos. So there will be a fairly large first initial load that will take a long time, then every month there will be a small delta of the order of 10-20GB and cmq it is not said that there is every month). The cost of Glacier deep is currently $0.0018 / GB so the cost of storage for between 3 and 4 TB of data is approximately $5-7 per month.It's not clear to me:what is the cost of uploading this data (data transfer)how much it would cost me tomorrow to recover all the data (let's assume 4TB)will I still see through fastGlacier (or similar apps) the whole folder structure and possibly I could also perform partial recoveries?FollowComment"

Answer: "0Accepted AnswerHi, I've been doing similar backups for nearly 10 years. There's no cost for uploading data into Glacier other than a minimal $0.03 per 1000 PUT requests, the costs come when you transfer data out - a common pattern in AWS.I use FastGlacier too.  You can see the folder structure and do partial queries.  Cost of downloading all your data depends on the retrieval method you choose - Bulk is cheapest which has no costs in the Glacier service (unless you're selecting a subset of a file via Glacier Select) so it's just the data transfer costs at about $0.09 per GB to the Internet, or $360 for 4TB.  That's quite a lot so probably plan on never doing it!  Keep a local backup which covers nearly all cases, and the Glacier backup is there as a last resort (if all your local hardware gets stolen, floods or burns).CommentShareEXPERTskinsmananswered a month agorePost-User-1438886 a month agoHi, tnx for your time.that's the same idea I had. Hopefully, you'll never need to take them out, but if you do it's always cheaper than sending a 4TB drive to a data recovery center...I use a RAID1 for this volume, but I would be sure about other kinds of problems.ShareNaveen_V a month agoHi, Are you using Fast Glacier pro version or free version?Shareskinsman EXPERTa month ago@Naveen_V just the free version.  I've scheduled a weekly run of a script with commands for each folder I want to recursively back up, e.g.:"C:\Program Files\FastGlacier\glacier-con.exe" sync MyUserName:MyPassword  FolderToBackUp Region MyVault/Prefix ncs >> C:\Temp\GlacierBackup.log 2>&1ShareNaveen_V a month ago@skinsman thanks for your response : )Share0Amazon S3 Glacier provides low-cost, long-term storageStarting at $0.0036 per GB per month, Amazon S3 Glacier Flexible Retrieval allows you to archive large amounts of data at a very low cost. You pay only for what you need, with no minimum commitments or upfront fees. Other factors determining pricing include requests and data transfers out of Amazon S3 Glacier (incoming transfers are free).https://docs.aws.amazon.com/whitepapers/latest/how-aws-pricing-works/amazon-s3-glacier.htmlCommentShareHemant Chughanswered a month ago"


Question: Cloudendure access to hypervisor?

Can you confirm if CloudEndure will facilitate both a DR failover and failback without requiring any access to an underlying hypervisor?FollowComment

Answer: 0Accepted AnswerCloudEndure does not require access to the underlying hypervisor for failover or failback. There are several options for failback described here.CommentShareAlex_Banswered 4 years ago


Question: MBT to GPT format change

"Hi,We have a 2TB volume m5.2xlarge instance, the root volume limit is 2TB and cannot increase the size because of size limit of it being MBR partion.Model: Amazon Elastic Block Store (nvme)Disk /dev/nvme0n1: 2147GBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:The only way out seems https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ubuntu-convert-mbr-to-gpt/Is that the only way out here, is there a better way of increasing the limit without data loss?FollowComment"

Answer: "0Hello,There are many ways to prevent data loss that include the use of third-party software however a suggested method is using a gdisk tool.Before altering any compute format changes, we highly recommend to deploy your snapshot, create an image from the snapshot and deploy into to a different Availability Zone to further increase availability and security of data.According to volume requirements for Windows and Linux [1], the MBR default partition limits its max size to 2TB and does not allow any increases past this. We recommend creating a GPT formatted disk and copying over the data from the MBR. In the requirements there are steps outlined to create and copy data over from MBR to GPT. A suggested gdisk tool can be found here: Sourceforge GPT fdisk download [2].Best,1: volume-requirements2: Sourceforge GPT fdiskCommentShareFnu_Aanswered 10 months ago"


Question: Cannot access serial port inside a component

"At first I was getting permission denied error trying to open a serial port (/dev/ttyS0) with a python script. Then I realized that the permission denied message was caused by gg_user not added to dialout group. However, I still cannot open serial port to write to after I added gg_user was added.Serial.isOpen() returns false even though I can create the object Serial. Is it not allowed for a component to access local resource directly? I found some documentation with access local resources with lambada functions in v1, but I am using v2. My script runs fine outside of Greengrass.  Thank you in advance.Edited by: jcai on Mar 8, 2021 12:47 PMFollowComment"

Answer: "0By default Greengrass will run your component using ggc_user as the user and ggc_group as the group. Adding ggc_user to the tty group won't be sufficient because it isn't running using the dialout group, but as ggc_group. You can replicate Greengrass's behavior using sudo like "sudo -u ggc_user -g ggc_group -E <your command>". To address this you can setup your component to run using the dialout group, or to use all of the user's groups. To do this, create a new deployment and edit the runWith configuration for the component so that posixUser key is "ggc_user". This will run your component as ggc_user with all of that users's groups. To run with a specific group, use "ggc_user:<group name>".Cheers,MichaelCommentShareEXPERTMichaelDombrowski-AWSanswered 2 years ago0Thank you very much for your answer. That make sense. So what is the recommended practice with accessing local resources? For example, if I need access to system directories, such as /opt, do I give gcc_user  root access? or run the component as "root"? Thanks!CommentSharejcaianswered 2 years ago0The best solution would be to change the directory's permissions so that the user has the minimum access that it can while still allowing it to do what is necessary. Sometime running as root is necessary which you should use the RequiresPrivilege keyword in the recipe to do (see: https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html#recipe-format). However, try to avoid running as root when you can for the best security posture.Cheers,MichaelCommentShareEXPERTMichaelDombrowski-AWSanswered 2 years ago0Thank you very much!CommentSharejcaianswered 2 years ago"


Question: Autoscaling group points to old version of launch template

"Hello,I'm creating a launch template and autoscaling group through cloud formation. The auto-scaling group is currently pointed to the DefaultVersion of the launch template, which is version 1. The latest version of the launch template is version 2. I updated the default version of the launch template to version 3, but I don't see it reflected in the auto-scaling group.  I know we update the launch template version through instance refresh, but I would like to know if this is expected behavior to still see version 1 in the autoscaling group even though the default version is now version 2.  I want to handle the updates through cloud formation.The problem I'm trying to solve is how do I push changes through cloud formation and handle the updates gracefully in the auto-scaling group. For example - I have two autoscaling groups using the same launch template. Then I decide to update one auto-scaling group to have a different ami.  There will be two versions of the launch template, version 1 will have the old ami, and version 2 will have the latest ami.  I'd like to gracefully roll out the changes to the autoscaling group 2 through cloud formation.Question 1 - How can I change the auto-scaling group through cloud formation and replace instances gracefully?Question 2 - If I change the version number in the cloud formation template, does it terminate instances first and then redeploy the new ec2 or the other way around?FollowCommentShahad_C 6 months agoIf you want different AMIs (or any other setting) between the 2 ASGs (AutoScaling Groups), its simplest to make a different Launch Template per ASG, and increment each ones versions when that specific ASG needs an updateShare"

Answer: "0Hi, @learner00What are you specifying for AWS::AutoScaling::AutoScalingGroup.LaunchTemplateSpecification.Version ?The Version specified in CloudFormation is a static value.So when you update your launch template, you should also update the Version of the LaunchTemplateSpecification at the same time.CommentShareEXPERTiwasaanswered 6 months agolearner00 6 months agoLaunchTemplate:LaunchTemplateSpecification:LaunchTemplateId:Ref: LaunchTemplateVersion: !GetAtt LaunchTemplate.DefaultVersionNumberShareiwasa EXPERT6 months agoyes. It gets the static version when you deploy CloudFormation, so you can't specify the version if you update the launch template outside of CloudFormation.To achieve this you need to specify Latest and Default outside of CloudFormation.Share0Question 1 - How can I change the auto-scaling group through cloud formation and replace instances gracefully?Question 2 - If I change the version number in the cloud formation template, does it terminate instances first and then redeploy the new EC2 or the other way around?The answers to both of your questions depends on the UpdatePolicy being used for your AutoScaling Group. For example if you are using AutoScalingReplacing update policy, and set WillReplace: true, it will then replace the instances with older version launch templates by launching new instances with new Launch template versions. If this is set to False, then it will not replace the existing instances with older Launch template versions but when launching new instances from that point, it will make use of newer Launch template version.In case you use AutoScalingRollingUpdate policy as UpdatePolicy, as the name suggests, Instances will be replaced in a rolling fashion according to the configured rolling policy configuration.References:AutoScalingReplacing update policy: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-replacingupdateAutoScalingRollingUpdate policy:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-rollingupdateCommentShareSUPPORT ENGINEERSurya Sakalaanswered 5 months ago"


Question: Unable to update Neptune cluster to engine version 1.1.0.0

"I am trying to update my Neptune cluster from engine version 1.0.5.1.R2 to the latest 1.1.0.0 version, but am unable to do that either via the console (only 1.0.5.1.R2 is in drop down), or using the AWS CLI as suggested in the release notes.The CLI command I am using is like follows:aws neptune modify-db-cluster \    --db-cluster-identifier my-neptune-cluster \    --engine neptune \    --engine-version 1.1.0.0 \    --allow-major-version-upgrade \    --apply-immediately \    --db-cluster-parameter-group-name my-neptune-pg \    --db-instance-parameter-group-name my-neptune-pgThis fails with the error:An error occurred (InvalidParameterCombination) when calling the ModifyDBCluster operation: Cannot upgrade neptune from 1.0.5.1 to 1.1.0.0Here are the parameters that are set on both the cluster and database:$ aws neptune describe-db-cluster-parameters --db-cluster-parameter-group-name my-neptune-pg | jq -r '.Parameters[] | [.ParameterName, .ParameterValue] | @csv'"neptune_autoscaling_config","""neptune_enable_audit_log","0""neptune_enforce_ssl","0""neptune_lab_mode","neptune_lookup_cache","1""neptune_ml_endpoint","neptune_ml_iam_role","neptune_query_timeout","120000""neptune_streams","0"$ aws neptune describe-db-parameters --db-parameter-group-name my-neptune-pg | jq -r '.Parameters[] | [.ParameterName, .ParameterValue] | @csv'"neptune_query_timeout","120000""neptune_result_cache","0"FollowComment"

Answer: 0Please see the release notes for news about why updates are currently not working. https://docs.aws.amazon.com/neptune/latest/userguide/engine-releases-1.1.0.0.htmlCommentShareAWS-KRLanswered a year ago


Question: Does AWS Fargate always use a VPC?

"Does Fargate always use a VPC? And if you don't specify a VPC, it uses the default VPC in the customer account? And if you don't have a default VPC, it creates it for you?The ClusterProps definition in the CDK guide for Python say:vpc (Optional[IVpc]) – The VPC where your ECS instances will be running or your ENIs will be deployed. Default: - creates a new VPC with two AZsSo it seems like, in this regard ECS Fargate is not like AWS Lambda, where you can either run functions without a VPC (the default for AWS Lambda, a VPC 100% transparent to the user), or select a VPC. If Fargate always uses a VPC, I suppose the reason is because container-technologies are tightly bound to IP-based private and public network, unlike AWS Lambda, which uses ARNs.FollowComment"

Answer: "2Accepted AnswerYes, Fargate requires a VPC which is (as you point out) different to how Lambda operates.CommentShareEXPERTBrettski-AWSanswered a year agograhamschuckman a year agoIs this because with Fargate, a task has an IP address associated with it, whereas Lambda does not? Therefore since an IP address is being allocated, a VPC is required?Shareyann_stoneman a year ago@grahamschuckman makes sense! I guess everything that has private IPs has a VPC, putting the P in VPC.Share"


Question: Express on EC2 Only Allows Base URL

"I have a React app with a Node/Express backend running on an EC2 instance that only works if I access the base URL. If I add anything to the URL for specific routes/pages, the app doesn't load. For instance if my site is www.example.com:Trying 'https://www.example.com'  => successTrying 'https://www.example.com/users'  => nothing loadsOnce I load my app with the base URL, I can then navigate through my app freely with the URL updating properly but if I refresh the app anywhere the URL is not the base, it fails to load.I can run my app locally and see the desired behavior of loading the app at any page with the corresponding URL. Looking at my logs for the backend, it appears that with any valid URL, the backend processes the request properly but on the browser, nothing is displayed except the following error in the console:Pointer.js:29 Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".    at new Function (<anonymous>)    at new e (Pointer.js:29)    at Object.<anonymous> (fontkit.browser.es.js:481)    at Object.<anonymous> (2.cea3e404.chunk.js:2)    at a (bootstrap:79)    at Object.<anonymous> (pdfkit.browser.es.js:1)    at Object.<anonymous> (2.cea3e404.chunk.js:2)    at a (bootstrap:79)    at Object.<anonymous> (2.cea3e404.chunk.js:2)    at Object.<anonymous> (2.cea3e404.chunk.js:2)Here is a snippet of my backend code that should handle all requests for the frontend app:import express, { Request, Response } from 'express';import path from 'path';const router = express.Router();export const INDEX_PATH = '/public/index.html';router.route('/*').get((req: Request, res: Response): void => {  res.sendFile(path.join(__dirname, INDEX_PATH));});export default router;As for my AWS setup, I am running this app in an EC2 instance that is behind a load balancer. I have my domain registered with Route 53 and everything is setup to route all HTTP/HTTPS traffic to that EC2 instance via the load balancer. Please let me know if there is any further information I can provide to help figure this out! Thank you!FollowComment"

Answer: "0You can try one thing to reach out to the target, what happened if you make one of the EC2 instance public and then use EC2 instance link instead of DNS just to bypass load balancer.  it will help to find if its filtering any traffic.Worth to see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver.htmlCommentShareMaulik_Makadiyaanswered a year ago"


Question: [Sagemaker] - Does Sagemaker support Xpress model

"Hi,We have a use case to use Sagemaker towards running Xpress based science models. Can anyone please tell what are the pros and cons of using sagemaker towards running the Xpress modelsThanksFollowComment"

Answer: "0Hello,Thank you for using AWS SageMaker.Using Xpress models on SageMaker will have similar pros and cons of using Bring your container(BYOC) on SageMaker.While using BYOC users have all the options to control the package version and their desire packages at their end and will have full control over it with the help of docker image. But it requires intermediate knowledge of Docker and is not recommended unless you are comfortable writing your own machine learning algorithm. Along with that you will need to maintain your docker image and any sort of update that is required for the dependent packages to run your inference code.For more details, I'd recommend you to visit our AWS public documentation in BYOC. If incase any further assistance is required, I'd recommend to open a case with SageMaker Support engineering team for further guidance. To open a support case with AWS using the link: https://console.aws.amazon.com/support/home?#/case/createCommentShareSUPPORT ENGINEERKartik_Ranswered a year ago"


Question: Cloudformation - Specifying S3 ACL Principal

"Hi,I am trying to specify a principal inside of an S3 ACL policy by using Fn:GetAtt but keep on getting "invalid bucket policy syntax". Below is the excerpt, what am I doing wrong? "ingestions3bucketbucketpolicy": {      "Type": "AWS::S3::BucketPolicy",      "Properties": {        "Bucket": {          "Ref": "ingestions3bucket"        },        "PolicyDocument": {          "Statement": [            {              "Action": [                "s3:PutObject"              ],              "Effect": "Allow",              "Resource": {                "Fn::Join": [                  "",                  [                    "arn:aws:s3:::",                    {                      "Ref": "ingestions3bucket"                    },                    "/*"                  ]                ]              },              "Principal": {                "Fn::Join": [                  "",                  [                    "\"AWS\": ",                    {                      "Fn::GetAtt": [                        "IngestionServiceRole",                        "Arn"                      ]                    }                  ]                ]              }            }          ]        }      },      "DependsOn": "IngestionServiceRole"    }FollowComment"

Answer: "0Accepted AnswerPrinciple is a object, with a single property - in this case "AWS". Your code above is specifying a string beginning with "AWS:"."Principal":  {    "AWS" : { "Fn::GetAtt": [ "IngestionServiceRole",  "Arn" ] }}For more info, see http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#PrincipalCommentShareEXPERTLeeAtk@AWSanswered 6 years ago"


Question: Does S3 same region replication trigger S3 event notifications in the destination bucket?

As per title - does SRR trigger S3 event notifications on the destination bucket if they have been configured?FollowComment

Answer: "0Accepted AnswerYes, if you create a trigger on the target bucket that is triggered on "All object create events" it will be triggered by the objects being replicated into the bucket.CommentShareEXPERTAdam_Wanswered 4 years ago"


Question: Monetize API Gateway without using Marketplace

Would like to know if anyone of you has implemented monetization of your APIs hosted using API gateway without using the AWS SaaS Marketplace option? If yes which payment gateways did you use and what was the approach?FollowComment

Answer: "4Accepted AnswerThe main idea of monetizing the API is creating the infrastructure that supports it.There are two ways to approach this problem :The quick and native way (Using Data Exange, Product link, Data Provider Docs Link)And the Building blocks wayThe Building blocks wayIf there is a possibility on implementing the building blocks architecture there is a lot of flexibility on how this is built. First lets say a customer wants to integrate their on-premises with the Api-Monetization leveraging  AWS to accomplish the task without the need of managing the infrastructure. Lets divide it into different topics to tackle:Reference architecture hereThe developer PortalFor the Developer portal there are a couple of deployments in the server-less application framework,(Github, SAR)This solution is very complete and allows users to create a single place to administer the Public and Private endpoints, also administration of the versions of the different APIs and how are the end users going to register.The user portal/Api Monetization PortalNow this part depends on the customer requirements, or regulations, because is where the user will see their charges/Usage, and will be able to pay, because customers are different depending on the region. This can be built with API Gateway referencing a DynamoDB table  to keep track on the API consumption and finally integrate with the local/regional e-payment provider.Example DynamoDB api usage table would beuser-id;timestamp;body; cost;email; httMethod;Isbase64; path;QueryStringsExample DynamoDB api prices table would bepath; method; price; stageImportant things to note if you want to capture price changes/offers on the API is is ideal to capture cost per API call so if the price changes over time it would be easer to keep track of each user usage.This is an example code on how to track user usage using lambdaimport jsonimport boto3import datetimedef lambda_handler(event, context):    headers = {'headers': {'Access-Control-Allow-Headers':'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token', 'Access-Control-Allow-Origin': '*'}}    response_info = api_prices()    prices = collapse_prices(response_info['Items'])    dynamodb = boto3.client('dynamodb')    email = event['requestContext']['authorizer']['claims']['email']    name = event['requestContext']['authorizer']['claims']['name']    username = event['requestContext']['authorizer']['claims']['cognito:username']    event_copy = dict(event)        # Deleting cognito token before storing it into dynamo    del event_copy['headers']['Authorization']    del event_copy['multiValueHeaders']['Authorization']        # Storing request into dynamo    response = dynamodb.put_item(        Item={            'user-id': {'S': username,},            'timestamp': {'S': str(datetime.datetime.now().timestamp())},            'httpMethod':{'S': event['httpMethod']},            'path':{'S': event['path']},            'resource':{ 'S': event['path']},            "body":{'S': json.dumps(event['body'])},            "isBase64Encoded":{'S': str(event['isBase64Encoded'])},            "queryStringParameters":{'S': json.dumps(event['queryStringParameters'])},            "multiValueQueryStringParameters":{'S': json.dumps(event['multiValueQueryStringParameters'])},            "email":{'S': email},            "name":{'S': name},            'cost':{'S': str(float(prices["{0}{1}".format(event['httpMethod'],event['path'])]))}        },        TableName='OpenAPI-table',    )        # Queue message to the caller sqs    sqs = boto3.client('sqs')    response = sqs.send_message(        QueueUrl='https://sqs.us-east-1.amazonaws.com/9999999999/OpenAPI-queue',        MessageBody=json.dumps(            {                'httpMethod':event['httpMethod'],                'path':event['path'],                'resource':event['path'],                "body": event['body'],                "isBase64Encoded": event['isBase64Encoded'],                "queryStringParameters": event['queryStringParameters'],                "multiValueQueryStringParameters": event['multiValueQueryStringParameters'],                "email": email,                "name": name,            })        )    return {        'headers' : headers['headers'],        'statusCode': 200,        'body': json.dumps({'message':"Your request is queued",'message_id':response['MessageId']})    }def api_prices():    dynamodb = boto3.resource('dynamodb')    table_info = dynamodb.Table('Open-API-info')    return table_info.scan()def collapse_prices(prices):    return {"{0}{1}".format(price['method'],price['path']):price['price'] for price in prices}Backend and business enablementFinally to allow the business to keep track on their API behavior With AWS Glue + AWS Athena + AWS Quicksight would allow the customer to create custom BI portals to keep an eye on their revenueAlso thanks to the possibility to query DyanmoDB directly with Athena Federated queries for DynamoDB(Github, SAR)Also would be a good idea to use QuickSight Spice to avoid price increments querying AWS DynamoDB and only importing the data to QuickSight once BI cycle is definedCommentShareGabriel_Manswered a year ago1AWS Data Exchange makes it simpler now -  https://aws.amazon.com/data-exchange/features/aws-data-exchange-for-apis/CommentSharePradeep_Manswered a year ago1The AWS SaaS Marketplace facilitates the process of monetizing APIs because to implement monetization you need mechanisms for procurement, metering, and billing, all of them aligned to your business model. If you do not want to use the AWS Marketplace, AWS Data Exchange, or any other 3rd-party API Monetization Services, then you are going to build it yourself, what is not technically complex, but it is a lot of work. A quick search on the internet is going to show you some 3rd-party API Monetization providers. Also don't refrain from contacting your AWS representative, or the AWS Partner Team to recommend you some partners' solutions.CommentShareFabiananswered a year ago0Hey Kaushik - Check out this blog post over Data Exchange for APIs (Released 2 days ago):https://aws.amazon.com/blogs/aws/data-exchange-for-apis-find-subscribe-use-third-party-apis-consistent-authentication/This makes it simpler for your end users to use the APIs you create, have consistent access, and take advantage of AWS native authenticationEdit: Saw Pradeep's answer after posting mine, the blog I linked has a quick example of how you'd subscribe to a DataExchange APICommentShareSailesh_Kanswered a year ago0Hello Kaushik, let us know if any of the answers provides solves your question. If so, please remember to click the "Accept" button for the best answer to let the community know that your question is resolved. This helps everyone. Thank you in advance.CommentShareSUPPORT ENGINEERMonica_Lluisanswered a year ago"


Question: deep racer dosent apear in my juyptr notebook exmples

I can't find the notebook for it anywhere so if anyone can give me something for the API of this thing so I can code stuff with libraries and my own models that would be greatFollowComment

Answer: 0You might want to check the repo @ https://github.com/aws-deepracer-community/deepracer-analysis.This might be a good point to startCommentSharethomasanswered a year ago


Question: AWS Mobile SDK for .NET and Xamarin Question

"I was following the AWS Mobile SDK for .NET and Xamarin guide in the link below to setup our iOS app to Download from an S3 bucket.  As a part of the process we have to create a Cognito Identity pool.https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/setup.htmlA customer has informed us that the Cognito Identity pool is not supported in AWS Web Application firewall (WAF), and they would like to know if it's possible to use a User Pool instead which is supported by WAF.  Is that possible or is our only option to use a Cognito Identity pool when using the Sdk?FollowComment"


Question: EVE-NG (virtualisation) on AWS

"Hi, I've seen a lot of tutorials on how to run EVE-NG on GCP free tier because AWS does not allow nested virtualisation on its free tier. EVE-NG allows you to build networking labs using virtual devices.link here incase you're interested : https://www.eve-ng.net/index.php/features/I have a home ESXi server lab, but need to be more mobile, so am looking at moving my EVE-NG lab to the cloud. Setting up several instances of EVE-NG so that I can spin up a "small", "medium", "large" lab depending on what I want to do. EVE-NG is really cool in that they allow you to transfer your license to a number of guest VMs as long as you only run one at a time.Is there anything special I need to consider if I want to build an EVE-NG lab. eg do I need to select a certain EC2 instance to run nested virtualisation?Also if I do all the configuration work on my home lab (eg build all of the test VMs and network labs) can I then beef up the VM CPU/RAM/HDD when I import it to AWS, or do I need to keep the same HW settings?Thanks for your helpNoobFollowComment"


Question: Errors while running simulation

"I am getting the following errors, while trying to simulate my design with AWS shell. It seems like the arch_package, proj_package declaration is missing. Where are they supposed to be declared. I already checked the the init.tcl file is being sourced and it contains the following lines:set AWSINSTALL "C:/AWS_Repo/aws-fpga"source $AWSINSTALL/hdk/common/shell_v04261818/hlx/hlx_setup.tclErrors from the log:INFO: [VRFC 10-2263] Analyzing SystemVerilog file "C:/AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_rdimm_wrapper/ddr4_db_delay_model.sv" into library xil_defaultlibINFO: [VRFC 10-311] analyzing module ddr4_db_delay_modelINFO: [VRFC 10-2263] Analyzing SystemVerilog file "C:/AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/ddr4_model.sv" into library xil_defaultlibERROR: [VRFC 10-91] arch_package is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTable.sv:5]INFO: [VRFC 10-311] analyzing module StateTableERROR: [VRFC 10-91] proj_package is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:1553]ERROR: [VRFC 10-91] proj_package is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:1554]ERROR: [VRFC 10-91] proj_package is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:2950]ERROR: [VRFC 10-91] MAX_ROW_ADDR_BITS is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:14]ERROR: [VRFC 10-1775] range must be bounded by constant expressions [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:14]ERROR: [VRFC 10-91] MAX_RANKS is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:15]ERROR: [VRFC 10-1775] range must be bounded by constant expressions [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:15]ERROR: [VRFC 10-91] MAX_RANKS is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:27]ERROR: [VRFC 10-1775] range must be bounded by constant expressions [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:27]ERROR: [VRFC 10-91] MAX_RANKS is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:28]ERROR: [VRFC 10-1775] range must be bounded by constant expressions [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:28]ERROR: [VRFC 10-91] MAX_RANKS is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:29]ERROR: [VRFC 10-1775] range must be bounded by constant expressions [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:29]ERROR: [VRFC 10-91] MAX_RANKS is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:30]ERROR: [VRFC 10-1775] range must be bounded by constant expressions [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:30]ERROR: [VRFC 10-91] MAX_RANKS is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:31]ERROR: [VRFC 10-1775] range must be bounded by constant expressions [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:31]ERROR: [VRFC 10-91] MAX_RANKS is not declared [../../../../../../../../../../../../AWS_Repo/aws-fpga/hdk/common/verif/models/ddr4_model/StateTableCore.sv:32]INFO: [#UNDEF] Sorry, too many errors..FollowComment"

Answer: "0Sorry, repeat post. This looks like an issue if current version of shell is used with 2017.4CommentSharefpgamagicanswered 4 years ago"


Question: Authentication via IAM user SSH public keys

"Hi,Would it be possible to authenticate ourselves into CodeArtifact using SSH key pair set on IAM users instead of the authentication token ? See CodeArtifact documentation.As it's done for CodeCommit. See CodeCommit documentation.Thank you.Best regards, Dylan.FollowComment"

Answer: "0Hello,No, you cannot use SSH key pair to authenticate in CodeArtifact.Best regards,CommentShareYounes Benhoumichanswered 10 months agoLuc 10 months agoI think, OP did notice that it's not possible today.I think we wants to know if this feature will be available in the future.Share"


Question: [service] was unable to place a task. Reason: You've reached the limit on the number of tasks you can run concurrently.

"I am creating this new question, because I could not post an answer on the already existing thread here https://repost.aws/questions/QUiWCpad5jReKxxTiWjKfeyA/how-to-solve-the-ecs-error-youve-reached-the-limit-on-the-number-of-tasks-you-can-run-concurrentlyI have the same problem as the user in the mentioned thread, but starting an EC2 instance (which I already had before) did not resolve the issue. I can only run 2 tasks concurrently in my ECS Fargate Cluster. The problem is, I don't really know which quota increase request I should choose. I tried Tasks per service but so far, I haven't got an answer. I am not sure, but I think there is a bug in the quota view because in the column Applied quota value every entry says Not availableAlso, I had to select 5001 as quota (1 above default) which does not make sense to me because I cannot even launch 2 tasks.Maybe someone can help me which this problem.FollowComment"


Question: Pinpoint Metrics

"Quick question.  We are researching the metrics.For a given campaign, how do we get the list of all endpoints (emails) - and stats by email.Like,Campaign -1 - Emailssrini@gmail.com      -  Delivered Yes/No - Opened Yes/No -  Clicked Yes/Nomike@gmail.com -  Delivered Yes/No - Opened Yes/No -  Clicked Yes/NoThanksSriniFollowComment"


Question: "Instance stuck in stopping state, unable to create image, what steps next?"

"Hi,My instance i-0f9c30641b02b1850 has been stuck in a "stopping" state for about 30 minutes.  Force stop isn't working.  Command-line force stop isn't working (just says current state is "stopping" and previous state is "stopping").  I've tried creating an image of the instance, but the image creation fails.  I've also tried manually creating snapshots of the instance's volumes, but those also fail.I just want to restart the instance on good hardware.  This whole endeavor began due to a "status check failed" alarm from the instance.Thanks for your help.Edited by: idi on Aug 31, 2019 7:14 AMFollowComment"

Answer: 0Instance finally stopped after multiple hours.  I don't know if it was done by AWS Support or just happened on its own.CommentShareidianswered 4 years ago


Question: Budgeting for Split Costs

"I'm trying and failing to get a budget to use the Total Allocated Cost for a Cost Category Value. I've read the documentation and as far as I can tell this is not supported? I think I'm SOL but I wanted to check here before I gave up. I'll explain what I'm trying to do below.I've set up cost categories for each project with rules for each environment with an example below. I have three additional rules letting me split some costs that are shared between environments. Now I want to apply a budget to get alerts when the dev environment (or any environment for that matter) exceeds its budget. But the split costs are not reflected outside the Cost Categories Overview. As far as the budget console is concerned dev is only costing $19.61 a month, it is completely ignoring the additional costs coming in from the split.Is there anyway to get budget alerts on the total allocated cost for the P1-Dev Value?P1-Cost-CatigoryValueCostSplit ChargeTotal Allocated CostP1-Test$25.31$367.98$393.30P1-Dev$19.61$367.98$387.60P1-Production$222.90$133.26$356.16P1-Acceptance$177.60$133.26$310.86P1-Shared-All (Split charge)$533.05$0.00$0.00P1-Dev-Test (Split charge)$469.44$0.00$0.00P1-Acpt-Prod (Split charge)$0.00$0.00$0.00Seems odd that I can't get the budget to respect the totals.. is there an obvious work around that I'm to new to see?FollowComment"

Answer: 1Split Charges are only available in the Cost Category view and can't be used in Cost Explorer or AWS Budgets currently.CommentShareGeno_AWSanswered a year ago


Question: "Lightsail - Can't delete static IP address, reverse DNS record attached?"

"I've deleted everything in my Lightsail account except a static IP address which was associated with an mail server instance I ran on the platform. When I try to delete this I get this error:ReleaseStaticIp[eu-west-2]The specified Static IP address cannot be released from your account. A reverse DNS record may be associated with the Static IP address. To unlock the address, contact AWS Support.InvalidAddress.LockedI have deleted the DNS A record that pointed to the static IP (confirmed with dig) but still I get the error.Is there a long delay between deleting the record and Lightsail picking up the change? It's been several hours since I made the change, Google DNS saw it immediately.Annoyingly with the free tier I can't get any techincal support from AWS.FollowCommentrePost-User-8495654 10 months agoI think I may have a way to get this resolved, for anyone else running into this problem there is a page where you can make a request to have the rDNS record removed:https://aws.amazon.com/premiumsupport/knowledge-center/lightsail-release-static-ip/Share"


Question: AWS DX to AWS DX via 3rd party Layer 2 VPLS

"Is it possible to BGP peer DX VIF's across regions, without a dedicated (customer) BGP router?We only have infrastructure in the Cloud, we could spin up a network appliance in the VPC, but it seems like we need something directly on the other end of DX/VPLS for this.This is pretty much the same question as https://forums.aws.amazon.com/click.jspa?searchID=12352637&messageID=814856 raised 2 years ago, just hoping ideas had changed since then.Any direction would be greatly appreciated.ThanksFollowComment"

Answer: "0So yes, you can peer two individual VIF's directly, but that will only give a single point-to-point connection.I've progressed with this now, so happy to close.We are trialling vendors who supply Cloud to Cloud Layer 3 instead.Edited by: chrisb2c2 on Jan 10, 2020 1:36 PMCommentSharechrisb2c2answered 3 years ago"


Question: Increasing performance of fetching secrets

"I'm trying to see if there's anything I can do to improve performance when fetching secrets from Secrets Manager. At the moment, we're seeing it taking somewhere between 100-400ms every time (probably averaging ~200ms)... which is a pretty big overhead considering our lambdas themselves typically take less than that.We were previously caching the secret in memory (for warm/provisioned lambdas), however, that brings us unstuck when those secrets get changed and the lambdas have out-of-date values.So, my question is two-fold:Is this just "the way it is"? ie. I understand that there's no performance guarantees, but is this just the ballpark that I should expect for these types of fetches?Would using something like a VPC Endpoint help? All the doc seems to suggest that the benefits are more about security, rather than performance, but I'm happy to explore.Thanks.FollowComment"

Answer: 0This question has been answered in detail during the AWS Supports You event. Answer is provided here .CommentShareSUPPORT ENGINEERMonica_Lluisanswered 8 months ago


Question: Change the number of replicas on my cluster without recreate it using CloudFormation

"I have a CloudFormation stack that creates a AWS::ElastiCache::ReplicationGroup wiht 1 shard (NumNodeGroups) which contains 1 primary nodes and 2 replicas. It have cluster mode enabled and uses multi az.Every time I need to update the parameter ReplicasPerNodeGroup CloudFormation recreates the entire cluster instead of only change shards adding or deleting replicas. The documentation says that the update requires a replacement.But adding or deleting replicas from console only modify the current cluster without recreate it, keeping the data.Is there a way to create a Redis Cluster with cluster mode enabled and multi az, using cloudformation, that allows me to change the number of replicas without recreating the entire cluster ? The current cloudformation behaviour does not make sense at all.FollowComment"

Answer: "1Accepted AnswerHello,Currently when CloudFormation requires an REPLACEMENT of a resource, there is no workaround for getting around the replacement of the resource.For the specific  AWS::ElastiCache::ReplicationGroup resource, this resource in the past did not support  updating  the parameter ReplicasPerNodeGroup via console as well. Upon which  the cloudformation resource was designed initially.That being said the Cloudformation service team is aware of this behavior change for the ReplicasPerNodeGroup  parameter via the console and are working towards releasing a fix so that you can update ReplicasPerNodeGroup via Cloudformation without a replacement of the cluster in the same way  you are able to do it via the console.I do not have an ETA when this would be released however as soon as it gets released, it should be publicly announced in either one of the following links:AWS Blog - https://aws.amazon.com/blogs/aws/AWS New - https://aws.amazon.com/new/CommentShareAditya_Tanswered 2 months ago"


Question: Instance reachability check failed Linux

I moved the Lightsail instance of volume 320GB to EC2 and made a new instance. Then I resized the EBS volume from 320 GB to 50GB. Detached both the volume at first and reattached 50 GB volume only. After starting the instance instance status check is failed.FollowCommentRavi Shanker 4 months agoCould you please check for the below points:-Failure to boot the operating system-Failure to mount the volumes correctly-Exhausted CPU and memory-Kernel panic-Network failed to come upCheck for reachability after restarting your instance and also check volume detach and attach has been done properlyShare


Question: Is it possible to create a workmail "catch-all" account

"So I have a domain that I am working with and created a WorkMail Organization for. The need is for any email sent to the domain, regardless of the address it is sent to. Is this something that is possible for this system?I was hoping I could do something like create a group with the alias *@domainname.com, but that is not allowed for the system. Is this something I should do in SES instead of WorkMail? If so, any suggestions as I am having trouble finding any examples or use cases.Any suggestions would be greatly appreciated as this seems to be a need for the larger system we are building, and to ensure nothing gets lost.FollowComment"

Answer: "0Workmail doesn't support wildcards (or catch-all) natively, but with help of SES and Lambda you can build the feature. Here is an example how to do thishttps://github.com/devcybiko/ses-catchallCommentShareKalluanswered 10 months ago"


Question: Prevent CDK from creating a new OpenSearch domain

"I modified some parameters of our OpenSearch domain and did a new CDK deploy. Turns out that CDK decided to create a new cluster and redirect both the lambda that performs search and Fargate task that indexes to this new cluster. So now I have a cluster with 100k documents that is not connected to anything and a search cluster that doesn't have any index or documents.I assume I should be able to do a back up of the old cluster and apply that backup to the new cluster. This will fix my current situation since this is our development cluster. However, if this was our production cluster, we would have downtime. Ideally, there should be a way of rolling back the Cloud Formation stack or importing the old domain into the stack, but none of those options seem to be available.I don't know why CKD decided to create a new domain. It could be because the existing domain was updated and CDK specified an earlier version or it could be related to the security policy changes I added. I assume it's the latter since reverting them resulted in the creation of a third cluster.Is there a way to prevent CDK from creating new search domains like this?FollowComment"

Answer: "0Hello,I see that when you modified some parameters of your OpenSearch domain and did a new CDK deploy, a new domain was created. Can you let me know which specific parameters were modified as  I see that some parameters do require a resource replacement which may lead to the creation of a new domain.Also to investigate this further we require information that is non-public information. Please open a support case with AWS Support using the following link:https://support.console.aws.amazon.com/support/home?#/case/createCommentShareAditya_Tanswered 9 months agoKnut 9 months ago0I added fine_grained_access_control=opensearch.AdvancedSecurityOptions(...) while I had previously not specified that parameter.Running cdk diff show that this will cause the domain to be recreated. I can add that now and verify that this is the case.I have take a snapshot of the old domain and restored that to the new one now so there is no point in looking into my account.I would think that for most users, having cdk stop and ask for confirmation before recreating a search domain would be good.Share"


Question: Q:  What’s the difference between “an ALB configured with pass-through traffic without TLS offload” vs “a NLB configured to pass-through traffic without TLS offload” ?

"I know ALB can be configured to just pass-through the packet without TLS offloading. In that case, because payload is encrypted, then ALB only get limited access to the payload to do any dynamic routing (content based sticky session, etc).My question is,  in this case, is there any difference if I use a NLB without TLS offloading?  Does ALB without TLS Offloading functionally the same as NLB without TLS Offloading?FollowComment"

Answer: "1Accepted AnswerNLB works at the network layer (Layer 4 in the OSI model). Ignoring the ability to perform TLS offload (which is what you're asking) it "looks" different at the network level to the client than using ALB. ALB works at the application layer (Layer 7).From the client to the back-end target, when configured for pass-through (ALB) and not offloading TLS (NLB) it they both look like this:Client ---(A)---> Load Balancer ---(B)---> TargetWith NLB:In (A) the source IP is the client; the destination IP is the load balancerIn (B) the source IP is the client (there are exceptions but in most cases); the destination IP is the target instance - it is the same TCP sessionNLB is doing source (client) IP preservation.With ALB:In (A) the source IP is the client; the destination IP is the load balancerIn (B) the source IP is the load balancer the destination IP is the target instance - and it is a different TCP session (port numbers, sequence numbers)CommentShareEXPERTBrettski-AWSanswered a year ago"


Question: why files became 0kb when using datasync between s3 classes

"using datasync, I transferred the files in Glacier Deep Archive to the s3 Glacier Flexible Retrieval class in the same s3 bucket, but now all files are 0 kb and appear in STANDARD class.Files transferred132952Data transferred20.26 MiB(actually it should be much higher)I did not take any action in the bucket beforehand, did I miss something or did something wrong?FollowComment"

Answer: "0HelloIf your objects are currently residing in Glacier Deep Archive, you must restore objects archived in this storage class before DataSync can read them. You can read more about the consideration for working with different S3 storage classes at below link:https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classesFor restoring objects, the following documentation is very helpfulhttps://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.htmlhttps://docs.aws.amazon.com/AmazonS3/latest/userguide/restoring-objects.htmlThere is a FAQ around this (https://aws.amazon.com/datasync/faqs/)Q: Can I copy data out of Amazon S3 Glacier Flexible Retrieval (formerly S3 Glacier) and Amazon S3 Glacier Deep Archive?A: When using S3 as the source location for an AWS DataSync task, the service will attempt to retrieve all objects from the bucket which need to be copied to the destination. Retrieving objects which are archived in the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage class results in an error. Any errors retrieving archived objects will be logged by DataSync and will result in a failed task completion status. Read about considerations when working with Amazon S3 storage classes in our documentation.CommentSharerePostfanclubanswered a year agorePost-User-4004309 a year agothank you but when i run datasync i didn't get any error. number of transferred files is correct but transferred file size is wrong. now all files appear as 0kb in STANDARD. Could the files be overridden and their contents deleted?SharerePostfanclub a year agoFiles in S3 Glacier Deep Archive don't get deleted unless they are removed by the user. If that operation was not performed, the objects in GDA can be restored using instructions from above link. Once you have restored the objects, you need to copy them to the class of your choice (when you restore it's a temporary copy and you have to specify for how many days the temporary copy should be kept). Try it with one of the object in GDA to get a feel of the process.Share"


Question: Linux terminal and python scripts stopped working

"During normal work in the Cloud 9 IDE the terminal stopped working and Python scripts fail to launch. The terminal does not give an error but launching scripts with the "Play" button I get:Command failed: /home/ec2-user/.c9/bin/tmux -C -u2 -L cloud92.2 new -s output16162 bash -l -c 'trap '''printf "\e[01;30m\n\nProcess exited with code: $?\e[0m\n"''' EXIT debug="false";project_path="/home/ec2-user/environment/";file="/home/ec2-user/environment/script.py"; export PYTHONPATH='''/usr/local/lib/python3.4/dist-packages:/usr/local/lib/python3.5/dist-packages'''; if [ "$debug" == true ]; then python3 -m ikp3db -ik_p=15471 -ik_cwd=$project_path "$file" else python3 "$file" fi checkExitCode() { if [ "$1" ] && [ "$debug" == true ]; then python3 -m ikp3db 2>&1 | grep -q '''No module''' && echo ''' To use python debugger install ikpdb by running: sudo yum update; sudo yum install python36-devel; sudo pip-3.6 install ikp3db; ''' fi return $1 } checkExitCode $?' ; set -q -g status off ; set -q destroy-unattached off ; set -q mouse-select-pane on ; set -q set-titles on ; set -q quiet on ; set -q -g prefix C-b ; set -q -g default-terminal xterm-256color ; setw -q -g xterm-keys on ; set -q remain-on-exit on ; setw -q -g aggressive-resize on ; list-panes -F c9-pid#{pane_pid}- ; detach can't create socket: Permission deniedAny idea what might be going on? I have rebooted the instance and reinstalled Cloud9 with no effect (I have access to it via ssh). tmux folder /tmp/tmux-1000 has write permission.Edited by: mannie72 on Oct 31, 2021 4:32 PMEdited by: mannie72 on Oct 31, 2021 6:09 PMFollowComment"

Answer: 0It turns out it is a tmux issue. The remedy is to create a local tmux folder:mkdir -p ~/.tmux/tmpchmod 777 -R /.tmux/tmpecho 'export TMUX_TMPDIR=/.tmux/tmp' >> ~/.bashrcStill no idea what changed on the instance to cause the problem.CommentSharemannie72answered 2 years ago


Question: AWS VPN monitor

"so far my company uses the aws client vpn, which is authenticated through the google workspace saml. the user's vpn access is authenticated by his/her google mail, is anyway I can track the user's behavior, like which aws resource he/she access or modified? is any software or service i can levelrage?I appreciate you thoughts.FollowComment"

Answer: "0Good day.Have you already looked into CloudTrail events? https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/monitoring-cloudtrail.html"When activity occurs in Client VPN, that activity is recorded in a CloudTrail event along with other AWS service events in Event history."Remember that CloudTrail only supports 90 days in the dashboard by default, and if you need to retain a longer period then you should look into CloudTrail Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html) or integrate CloudTrail with your SIEM solution.I hope this helps!Jason H.CommentShareJason_Hanswered a year ago"


Question: DynamoDB Global Tables + Atomic Transactions and counters

"I'm trying to figure out how Dynamo handles conflict resolution in a global table when doing a transaction.Assuming I want to run a transaction that increments an atomic counter and writes out a log item in the same transaction, how is this resolved in a global tables environment?Inside of a single region the second transaction would fail and refuse to increment the counter since the log record already exists.But what happens when the transaction is run in 2 regions at the same time? The docs for conflict resolution in global tables states that the last writer wins. But how does this apply to transactions and how does this apply to atomic counters?Would an atomic counter being quickly incremented in 2 regions at the same time result in them constantly over-writing each other and not actually incrementing properly?FollowComment"

Answer: "0Accepted AnswerSo, after lots of digging and testing I found the answer for those who come looking in the future:Transactions don't "exist" as far as global tables is concerned.Transactions will apply within a single regionReplication of changes made via transactions are replicated async to the other regions that are enabledThis means that the default "last writer wins" policy will come in to effect.TL;DR: Don't rely on transactions if you might be writing to the same thing in multiple regions; e.g. add a 'region' to your PK/SK if you want transaction qualities or some other such mechanism to prevent different regions overwriting each other's transactions. Another alternative would be writing in a single region and reading from others depending on the use case.CommentShareAWS-User-7460616answered 2 years ago"


Question: How client application  connect to Hyperledger Fabric 2.2 on Amazon Managed Blockchain ?

Answer: 0Can you please confirm you copied the cert as per step 5:aws s3 cp s3://MyRegion.managedblockchain/etc/managedblockchain-tls-chain.pem  /home/ec2-user/managedblockchain-tls-chain.pemCommentShareJCanswered 2 months agorePost-Nexyear 2 months agoYes I already copied managedblockchain-tls-chain.pem to client. Also use it to enroll admin and got admin_msp.├── admin-msp│   ├── IssuerPublicKey│   ├── IssuerRevocationPublicKey│   ├── admincerts│   │   └── cert.pem│   ├── cacerts│   │   └── ca-m-bz5qr6rhcveqxfjyjfrtaioe5e-n-j2ib55zmyree5fieloktt3ttim-managedblockchain-ap-northeast-1-amazonaws-com-30002.pem│   ├── keystore│   │   ├── 3e7e4b7f840f8a209b178afefb63e207f336cfd7101c612d8a8acefda8a59504_sk│   │   ├── c8be8052c5888e713b82317296f0a636a07c6375fcb922cb06833f8ebffa6139_sk│   │   └── e12f734b4044befcce7fae67c394fff9416123414814c3553dab1036b99361b9_sk│   ├── signcerts│   │   └── cert.pem│   └── user└── fabric-ca-client-config.yamlThere are two location use tlsCACerts in application connect profile (using Fabric SDK for nodejs) ."peers"."peer0.org.SDL.aws.com"."tlsCACerts"."pem"   # fill it with admin_msp/signcerts/cert.pem contents now"certificateAuthorities"."ca.org.SDL.aws.com"."tlsCACerts"."pem" # fill it with admin_msp/signcerts/cert.pem contents nowI don't know how and where to use managedblockchain-tls-chain.pem in application connect profile json.Share


Question: Can't find link to update contact information for Route 53 hosted zone

"I found these instructions, but I can't find the "Edit Contacts" button:"Sign in to the AWS Management Console and open the Route 53 console at https://console.aws.amazon.com/route53/ . In the navigation pane, choose Registered Domains. Choose the name of the domain that you want to update contact information for. Choose Edit Contacts."How I can update contact information for my hosted zone? ThanksFollowComment"

Answer: 0Accepted AnswerI found it. I should have selected "Registered Domains" instead of "hosted zones". Found the edit button I was looking for.CommentSharetgoneil1answered 5 months ago


Question: RDS Instance stuck in rebooting (no connections)

"Hello all!Earlier today, one of our RDS instances ran out of space. This was unexpected and very sudden considering we freed up a ton of space by truncating stale data but after doing so, it suddenly consumed all available space, ran out and shut itself down.As a temporary measure, I've allocated an additional TB of storage. RDS modified successfully but then went into storage-optimization mode. During that state, the instance was not accessible - it showed to be online (i.e. the was CPU usage, IOPS count was in the 1500s) but it showed zero connections. After roughly 6 hours of that, I've decided to reboot the instance since it has did not appear to be going anywhere - and this is where we are now... stuck in Rebooting state. I am also unable to log into the instance from normal external sources.Wondering where I go from here? This is an instance with failover however right now the only options I have in the actions menu is to delete it.Thanks in advance!FollowComment"

Answer: "-1Hi,I understand your RDS instance is stuck in rebooting and not accepting connections and you'd like to know how this can be mitigated.From your response, I see that your RDS ran out of storage. Please note that when RDS runs out of storage, connections will not be possible. You then increased storage and RDS instance was in "storage optimization" mode. As per document here [1], "storage optimization" does not prevent connection. It only prevents further storage modification actions within the next 6 hours. The connection issue could be due to the persistence in low storage available. You then tried to reboot the RDS but it is stuck in rebooting. Please note that the reboot process will not complete when the RDS does not have storage available. As you mentioned that the only option you see is "Delete", you can either perform the either of the below mitigative steps:Contact AWS Premium Support [2] in order to get engineers an internal look at the RDSOr Delete the RDS. Ensure to check if you have a manual backup and restore it.I hope the above information is helpful.Reference links:[1]: Working with storage for Amazon RDS DB instances - Increasing DB instance storage capacity - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.ModifyingExisting[2]: https://aws.amazon.com/premiumsupport/plans/CommentShareWinnieanswered a year ago"


Question: Storage Gateway migration between accounts

"Hi,Customer wants to migrate a storage gateway between accounts.Do we have other way to do it besides copying the data between the accounts?What would be the best practice? Thinking about possible cost/performance tradeoffs.Thank you.FollowComment"

Answer: "0Accepted AnswerIf it is a Volume Gateway, the customer just needs to take a snapshot of the volume and share it with the other account. Please note, if the destination is in another region, the snapshot needs to be copied to that region before being shared. Once the snapshot is shared,  a new volume can be created in the destination account based on the shared snapshot.Steps:Take a snapshot of the storage gateway volume(s) in account A.Share the snapshot with account B.Create a new Volume Gateway in account (you can use an existing gateway as well).Create a new Storage Gateway volume based on the shared snapshot.File Gateway migration is a bit different, because its S3 space is owned and managed by the customer. That is why migrating a File Gateway would be as easy as copying the S3 objects to a bucket in account B. Then a "file share" can be created in account B based on the new bucket.CommentShareAWS-User-1089406answered 3 years ago"


Question: How do you tell if a shared layer works on ARM?

"Is there a way to take a shared layer from the catalog like this one:https://serverlessrepo.aws.amazon.com/applications/us-east-1/145266761615/image-magick-lambda-layerand tell from the catalog if it's for arm64, x86_64, or both?FollowComment"

Answer: "0Accepted AnswerYou can download the code for a layer that you own by using the GetLayerVersion API. With the AWS CLI, do aws lambda get-layer-version --layer-name LayerName --version-number 1 and in the response you'll see a Location field which is where you can retrieve the layer code from.CommentShareEXPERTBrettski-AWSanswered 6 months ago0I figured out that the answer for this particular layer was no, but I never really figured out how to grab the layer as a .tar.gz or .zip and unpack it, which is what I wanted.CommentSharewz2banswered 6 months ago"


Question: Pipeline Code for Querying Aurora Serverless in AWS AppSync

Before It was easy to write queries in request template and response template using statements. Now appsync resolver is connected to pipeline where the code has to be written. I am unable to figure out how to write the query inside the pipeline function. Could you please help me out?FollowComment


Question: Lake Formation Grant Permission on View Occurs an Error.

"Hi,I granted permission to an IAM user on both view and table.With the permission granted user, I could access the table but not the view.Here's my Lake Formation configuration.Here's the error when I try to access view.Insufficient permissions to execute the query. line 1:15: Failed analyzing stored view 'awsdatacatalog.permission-test-db-03.s3_summary_view': Insufficient Lake Formation permission(s) on hyperbilling_data_clientnameThe view is created based on the table and it seems like the view can't access the table itself.Please advise how I can solve this issue.FollowComment"

Answer: "0Accepted AnswerHi,From the message captured, it seems that there is a lack of permissions in the query underlying your view.Your view is likely referencing several tables.A view runs as the owner of the view, and is a way for a user with more permissions to grant limited access to a user with less permissions. This means that the query inside of the view is analyzed using the permissions of the user that owns the view. If the view does not have an owner, then we verify that the user accessing the view has permissions to the data.Anyway, the owner of the view will need SELECT with GRANT of all tables in the view.Could you please check this point and let us know if it solves your issue ?https://docs.aws.amazon.com/lake-formation/latest/dg/tut-grant-select.htmlCommentShareAWS-User-4441565answered 2 months ago0Hi, Thank you so much for the answer!I could solve the issue by granting additional permission to another table which are referenced from the view.I do have one more simple question just out of curiosity.Why can't I select any Grantable permissions ** for table permission and select all tables** for resource type when I grant permission to IAMAllowedPrincipals? Is this because IAMAllowedPrincipals doesn't really act as a group, but instead it's more like configuration to allow IAM control?CommentShareSojeonganswered 2 months ago"


Question: support for variables inside parallelCluster yaml configuration

"I have seen example configurations where certain items, such as HeadNode.Ssh.KeyName or HeadNode.CustomActions.OnNodeConfigured.Script, need to be modified for specific use cases or cluster instances. These items are currently distributed throughout the yaml files. Is it possible to define variables for such items at the top of the yaml file, then refer to variable names throughout the yaml document. I am thinking of a syntax similar to ansible variables or, in terms of a (hypothetical) parallelCluster configurationVars:  ssh_key_name: key123  postinstall_path: s3://example123/postinstall.sh[..]HeadNode:  Ssh:    KeyName: "{{ ssh_key_name }}"   CustomActions:    OnNodeConfigured:      Script: "{{ postinstall_path }}"Support for variables would allow one to focus on the top of the yaml configuration during adjustments for specific use cases instead of having to comb through the entire configuration.FollowComment"

Answer: "3Please use YAML nodes anchors for reference https://yaml.org/spec/1.2.2/#692-node-anchorsCommentSharerePost-User-7640917answered 5 months agorePost-User-6396518 5 months agoThanks for this excellent pointer. Does parallelcluster tolerate "non-canonical" keys such that one could place a sequence of anchor definitions under a key like MyVars: at the beginning of the yaml file?ShareJacopo De Amicis 4 months agoI've run a quick test and it looks like node anchors work with the ParallelCluster CLI, but you can't define a new section in the YAML file with your MyVars structure. Just define the anchor at the first occurrence of your variable and then refer to it later in the rest of the config file.Share"


Question: NLB support for TLS passthrough on EKS based on URI paths

"A customer is trying to accomplish EKS - NLB set up that is load balancing TLS requests to backends  routing different requests to different backends based on requested URI paths without terminating the TLS. per this blog, https://aws.amazon.com/blogs/compute/maintaining-transport-layer-security-all-the-way-to-your-container-using-the-network-load-balancer-with-amazon-ecs/  - The containers use the DNS name associated with the Network Load Balancer to access the containers in the other service.” Does this suggest I need different domains (rather than paths) to accomplish this kind of routing?FollowComment"

Answer: "-1Accepted AnswerNetwork Load Balancers are Layer 4 load balancers (TCP/UDP) - they do not understand HTTP and are not capable of making routing decisions by paths or any other aspect of the incoming request.Customers who need solutions to perform Layer 7 load balancing (HTTP) should be advised to use Application Load Balancers. However, the ALB must terminate TLS in order to determine which target group to send requests to based on the payload. It can, of course, re-encrypt the backend requests with TLS in order to provide security in transit.CommentShareEXPERTMichael_Fanswered 3 years ago"


Question: Amazon Pinpoint Journey Engagement Metrics API for Contact Center(Amazon Connect)

"Hi,I am running an amazon connect HVOC campaign through the Amazon Pinpoint Journey. There is an Activity journey engagement metrics of contact center(Amazon Connect) available in pinpoint UI and want to use this outcome metrics to showcase in a custom UI.The pinpoint API reference documentation has the API for Journey engagement metrics which has KPI's that relates with email metrics and not with the contact center metrics.So, Is there any other API or any possibilities to get this? can some help on this please?FollowComment"

Answer: "0It depends on what you want to show. Predominantly, the metrics you would want to show are in Connect.CommentShareAnaAtAWSanswered 3 months ago"


Question: How do you create a Tracker via API?

"I’ve been struggling to create a form that can be filled out to create a tracker at a given location. I have maps set up but haven't been able to create the tracker to be able to pin it; I found the parameters from the AWS SDK but am having trouble implementing it.Here is a snippet of my code:import {AWS} from 'aws-sdk';export default function Setup() {  var location = new AWS.Location({apiVersion: '2020-11-19'});  var params = {      TrackerName: 'STRING_VALUE', /* required */      Description: 'STRING_VALUE',      KmsKeyId: 'STRING_VALUE',      PricingPlanDataSource: 'STRING_VALUE',      Tags: {        '<TagKey>': 'STRING_VALUE',        /* '<TagKey>': ... */      }    };    location.createTracker(params, function(err, data) {      if (err) console.log(err, err.stack); // an error occurred      else     console.log(data);           // successful response    });    return(      <form>
          Tracker Name          <input type="text" class="form-control" id="truckName"  placeholder="Enter Truck Name" />          Please enter the name of your tracker.
                      <button type="submit" class="btn btn-primary" onclick="Setup">Submit</button>    </form>    );}FollowComment"

Answer: 0Can you elaborate more on your use case? What SDK are you using? Can you share a code snippet and any errors you're getting?CommentShareabraham poorazizianswered a year agoA_G_Baltazar a year agoI am trying to use the AWS SDK for Location Services (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Location.html#createTracker-property) and I am expecting a form to show up on the screen to enable a user the ability to create a Tracker. So far I have struggled getting the actual API call up and connected to the form; nothing renders.Share


Question: My phpmailer is not working under ubuntu EC2

"I have this php code to send email but when I use ubuntu instance it doesn't work.FollowCommentChris_G EXPERT10 months agoPlease edit your question and provide more information.  Share any logs, troubleshooting steps you've taken, etc.Share"


Question: How to send data from AWS IoT Greengrass to Cloud?

"We are going to develop a live detection application(JS and HTML) on AWS IoT Greengrass. After live detection, we would like to send the statistical data back to AWS Cloud, e.g. the number of cats, etc. Is there any method to send data from Greengrass to the Cloud?Besides, I saw that the Kinesis Video Streams need to connect to the IP camera, can we use notebook camera to replace IP camera?Thank you!FollowComment"

Answer: "0The statistical data collected from the edge devices can be published to AWS IoT Core service.AWS IoT Core supports the MQTT, HTTPS, MQTT over WSS, and LoRaWAN.Console : https://console.aws.amazon.com/iot/Catalog: https://aws.amazon.com/iot-core/Refer to the workshop below which demonstrates the MQTT publisher implementation using AWS IoT Greengrass.With MQTT topics, IoT clients identify the messages they publish by giving the messages topic names.https://catalog.us-east-1.prod.workshops.aws/workshops/5ecc2416-f956-4273-b729-d0d30556013f/en-US/chapter5-pubsubipc/10-step1Once messages are collected into AWS IoT Core, You can integrate data in real-time with other AWS services such as Kinesis, DynamoDB, S3, CloudWatch, and so on.CommentShareKihyeonanswered 5 months ago0Greengrass IPC lets you publish/subscribe messages to AWS IoT Core. You can find few examples : https://docs.aws.amazon.com/greengrass/v2/developerguide/ipc-iot-core-mqtt.html#ipc-operation-publishtoiotcoreRegarding Streaming from notebook camera, you can use gstreamer library on your notebook and create a RTSP : https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/examples-gstreamer-plugin.htmlCommentSharesunriseanswered 5 months ago"


Question: Instance stucked in shutting-down state

"Hello,My Instance i-09f4cf8bd09aeb351 on us-east-1 has stucked in shutting-down state at (2020-12-01 22:51:30 GMT), coul you help me please?RegardsFollowComment"

Answer: "0Hello,Someone of AWS Support? Please?RegardsCommentSharesasdasdasdasdasdasdsdanswered 2 years ago0Hello,The instance was terminated "automatically".Thank youCommentSharesasdasdasdasdasdasdsdanswered 2 years ago"


Question: Lambda event filter by content inside array

"I'm trying to create a Lambda Event Filter but got stuck on how to do this. I'd like to filter by the content of the body of the message. The problem is: this content is inside an array. Here is an exemple of what I'm trying to do:The body of the message:{  "infoA": "foo",  "infoB": [    {      "infoC": "bar",      "infoD": "someStuff"    }  ]}So I'd like to apply a filter for that lambda execute only when 'infoC' == 'bar'(my infoB list will always have only one item). My lambda is subscribed to a SQS, so this is why my filter starts with body key.I've already tried the following filter patterns, without success:{"body": {"infoB": {"infoC": ["bar"]} } }{"body": {"infoB": [{"infoC": ["bar"]}] } }None of this actually worked. On the AWS Lambda documentation, I didn't find information about this kind of filtering (a list inside the body of the message).I found here that it is possible to filter if any object of the list that has "infoC" = "bar". That would work for me, but didn't find the documentation that explains this anyfilterFollowCommentEvan 5 months agoWhy not send the events to event bridge and parse it out through rules?Share"

Answer: 0I would recommend sending it to event bridge parsing it there and then only sending the requests that match to the lambda. However you can use SNS filtering. It should work.Event bridgehttps://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.htmlSNS Filteringhttps://docs.aws.amazon.com/sns/latest/dg/example-filter-policies.htmlTake a look at the JSON being sent to SNS and use the example to parse it out.CommentShareEvananswered 5 months ago


Question: AWS CDK and AWS CodePipeline

"Hello, I'm creating an infrastructure in AWS with a Dynamo table and some lambdas for a "CRUD" functionality. The lambdas simply allow adding records, deleting, querying, etc. (I don't include all of them as they are not related to the issue and it makes the code easier to read).However, when I add the code for AWS CodePipeline, I encounter the following error:[Container] 2023/05/23 13:00:26 Command did not exit successfully npx cdk synth exit status 1[Container] 2023/05/23 13:00:26 Phase complete: BUILD State: FAILED[Container] 2023/05/23 13:00:26 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: npx cdk synth. Reason: exit status 1How could I solve it? I'm new in AWS and I'm quite disoriented. The code in the lib folder I'm using is:  const nuevoRegistroFunction = new lambda.Function(this, "NuevoRegistroFunction", {      runtime: lambda.Runtime.NODEJS_14_X,      handler: 'handler.nuevoRegistro',       code: lambda.Code.fromAsset(path.resolve(__dirname, 'lambda')),      environment: {        TABLA_REGISTROS: tablaRegistros.tableName,      },    });    tablaRegistros.grantReadWriteData(nuevoRegistroFunction);    const registrosAPI = new apigw.RestApi(this, "RegistrosApi");    registrosAPI.root      .resourceForPath("registros")      .addMethod("PUT", new apigw.LambdaIntegration(nuevoRegistroFunction))      new CodePipeline(this, 'Pipeline', {      pipelineName: 'TestPipeline',      synth: new ShellStep('Synth', {        input: CodePipelineSource.gitHub('ivozmediano/microservicios', 'main'),        commands: [                    'npm ci',                    'npm run build',                    'npx cdk synth',                  ]      }),    });  }}Thanks a lot!FollowComment"

Answer: "0Since a Docker container is used to build Lambda, it is necessary to set "dockerEnabledForSynth: true" to enable privileged mode during build.https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_pipelines.CodePipeline.htmlSo I thought this is how it would look as a code.Note that "dockerEnabledForSelfMutation: true" must also be added if Docker image Assets are used on CDK Pipelines.    new CodePipeline(this, 'Pipeline', {      pipelineName: 'TestPipeline',      synth: new ShellStep('Synth', {        input: CodePipelineSource.gitHub('ivozmediano/microservicios', 'main'),        commands: [                    'npm ci',                    'npm run build',                    'npx cdk synth',                  ]      }),      dockerEnabledForSynth: true    });  }}CommentShareEXPERTRiku_Kobayashianswered 7 days agoivan 7 days agoHi Riku, I tried your solution but it's still not working, same error. Thanks a lot anyway!ShareRiku_Kobayashi EXPERT7 days agoBy the way, if I clone CodePipelineSource.gitHub('ivozmediano/microservicios', 'main') locally and run "npm ci", "npm run build", "npx cdk synth" locally, I get error?Shareivan 7 days agoProbably, because of credentialsShareRiku_Kobayashi EXPERT7 days agoAre there any errors in the npm run build execution log when you run the CDK?You may also want to check if you have successfully cloned from GitHub.Shareivan 7 days agoThere are no errors in npm run build locally. I tried a different node version and, locally, I can run npx cdk synth, but when I try to deploy code using CodePipeline, error again.Share"


Question: [SDK 2.x] EcsAsyncClient.runTask() CompletableFuture never completes

"Hi,I have AWS Java SDK 2.x based code in a Docker container which attempts to run a Fargate task (its own task definition with an overridden command).I see runTask() being invoked and requests being logged in CloudWatch:11:43:43Starting process for item ID: CE5K55ARX11:43:432019-08-16 11:43:43 [main] DEBUG software.amazon.awssdk.request:84 - Sending Request: DefaultSdkHttpFullRequest(httpMethod=POST, protocol=https, host=ecs.us-west-2.amazonaws.com, encodedPath=/, headers=[amz-sdk-invocation-id, Content-Length, Content-Type, User-Agent, X-Amz-Target], queryParameters=[])However, nothing else happens after that - completed() is never called and does not log the debug message, CloudWatch does not show any logs for the sub-tasks. Looks like execution is requested but sub-tasks are not run, and I don't know where to look for what goes wrong.The task runs fine on its own, it's just the execution of sub-tasks from SDK that I'm having trouble with.Here's the code:public void runTask(Item item){    System.out.println("Starting process for item ID: " + item.getId());        TaskOverride cmdOverride = TaskOverride.builder().        containerOverrides(ContainerOverride.builder().            name("some-container"). // dummy name            command("--item",item.getId()). // dummy command            build()).        build();    AwsVpcConfiguration avc = AwsVpcConfiguration.builder().        securityGroups("default").        subnets("subnet-0728a262").        assignPublicIp(AssignPublicIp.ENABLED).        build();    NetworkConfiguration nc = NetworkConfiguration.builder().        awsvpcConfiguration(avc).        build();        RunTaskRequest task = RunTaskRequest.builder().        launchType(LaunchType.FARGATE).        taskDefinition("arn:aws:ecs:us-east-1:XXXXXXXXXXX:task-definition/some-def"). // dummy name        cluster("some-cluster"). // dummy name        count(1).        networkConfiguration(nc).        overrides(cmdOverride).        enableECSManagedTags(false).        startedBy(item.getId()).        build();    ecsClient.runTask(task).whenComplete(completed());}public static BiConsumer<RunTaskResponse, Throwable> completed(){    return (RunTaskResponse resp, Throwable t) ->    {        System.out.println("completed()");        if (resp != null) System.out.println("Tasks completed: " + resp.tasks());        if (t != null) System.out.println("Task error: " + t);    };}Any help is appreciated.Edited by: Zaliakalnis on Aug 16, 2019 5:07 AMEdited by: Zaliakalnis on Aug 16, 2019 5:17 AMFollowComment"

Answer: "0Nevermind, I should have read Using the AWS SDK for Java 2.0 » Asynchronous ProgrammingAsynchronous Programming and called join() on the future :)https://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/basics-async.htmlThis calls completed() as expected:ecsClient.runTask(task).    whenComplete(completed()).    join();CommentShareZaliakalnisanswered 4 years ago"


Question: Network Load balancer enabled in All available AZs and cross zone load balancer enabled.

"Can someone explain the behaviour of network load balancer enabled in All available AZs and cross zone load balancer enabled ?Context :We have building a Tier-1 Service which is expected to be highly available and have low latency. Our infra choice was ECS fargate which was fronted by a Network load balancer, We have nlb registered in all available zones for regions (us-east-1, eu-west-1, ap-northeast-1 and us-west-2).We are enabling cross zone load balancing too.Questions:How does NLB work with when enabled in All available AZs and cross zone load balancer enabledHow will it impact latency ? Should we remove cross zone load balancer ?FollowComment"

Answer: "0Cross-zone load balancing is described in the AWS documentation.If you enable cross-zone load balancing then requests are distributed evenly across all registered targets in all Availability Zones. This might be desirable if you're trying to protect against a scenario where all hosts in an Availability Zone are down.There will be slightly higher latency for cross-zone requests. It will be minimal and probably a much smaller part than the latency between the client and the load balancer but it will be there. You can check the latency between the Availability Zones by using ping or other networking tools.Whether you turn cross-zone load balancing on or off depends on your requirements for latency and for availability.CommentShareEXPERTBrettski-AWSanswered 4 months agoEXPERTTushar_Jreviewed 4 months ago0From a latency perspective, the risk you incur in not enabling cross-zone load balancing is that requests  to NLBs in an AZ where there are no healthy instances would timeout and be retried by the client, thus increasing the average latency experienced by the clients.Another aspect of enabling cross-zone load balancing is that it increases networking costs: all traffic that goes from a NLB in one AZ to a target in a different AZ will incur a network transfer charge. If you have 3 AZ, this will be equivalent to 2/3rd of the traffic.One way to minimize the impact on latency without using cross-zone load balancing is to use Zonal Shift. You can read more about best practices with Zonal ShiftCommentShareEXPERTMassimilianoAWSanswered 4 months agoEXPERTTushar_Jreviewed 4 months ago"


Question: multiple audio inputs and more than one output layer of audio

"I have multiple external audio files (mp3) and a video without audio file (webm) and I wish to use AWS MediaConvert in order to create a mp4 video file.So far I have succeeded achieving a good result with a single mp3 audio file ("background soundtrack") that plays alongs the entire duration of the video. But here's where things got complicated, I wish to add more audio files on top of that "soundtrack".For instance I have 2 more mp3 files 4 seconds each with a sound effect.So, on INPUT I have 3 audio selectors:Audio Selector 1 - background soundtrack - external (s3) mp3 audio file (15 seconds)Audio Selector 2 - "boom effect" - external (s3) mp3 audio file (5 seconds) [I also set offset of 3000ms)Audio Selector 3 - "wow effect" - external (s3) mp3 audio file (4 seconds) [I also set offset of 8000ms)Then I created an Audio Selector Group named "Sound Effects" and associate it with Audio Selectors 2 & 3.Output groups -> File Group h.264Output settings: MPEG-4 ContainerEncoding: Video - Default settings with 4M bit rateEncoding: Audio 1Advanced Audio Coding, Audio source: "Sound Effects" (Audio selector group)Coding mode 2.0 - L, R (Stereo)Encoding: Audio 2Advanced Audio Coding, Audio source: "Background soundtrack" (Audio selector 1)Coding mode 2.0 - L, R (Stereo)But the result is the video with only Audio 1. From some reason I don't understand it ignores the second audio.I also wanted the "sound effects" to be "on top" of the "background soundtrack", meaning that the volume of the "background soundtrack" would be "low" so I saw the "Manual audio remixing" feature.But still, it only "attached" the Audio 1.Questions:In order to have more than a single "layer" of audio, do I have to use the "manual audio remixing" feature or maybe there's another way I have missed?Do I have to set the "manual audio remixing" values for each on of the "Encoding Audio-s"?I didn't quite understand how to use that feature, why there are 2 channels for each audio encoding on default?Thanks in advance for any help.FollowComment"


Question: Facing issue in RDP of lightsail machine

"I am not able to take RDP of my lightsail machine. I have install McAfee endpoint security after that I am not able to take RDP. Is there any way to get the machine RDP and uninstall mcafee.Thanks,AbhishekFollowComment"

Answer: "0Hi,Security programs do not allow remote connections to your computer by default. However, it is possible to allow remote connections by opening the necessary port under the "Firewall" settings.You may try adding and editing instance firewall rules in Amazon Lightsail https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-editing-firewall-rulesAlso you can follow the below doc which walks through the process of fixing the rdp issues.https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-troubleshooting-browser-based-ssh-rdp-client-connectionCommentShareAWS-User-5087265answered a month ago"